"v8", perfetto::CounterTrack("OldGenerationConsumedBytes", parent_track_),
Etienne Pierre-DorayI think these counters should still use the same category it used before. Why do you want to change the category?
Omer KatzI want to distinguish these counters, that are generally useful to measure memory footprint, from the other counters that are meant to debug GC heuristics, and are in a disabled-by-default category.
Etienne Pierre-DorayI suspect disabled-by-default is appropriate for these counters as well, since most use cases won't need it, by I get the want to distinguish them from other more GC-specific counters. We usually use the "v8" category for top level V8 events. How about adding a new (disabled-by-default) "v8.memory" category for these counters? I think that would be preferable.
Done
"v8::Heap", this, perfetto::ThreadTrack::Current())
Etienne Pierre-Doraynit: Instead of the named track showing up as "v8::Heap (xxx)", could we have it use the name of the thread as well? So for the main thread for example we'd get "v8::Heap (CrRendererMain xxx)" and for worker threads "v8::Heap (ServiceWorker thread xxx)"?
I think that would slightly better. Wdyt?
could we have it use the name of the thread as well
Not really (at least in this CL): the thread name comes from an enum translated within perfetto - dynamic strings are filtered out in field traces.
Doing this would involve changing perfetto to display the parent thread name.
TRACE_DISABLED_BY_DEFAULT("v8.gc"),
Etienne Pierre-DorayI think the allocation limits could also be part of a new "v8.memory" category. I assume these and the consumed bytes counters should always be used together.
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+cbruni@ for src/tracing/trace-categories.h
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
nice! LGTM
"v8.memory",
we probably need to go around and update all (debug) scripts / tooling to include this new category:
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
"v8.memory",
we probably need to go around and update all (debug) scripts / tooling to include this new category:
- crossbench
- telemetry
- tools/perf helper scripts
- [perfetto UI](https://source.chromium.org/chromium/chromium/src/+/main:third_party/perfetto/ui/src/plugins/dev.perfetto.RecordTraceV2/pages/chrome.ts;l=324)
I'll add the category to slow reports (field tracing).
No need to add categories to perfetto UI anymore (it fetches automatically)
For the telemetry/crossbench: this is (somewhat) new events that no benchmark relies on; so we can add if helpful, but it won't break anything otherwise.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[GC] Improve tracing counters
This CL does a few improvement in gc tracing counters:
- Groups counters together per-heap using a base NamedTrack; this makes it easier to look at a specific heap behavior when there's multiple
heaps in the same process.
- Emits consumed Bytes and limits in "v8.memory" category
- Emits new gc speed counters
Before: https://ui.perfetto.dev/#!/?s=97fa22c3836dbdfb18c71c998b2f54a499800e71
After: https://ui.perfetto.dev/#!/?s=829b1dd00ed384a080ae5a77175b775d33729ed0
Screenshot: https://screenshot.googleplex.com/3PZmVzMbAmhGePe
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |