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)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rginda, Assigned: rginda)
Details
Attachments
(1 file)
|
4.58 KB,
patch
|
caillon
:
review+
brendan
:
superreview+
asa
:
approval1.5b+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #129771 -
Flags: superreview?(brendan)
| Assignee | ||
Updated•22 years ago
|
Attachment #129771 -
Flags: review?(caillon)
Comment 2•22 years ago
|
||
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
| Assignee | ||
Comment 3•22 years ago
|
||
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 4•22 years ago
|
||
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 5•22 years ago
|
||
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+
| Assignee | ||
Updated•22 years ago
|
Flags: blocking1.5b?
Comment 6•22 years ago
|
||
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+
| Assignee | ||
Comment 7•22 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•22 years ago
|
Flags: blocking1.5b?
Updated•21 years ago
|
Product: Core → Other Applications
Updated•7 years ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•