Bug 299311
| Summary: | [libpas] support collecting stat-counters and logging them at runtime | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcus Plutowski <marcus_plutowski> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Marcus Plutowski
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Marcus Plutowski
Pull request: https://github.com/WebKit/WebKit/pull/51137
EWS
Committed 304490@main (1e34af6e2696): <https://commits.webkit.org/304490@main>
Reviewed commits have been landed. Closing PR #51137 and removing active labels.