Bug 156764
| Summary: | Consider gathering backtraces at allocation sites to show in the web inspector | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> |
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> |
| Status: | NEW | ||
| Severity: | Normal | CC: | benjamin, darin, emacemac7, fpizlo, ggaren, gskachkov, joepeck, keith_miller, mark.lam, msaboff, nvasilyev, oliver, sukolsak, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Saam Barati
A possible implementation could be done purely at the byte code level.
Store a private property on the object that was just allocated which contains
whatever meta information you want. It could be a backtrace. It could be a
code location.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Oliver Hunt
Maybe we could even just limit it to larger (for some clarification of what that means) allocations so it could be almost(?) always-on?
Saam Barati
(In reply to comment #1)
> Maybe we could even just limit it to larger (for some clarification of what
> that means) allocations so it could be almost(?) always-on?
I'm not sure how you could easily do such a thing easily. Object size
grows as the object lives longer. I guess you could have some kind
of a system that starts by profiling everything and then backs off
slowly to only profile some things as it figures out the tendency
of the program's allocations. That seems hard and I'm not even
sure it would work.
Were you thinking of a particular mechanism when you suggested this?
Radar WebKit Bug Importer
<rdar://problem/25994092>