Closed Bug 677985 Opened 13 years ago Closed 5 years ago
Implement new API for tracing native calls
Forked from bug 651599. Previously, the API entries for tracing JS calls (JS_SetCallHook, JS_SetFunctionCallback) were also used for native calls. That made a certain amount of sense because (iiuc) we manufactured JS call frames, at least for non-FastNatives. We no longer do that, which makes these APIs weird -- they're intended to give back info on the callee, but for natives they were giving a mishmash of callee and caller info. In addition, a couple of people want to trace the parameters and return values of natives.
WIP patch to track all native calls. Currently crashing when accessing an argument in a methodjitted native's pre-callout handler; I'm not sure why. But I'm shelving this project for a little while.
This version actually works for me on 64-bit Linux, and is starting to get close to something landable. I'd be highly surprised if it *really* works for the methodjit on x86, though I haven't tried. I just don't understand register management for the mjit. I know of a fallback approach that would probably work everywhere, but first I'd like to know if it's broken. This patch also includes a really obnoxious set of functions for dumping out every single native call when you run the shell. I'll be splitting this up to get feedback on some of the pieces.
Attachment #552222 - Attachment is obsolete: true
Does the new profiler work in bug 713227 obsolete the work in this bug?
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.