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"); |