Open Bug 393501 Opened 17 years ago Updated 2 years ago

Ability to dump the JS stack in tracerefcnt etc. stacks

Categories

(Core :: General, enhancement)

enhancement

Tracking

()

People

(Reporter: Mook, Unassigned)

Details

Attachments

(1 file)

It seems like having the JS stack in refcnt logs would be useful when attempting to track down things like leaks caused by JS.  With a little munging, make-tree.pl should be able to take it too.

Of course, this seems really hard, since the JS context stuff is in /js/src/xpconnect, but tracerefcnt is in /xpcom/base - which can't depend on the former (in fear of circular dependencies).  I'll try to get an experimental patch tomorrow which does this uncleanly (relies on the fact that the two of them end up in the same module on libxul builds, and has way too tight coupling).

It's also possible it'll end up not being useful in attempting to figure out stacks...
Evil, evil hack.  Conflicts with patch in bug 390328 as-is.  Ideas to make this less evil? :)

It's currently useful for... local debug builds with --enable-libxul.  Definitely not ready for normal consumption.
Another way of doing this is by making the stack walk code peek into js_Invoke if possible. I have some prototype code that does this, albeit in an ugly and non-portable (as of yet) way.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'd love this.  I get one-time assertions (like bug 511465) that I can't file useful bugs for because the stacks are mostly JS engine.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: