aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-10-14 17:02:22 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2014-11-21 14:49:59 +0200
commit304ce44cb5b44a9c942c1abfa8cd9ac004f8fff6 (patch)
treec7041981b6d6e373f075702bebc3c17bf941fe29
parent6438cacf1ad414a85a7786004c510a2bd9a1a116 (diff)
Use TraceTime for determining trace start/end times
Change-Id: Iacd43d12e9fcd0561a3835b91bba56d7058a35f2 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
-rw-r--r--plugins/qmlprofilerextension/memoryusagemodel.cpp6
-rw-r--r--plugins/qmlprofilerextension/pixmapcachemodel.cpp9
2 files changed, 9 insertions, 6 deletions
diff --git a/plugins/qmlprofilerextension/memoryusagemodel.cpp b/plugins/qmlprofilerextension/memoryusagemodel.cpp
index e61ee36683..7d098257d4 100644
--- a/plugins/qmlprofilerextension/memoryusagemodel.cpp
+++ b/plugins/qmlprofilerextension/memoryusagemodel.cpp
@@ -252,9 +252,11 @@ void MemoryUsageModel::loadData()
}
if (currentJSHeapIndex != -1)
- insertEnd(currentJSHeapIndex, traceEndTime() - range(currentJSHeapIndex).start - 1);
+ insertEnd(currentJSHeapIndex, d->modelManager->traceTime()->endTime() -
+ range(currentJSHeapIndex).start - 1);
if (currentUsageIndex != -1)
- insertEnd(currentUsageIndex, traceEndTime() - range(currentUsageIndex).start - 1);
+ insertEnd(currentUsageIndex, d->modelManager->traceTime()->endTime() -
+ range(currentUsageIndex).start - 1);
computeNesting();
diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.cpp b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
index c41d4a1271..2937993f04 100644
--- a/plugins/qmlprofilerextension/pixmapcachemodel.cpp
+++ b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
@@ -416,8 +416,8 @@ void PixmapCacheModel::loadData()
// If the pixmap loading wasn't started, start it at traceStartTime()
if (state.loadState == Initial) {
newEvent.pixmapEventType = PixmapLoadingStarted;
- state.started = insert(traceStartTime(), startTime - traceStartTime(),
- event.typeIndex);
+ state.started = insert(d->modelManager->traceTime()->startTime(), startTime -
+ d->modelManager->traceTime()->startTime(), event.typeIndex);
d->data.insert(state.started, newEvent);
// All other indices are wrong now as we've prepended. Fix them ...
@@ -466,7 +466,8 @@ void PixmapCacheModel::loadData()
}
if (lastCacheSizeEvent != -1)
- insertEnd(lastCacheSizeEvent, traceEndTime() - range(lastCacheSizeEvent).start);
+ insertEnd(lastCacheSizeEvent, d->modelManager->traceTime()->endTime() -
+ range(lastCacheSizeEvent).start);
d->resizeUnfinishedLoads();
@@ -504,7 +505,7 @@ void PixmapCacheModel::PixmapCacheModelPrivate::resizeUnfinishedLoads()
for (int i = 0; i < q->count(); i++) {
if (data[i].pixmapEventType == PixmapCacheModel::PixmapLoadingStarted &&
q->range(i).duration == 0) {
- q->insertEnd(i, q->traceEndTime() - q->range(i).start);
+ q->insertEnd(i, modelManager->traceTime()->endTime() - q->range(i).start);
}
}
}