Closed
Bug 513103
Opened 15 years ago
Closed 13 years ago
TM: Capture the current call stack without falling of trace
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: gal, Unassigned)
Details
This is useful for profiling, and also for security checks. I was thinking about handing in a structure like this: struct { JSScript* script; JSObject* callstack[max]; } If max isn't enough, we return an error.
Comment 1•15 years ago
|
||
So the consumer could use a stack-allocated array and then on error fall back to a heap-allocated one? Could the error return indicate the necessary array size?
Comment 2•15 years ago
|
||
So...we can reify JSStackFrames when we have to fall off trace, so can't we just incrementally partial-reify the parts of the stack that we need when we have a security check, check those, then switch back to the already-existing stack frames and check through those? (I know I'm being just a /slight/ bit hand-wavy.)
Reporter | ||
Comment 3•15 years ago
|
||
We can. But the point is the consumer doesn't need all the info in a JSStackFrame and shouldn't pay for that. The consumer should ask a narrow questions (give me the call stack as a list of funobjs), and the engine will give a narrow answer.
Comment 4•15 years ago
|
||
Typical use-cases involve getting actual argument count and values, local variable values (eek!), etc. See the recent es-discuss list on this topic: https://mail.mozilla.org/pipermail/es-discuss/2009-August/009714.html /be
Comment 5•15 years ago
|
||
I think we both want the same thing based on your comment 3, just wasn't clear from comment 0 (to me at least) that that was what you meant. :-)
Comment 6•13 years ago
|
||
Obsolete with the removal of tracejit.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•