As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 666091 - custom file for GCTIMER output
: custom file for GCTIMER output
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Igor Bukanov
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2011-06-21 18:18 PDT by Igor Bukanov
Modified: 2011-06-27 11:41 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (4.35 KB, patch)
2011-06-21 18:27 PDT, Igor Bukanov
no flags Details | Diff | Splinter Review
v2 (5.32 KB, patch)
2011-06-22 01:53 PDT, Igor Bukanov
anygregor: review+
Details | Diff | Splinter Review

Description User image Igor Bukanov 2011-06-21 18:18:52 PDT
Currently MOZ_GCTIMER always writes the stats into the gcTimer.dat file in the current directory. It would be nice to be to control this via a environment variable. This way it would be harder to accidentally overwrite the collected stats.
Comment 1 User image Igor Bukanov 2011-06-21 18:27:32 PDT
Created attachment 540940 [details] [diff] [review]

With the patch the MOZ_GCTIMER controls the output file. I also removed JS_WANT_GC_SUITE_PRINT support as a similar effect can be archived by setting MOZ_GCTIMER to /proc/self/fd/1 . I have also added a special value "none" to disable the stat collection for convince.
Comment 2 User image Gregor Wagner [:gwagner] 2011-06-21 20:00:14 PDT
Comment on attachment 540940 [details] [diff] [review]

>diff --git a/js/src/jsgcstats.cpp b/js/src/jsgcstats.cpp
>--- a/js/src/jsgcstats.cpp
>+++ b/js/src/jsgcstats.cpp
> #if defined(MOZ_GCTIMER)
>-        if (JS_WANT_GC_SUITE_PRINT) {
>-            fprintf(stderr, "%f %f %f\n",
>-                    TIMEDIFF(enter, end),
>-                    TIMEDIFF(startMark, startSweep),
>-                    TIMEDIFF(startSweep, sweepDestroyEnd));
>-        } else {
>-            static FILE *gcFile;

I am still using JS_WANT_GC_SUITE_PRINT for js/src/metrics/gc/
There it expects the output in stderr.
Comment 3 User image Igor Bukanov 2011-06-22 01:53:04 PDT
Created attachment 540993 [details] [diff] [review]

The new version interprets stderr/stdout values in MOZ_GCTIMER environment variable as an instruction to print data in the short format. sets the variable accordingly eliminating the need in JS_WANT_GC_SUITE_PRINT.
Comment 4 User image Gregor Wagner [:gwagner] 2011-06-24 10:33:26 PDT
Comment on attachment 540993 [details] [diff] [review]

I was also thinking of making a runtime switch for optimize builds so that you don't have to add it during compilation. Everybody could enable it if wanted.
Comment 5 User image Bill McCloskey (:billm) 2011-06-24 10:36:30 PDT
(In reply to comment #4)
> I was also thinking of making a runtime switch for optimize builds so that
> you don't have to add it during compilation. Everybody could enable it if
> wanted.

This would be great. All the preprocessor verbiage for GCTIMER and JSGC_TESTPILOT is getting a little heavy. It would be nice if it were always enabled.
Comment 7 User image Chris Leary [:cdleary] (not checking bugmail) 2011-06-27 11:41:18 PDT
cdleary-bot mozilla-central merge info:

Note You need to log in before you can comment on or make changes to this bug.