final long resolution = Math.max(1, (end - ssq.getStartTime()) / getDisplayWidth());
setEndTime(Math.max(getEndTime(), end + 1));
final List<Integer> threadQuarks = ssq.getQuarks(Attributes.THREADS, "*"); //$NON-NLS-1$
- final long qStart = start;
- final long qEnd = end;
- queryFullStates(ssq, qStart, qEnd, resolution, monitor, new IQueryHandler() {
+ queryFullStates(ssq, start, end, resolution, monitor, new IQueryHandler() {
@Override
public void handle(List<List<ITmfStateInterval>> fullStates, List<ITmfStateInterval> prevFullState) {
for (int threadQuark : threadQuarks) {
}
}
updateTree(entryList, parentTrace, ssq);
+ }
+ });
+ queryFullStates(ssq, ssq.getStartTime(), end, resolution, monitor, new IQueryHandler() {
+ @Override
+ public void handle(@NonNull List<List<ITmfStateInterval>> fullStates, @Nullable List<ITmfStateInterval> prevFullState) {
for (final TimeGraphEntry entry : getEntryList(ssq)) {
if (monitor.isCanceled()) {
return;
}
- buildStatusEvents(trace, parentTrace, ssq, fullStates, prevFullState, (ControlFlowEntry) entry, monitor, qStart, qEnd);
+ buildStatusEvents(trace, parentTrace, ssq, fullStates, prevFullState, (ControlFlowEntry) entry, monitor, ssq.getStartTime(), end);
}
}
});
if (eventList == null) {
return;
}
- for (ITimeEvent event : eventList) {
- entry.addEvent(event);
+ /* Start a new event list on first iteration, then append to it */
+ if (prevFullState == null) {
+ entry.setEventList(eventList);
+ } else {
+ for (ITimeEvent event : eventList) {
+ entry.addEvent(event);
+ }
}
if (parentTrace.equals(getTrace())) {
redraw();
}
final List<@NonNull TimeGraphEntry> traceEntryChildren = traceEntry.getChildren();
final long resolution = Math.max(1, (endTime - ssq.getStartTime()) / getDisplayWidth());
- final long qStart = start;
- final long qEnd = end;
- queryFullStates(ssq, qStart, qEnd, resolution, monitor, new IQueryHandler() {
+ queryFullStates(ssq, ssq.getStartTime(), end, resolution, monitor, new IQueryHandler() {
@Override
public void handle(List<List<ITmfStateInterval>> fullStates, List<ITmfStateInterval> prevFullState) {
for (TimeGraphEntry child : traceEntryChildren) {
}
List<ITimeEvent> eventList = getEventList(entry, ssq, fullStates, prevFullState, monitor);
if (eventList != null) {
- for (ITimeEvent event : eventList) {
- entry.addEvent(event);
+ /* Start a new event list on first iteration, then append to it */
+ if (prevFullState == null) {
+ entry.setEventList(eventList);
+ } else {
+ for (ITimeEvent event : eventList) {
+ entry.addEvent(event);
+ }
}
}
for (TimeGraphEntry child : entry.getChildren()) {
*/
return null;
}
+ boolean isZoomThread = Thread.currentThread() instanceof ZoomThread;
eventList = new ArrayList<>(fullStates.size());
ITmfStateInterval lastInterval = prevFullState == null || statusQuark >= prevFullState.size() ? null : prevFullState.get(statusQuark);
long lastStartTime = lastInterval == null ? -1 : lastInterval.getStartTime();
eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
}
eventList.add(new TimeEvent(entry, time, duration, status));
- } else {
+ } else if (isZoomThread) {
eventList.add(new NullTimeEvent(entry, time, duration));
}
lastStartTime = time;
private static List<ITimeEvent> createIrqEventsList(ITimeGraphEntry entry, List<List<ITmfStateInterval>> fullStates, List<ITmfStateInterval> prevFullState, IProgressMonitor monitor, int quark) {
List<ITimeEvent> eventList;
+ boolean isZoomThread = Thread.currentThread() instanceof ZoomThread;
eventList = new ArrayList<>(fullStates.size());
ITmfStateInterval lastInterval = prevFullState == null || quark >= prevFullState.size() ? null : prevFullState.get(quark);
long lastStartTime = lastInterval == null ? -1 : lastInterval.getStartTime();
*/
eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
}
- eventList.add(new NullTimeEvent(entry, time, duration));
+ if (isZoomThread) {
+ eventList.add(new NullTimeEvent(entry, time, duration));
+ }
lastIsNull = true;
}
lastStartTime = time;
if (monitor.isCanceled()) {
return;
}
- buildStatusEvents(parentTrace, (CallStackEntry) callStackEntry, monitor, start, end);
+ buildStatusEvents(parentTrace, (CallStackEntry) callStackEntry, monitor, ss.getStartTime(), end);
}
}
start = end;
long resolution = Math.max(1, (end - ss.getStartTime()) / getDisplayWidth());
List<ITimeEvent> eventList = getEventList(entry, start, end + 1, resolution, monitor);
if (eventList != null) {
- for (ITimeEvent event : eventList) {
- entry.addEvent(event);
- }
+ entry.setEventList(eventList);
}
if (trace == getTrace()) {
redraw();
if (end <= start) {
return null;
}
+ boolean isZoomThread = Thread.currentThread() instanceof ZoomThread;
List<ITimeEvent> eventList = null;
try {
List<ITmfStateInterval> stackIntervals = StateSystemUtils.queryHistoryRange(ss, entry.getQuark(), start, end - 1, resolution, monitor);
eventList.add(new CallStackEvent(entry, time, duration, value));
lastIsNull = false;
} else {
- if (lastEndTime == -1) {
+ if (lastEndTime == -1 && isZoomThread) {
// add null event if it intersects the start time
eventList.add(new NullTimeEvent(entry, time, duration));
} else {
// add unknown event if between two null states
eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
}
- if (time + duration >= endTime) {
+ if (time + duration >= endTime && isZoomThread) {
// add null event if it intersects the end time
eventList.add(new NullTimeEvent(entry, time, duration));
}