Closed Bug 481260 Opened 15 years ago Closed 15 years ago

JIT stats in tracemonkey can interfere with stdout-using embeddings

Categories

(Core :: JavaScript Engine, defect)

1.9.1 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: wes, Assigned: gal)

Details

(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

During shutdown of the JS interpreter, if the JIT engine has been called it outputs statistics about its use in the js_FinishJIT() function in jstracer.cpp.

This output cannot be disabled without either disabling JIT, or compiling a non-DEBUG build. 

This is not acceptable for embedders using JavaScript to generate stdout output, such as CGI scripts, programs which feed shell pipelines, etc.

I have attached a patch which prevents the stats from outputting except when the TRACEMONKEY=verbose environment variable is set, by checking the js_verboseDebug global variable.
Attachment #365272 - Flags: review?(jorendorff)
Attachment #365272 - Flags: review?(jorendorff) → review+
Comment on attachment 365272 [details] [diff] [review]
Disable output of JIT stats recorder except when TRACEMONKEY=verbose

I will push it tonight if nobody beats me to it.
Comment on attachment 365272 [details] [diff] [review]
Disable output of JIT stats recorder except when TRACEMONKEY=verbose

The brief summary is pretty useful for debugging with the shell without having to endure the full-on spew. Could we maybe introduce another TRACEMONKEY= parameter? Like TRACEMONKEY=summary or something?
Attachment #365272 - Flags: review+ → review-
Attached patch v2Splinter Review
Assignee: general → gal
Attachment #365272 - Attachment is obsolete: true
Attachment #365275 - Flags: review?(jorendorff)
Attachment #365275 - Flags: review?(jorendorff) → review+
I pushed Wes's version before I saw Gal's comment.  So I pushed Gal's version too.

http://hg.mozilla.org/tracemonkey/rev/94d3afad4d2a
http://hg.mozilla.org/tracemonkey/rev/36ad79c019d8
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/36ad79c019d8
Status: NEW → RESOLVED
Closed: 15 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

Created:
Updated:
Size: