Closed Bug 387229 Opened 17 years ago Closed 17 years ago

DUMP_SCOPE_STATS does not print js_scope_stats

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: igor, Assigned: igor)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch implementation v1 (obsolete) — Splinter Review
Currently DUMP_SCOPE_STATS does not print scope statistics collected js_scope_stats. The attached patch fixed that while extending JSScopeStats with hashSearches for easier analysis of hashing performance.
Attachment #271349 - Flags: review?(brendan)
Blocks: 386885
Comment on attachment 271349 [details] [diff] [review]
implementation v1

Oops, the linear search was added after the scope metering and I never revisited. Thanks for fixing.

>+    jsrefcount          hashSearches;

Nit only: in light of following names lacking "hash" prefix:

>     jsrefcount          misses;
>     jsrefcount          stepHits;
>     jsrefcount          stepMisses;

you could just call it "hashes" instead of "hashSearches".

>+    METER(hashSearches);
>     /* Compute the primary hash address. */

Nit: one blank line between METER and comment.

r=me with nits picked or otherwise dealt with.

/be
Attachment #271349 - Flags: review?(brendan) → review+
Here is a pacth to commit with nits addressed.
Attachment #271349 - Attachment is obsolete: true
Attachment #271381 - Flags: review+
I committed the patch from comment 2 to the trunk:

Checking in jsscope.c;
/cvsroot/mozilla/js/src/jsscope.c,v  <--  jsscope.c
new revision: 3.65; previous revision: 3.64
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: