Closed Bug 216112 Opened 22 years ago Closed 22 years ago

add ability to disable object tracking in jsd

Categories

(Other Applications Graveyard :: Venkman JS Debugger, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rginda, Assigned: rginda)

Details

Attachments

(1 file)

The jsd library tracks the file name and line number of every object created and every constructor called. This is some expensive code, probably too expensive to justify doing it all the time. This patch disables object tracking on mozilla startup, but turns it back on once venkman starts. This shaved 25% off of the following testcase: function f() { g(); h(); }; function g() {}; function h() {}; for (var i = 0; i < 50000; ++i) f(); This means that in order to use "Find Constructor" or "Find Creator" on an object, the object must be created *after* venkman is started.
Attachment #129771 - Flags: superreview?(brendan)
Attachment #129771 - Flags: review?(caillon)
Dumb question, but I couldn't see it grepping around: where does the JSD_DISABLE_OBJECT_TRACE flag get cleared? I see it tested and set only, and I couldn't find a clear-all method. BTW, do the JSD_DISABLE_OBJECT_TRACE and DISABLE_OBJECT_TRACE flags have to match? Can't you consolidate on the .idl-defined ones? Must be some history here. /be
On startup, venkman explicitly sets the flags to JSD_ENABLE_NATIVE_FRAMES, regardless of the previous value. We can't consolidate to just the idl defines because there are jsd clients that do not use XPCOM.
Comment on attachment 129771 [details] [diff] [review] add ability to disable object tracking, and use it Looks good to me, sr=brendan if caillon likes it. /be
Attachment #129771 - Flags: superreview?(brendan) → superreview+
Comment on attachment 129771 [details] [diff] [review] add ability to disable object tracking, and use it >Index: jsd_xpc.cpp >@@ -3267,15 +3265,18 @@ > return rv; > > rv = jsds->OnForRuntime(rt); >+ if (NS_FAILED(rv)) >+ return rv; > >+ rv = jsds->SetFlags(JSD_DISABLE_OBJECT_TRACE); > return rv; How about a straight |return jsds->SetFlags(JSD_DISABLE_OBJECT_TRACE);| ? Patch looks good. r=caillon.
Attachment #129771 - Flags: review?(caillon) → review+
Flags: blocking1.5b?
Comment on attachment 129771 [details] [diff] [review] add ability to disable object tracking, and use it a=asa (on behalf of drivers) for checkin to Mozilla 1.5beta.
Attachment #129771 - Flags: approval1.5b+
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Flags: blocking1.5b?
Product: Core → Other Applications
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: