Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: Source/core/inspector/InspectorTimelineAgent.cpp

Issue 121223003: DevTools: Move usedHeapSize from TimelineEvent into counters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorTimelineAgent.cpp
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp
index 5bfb78d1c6d5586d827e697f2f50ebb4667325f9..efaa52a8f095d54eb544a90a2c2f06008a2feb0c 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -1060,15 +1060,16 @@ static size_t getUsedHeapSize()
void InspectorTimelineAgent::setCounters(TimelineEvent* record)
{
- record->setUsedHeapSize(getUsedHeapSize());
-
- if (m_state->getBoolean(TimelineAgentState::includeCounters) && m_inspectorType == PageInspector) {
- RefPtr<TypeBuilder::Timeline::Counters> counters = TypeBuilder::Timeline::Counters::create();
+ if (!m_state->getBoolean(TimelineAgentState::includeCounters))
+ return;
+ RefPtr<TypeBuilder::Timeline::Counters> counters = TypeBuilder::Timeline::Counters::create();
+ if (m_inspectorType == PageInspector) {
counters->setDocuments(InspectorCounters::counterValue(InspectorCounters::DocumentCounter));
counters->setNodes(InspectorCounters::counterValue(InspectorCounters::NodeCounter));
counters->setJsEventListeners(InspectorCounters::counterValue(InspectorCounters::JSEventListenerCounter));
- record->setCounters(counters.release());
}
+ counters->setJsHeapSizeUsed(static_cast<double>(getUsedHeapSize()));
+ record->setCounters(counters.release());
}
void InspectorTimelineAgent::setFrameIdentifier(TimelineEvent* record, Frame* frame)

Powered by Google App Engine
This is Rietveld 408576698