js-self-profiling icon indicating copy to clipboard operation
js-self-profiling copied to clipboard

Codify common failure modes like truncated stacks

Open dominiccooney opened this issue 5 years ago • 0 comments

I suspect there are some predictable failure modes for sampling, like truncating a long stack trace (for example because of resource limitations) or reaching a sampling point but being unable to take a sample (for example stack unwinding fails to make it through intermediate native frames playing exotic frame pointer tricks and the VM decides to discard the whole sample.)

It might be useful to solicit common failure modes and design specific frames in the "unknown" category to let VMs communicate the common reasons sampling has failed.

With the draft text as-is, implementors could drop the sample or invent "unknown" parent samples. The flexibility is nice but it could confound authors trying to interpret the results. It's pretty common for Java profilers I've seen to have a magic "give up" symbol they interpret broken unwinding to, and developers know to look for that symbol to judge how much they should trust their profiling results.

dominiccooney avatar Nov 27 '18 07:11 dominiccooney