RESOLVED FIXED299311
[libpas] support collecting stat-counters and logging them at runtime
https://bugs.webkit.org/show_bug.cgi?id=299311
Summary [libpas] support collecting stat-counters and logging them at runtime
Marcus Plutowski
Reported 2025-09-22 13:23:22 PDT
rdar://160953463 When working on allocator internals, it’s incredible useful to be able to know simple things like “what size classes are more/less frequent” — but libpas does not currently make that easy to do. Separately from the overall memory-profiling effort, I want to be able to instrument libpas-internal metrics in a simple way and log them out to stdout/a file in some json format to enable quick exploration/experimentation. To start with, just something simple like “how many allocations have been made per size class” would be great, but ideally whatever system we use should be extensible without too much extra effort. This should be compiled out by default, and when compiled in should include runtime enables controlled by an envvar. The logs should be formatted as json, and should be able to be logged either to stdout or to a file. Even though they will be disabled in release builds, they should have minimal overhead at runtime so that they don't significantly perturb program execution.
Attachments
Marcus Plutowski
Comment 1 2025-09-22 14:14:53 PDT
EWS
Comment 2 2025-12-15 19:24:34 PST
Committed 304490@main (1e34af6e2696): <https://commits.webkit.org/304490@main> Reviewed commits have been landed. Closing PR #51137 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.