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

Unified Diff: src/heap/mark-compact.cc

Issue 2379823004: [Tracing] Integrate GC object statistics with tracing. (Closed)
Patch Set: Created 4 years, 3 months 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
« no previous file with comments | « no previous file | src/heap/object-stats.h » ('j') | src/heap/object-stats.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 38c32befdb16f1b02f5097d5fadb14a836074793..1311be91a823bd956ec9bd3ea38152f44a0c5af8 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2246,6 +2246,13 @@ void MarkCompactCollector::RecordObjectStats() {
ObjectStatsVisitor visitor(heap(), heap()->live_object_stats_,
heap()->dead_object_stats_);
VisitAllObjects(&visitor);
+ std::stringstream live, dead;
+ heap()->live_object_stats_->Dump(live);
+ heap()->dead_object_stats_->Dump(dead);
+ TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("v8.gc_stats"),
ssid 2016/09/29 21:45:31 Do we really need a new category? can we just use
lpy 2016/09/29 22:45:42 We can use v8.gc, but, v8.gc will add a bunch of o
fmeawad 2016/09/30 00:44:05 I think gc_stats is fine. But I wonder if TRACE_EV
lpy 2016/09/30 18:21:58 Acknowledged.
+ "V8.GC_Objects_Stats", TRACE_EVENT_SCOPE_THREAD,
+ "live", TRACE_STR_COPY(live.str().c_str()), "dead",
+ TRACE_STR_COPY(dead.str().c_str()));
if (FLAG_trace_gc_object_stats) {
heap()->live_object_stats_->PrintJSON("live");
heap()->dead_object_stats_->PrintJSON("dead");
« no previous file with comments | « no previous file | src/heap/object-stats.h » ('j') | src/heap/object-stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698