forked from qt-creator/qt-creator
Use TraceTime for determining trace start/end times
Change-Id: Iacd43d12e9fcd0561a3835b91bba56d7058a35f2 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
@@ -252,9 +252,11 @@ void MemoryUsageModel::loadData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentJSHeapIndex != -1)
|
if (currentJSHeapIndex != -1)
|
||||||
insertEnd(currentJSHeapIndex, traceEndTime() - range(currentJSHeapIndex).start - 1);
|
insertEnd(currentJSHeapIndex, d->modelManager->traceTime()->endTime() -
|
||||||
|
range(currentJSHeapIndex).start - 1);
|
||||||
if (currentUsageIndex != -1)
|
if (currentUsageIndex != -1)
|
||||||
insertEnd(currentUsageIndex, traceEndTime() - range(currentUsageIndex).start - 1);
|
insertEnd(currentUsageIndex, d->modelManager->traceTime()->endTime() -
|
||||||
|
range(currentUsageIndex).start - 1);
|
||||||
|
|
||||||
|
|
||||||
computeNesting();
|
computeNesting();
|
||||||
|
@@ -416,8 +416,8 @@ void PixmapCacheModel::loadData()
|
|||||||
// If the pixmap loading wasn't started, start it at traceStartTime()
|
// If the pixmap loading wasn't started, start it at traceStartTime()
|
||||||
if (state.loadState == Initial) {
|
if (state.loadState == Initial) {
|
||||||
newEvent.pixmapEventType = PixmapLoadingStarted;
|
newEvent.pixmapEventType = PixmapLoadingStarted;
|
||||||
state.started = insert(traceStartTime(), startTime - traceStartTime(),
|
state.started = insert(d->modelManager->traceTime()->startTime(), startTime -
|
||||||
event.typeIndex);
|
d->modelManager->traceTime()->startTime(), event.typeIndex);
|
||||||
d->data.insert(state.started, newEvent);
|
d->data.insert(state.started, newEvent);
|
||||||
|
|
||||||
// All other indices are wrong now as we've prepended. Fix them ...
|
// All other indices are wrong now as we've prepended. Fix them ...
|
||||||
@@ -466,7 +466,8 @@ void PixmapCacheModel::loadData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lastCacheSizeEvent != -1)
|
if (lastCacheSizeEvent != -1)
|
||||||
insertEnd(lastCacheSizeEvent, traceEndTime() - range(lastCacheSizeEvent).start);
|
insertEnd(lastCacheSizeEvent, d->modelManager->traceTime()->endTime() -
|
||||||
|
range(lastCacheSizeEvent).start);
|
||||||
|
|
||||||
d->resizeUnfinishedLoads();
|
d->resizeUnfinishedLoads();
|
||||||
|
|
||||||
@@ -504,7 +505,7 @@ void PixmapCacheModel::PixmapCacheModelPrivate::resizeUnfinishedLoads()
|
|||||||
for (int i = 0; i < q->count(); i++) {
|
for (int i = 0; i < q->count(); i++) {
|
||||||
if (data[i].pixmapEventType == PixmapCacheModel::PixmapLoadingStarted &&
|
if (data[i].pixmapEventType == PixmapCacheModel::PixmapLoadingStarted &&
|
||||||
q->range(i).duration == 0) {
|
q->range(i).duration == 0) {
|
||||||
q->insertEnd(i, q->traceEndTime() - q->range(i).start);
|
q->insertEnd(i, modelManager->traceTime()->endTime() - q->range(i).start);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user