Last Comment Bug 666091 - custom file for GCTIMER output
: custom file for GCTIMER output
Status: RESOLVED FIXED
fixed-in-tracemonkey
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Igor Bukanov
:
Mentors:
Depends on:
Blocks:
  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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
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 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 Igor Bukanov 2011-06-21 18:27:32 PDT
Created attachment 540940 [details] [diff] [review]
v1

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 Gregor Wagner [:gwagner] 2011-06-21 20:00:14 PDT
Comment on attachment 540940 [details] [diff] [review]
v1

>
>
>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/gc-test.py.
There it expects the output in stderr.
Comment 3 Igor Bukanov 2011-06-22 01:53:04 PDT
Created attachment 540993 [details] [diff] [review]
v2

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

Thanks!
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 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 Chris Leary [:cdleary] (not checking bugmail) 2011-06-27 11:41:18 PDT
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/6933048a247c

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