Closed Bug 677985 Opened 13 years ago Closed 5 years ago

Implement new API for tracing native calls

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: sfink, Unassigned)

References

Details

(Whiteboard: wanted-standalone-js)

Attachments

(1 file, 1 obsolete file)

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.
Attached patch Implement native call tracking (obsolete) — Splinter Review
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.
Whiteboard: wanted-standalone-js
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
Blocks: 653703
Does the new profiler work in bug 713227 obsolete the work in this bug?
Assignee: general → nobody

(In reply to Dietrich Ayala (:dietrich) from comment #3)

Does the new profiler work in bug 713227 obsolete the work in this bug?

No, but the new new profiler does.

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.

Attachment

General

Created:
Updated:
Size: