So that we can add psuedo frames for a bunch of spidermonkey/js stuff. SPSEntryMarker is close to what we want, but currently is specialized for js::RunScript
Created attachment 8660282 [details] [diff] [review] Create the js::AutoSPSEntry RAII class for defining psuedo frame entries
Kannan, one issue I have with this patch is that the category doesn't seem to be picked up by the time the devtools get their hands on the samples and the category is always "other". Any ideas why this isn't making it all the way through the pipeline?
The category is getting dropped when the pseudostack entries are recorded into the sample buffer. See "tools/profiler/core/GeckoSampler.cpp" line 1289. That file adds a pseudo-stack entry to the sample buffer. The format of a pseudostack entry on the profile buffer doesn't include the category information. That formatting needs to be changed to allow for category info to be embedded, then the code above needs to be changed to emit the category info into the profile buffer, and lastly, "tools/profiler/core/ProfileEntry.cpp" line 610 (method ProfileBuffer::StreamSamplesToJSON) needs to be fixed up to parse that and emit the appropriate JSON for it.
If you want, I can take you through that code in more detail over videochat.