Closed Bug 1064621 Opened 11 years ago Closed 5 months ago

Allow passing a filename through to perf

Categories

(Core :: JavaScript Engine, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

I found this helpful when I wanted to generate multiple perf outputs, for different portions of a run. This allows startProfiling("first_part.dat"); ... stopProfiling(); startProfiling("second_part.dat"); ... stopProfiling();
Sorry Hannes, I picked you to review somewhat at random. Not sure who else to use.
This also eliminates a no longer supported --append flag, which allows this to work again.
Attachment #8486116 - Flags: review?(hv1989)
Attachment #8486114 - Attachment is obsolete: true
Comment on attachment 8486116 [details] [diff] [review] Allow passing a filename through to perf Review of attachment 8486116 [details] [diff] [review]: ----------------------------------------------------------------- There is a strange thing going on. StartProfiling requires a first argument (and will throw an error if you don't provide that). So it is somewhat strange to have this profileName ? profileName : "mozperf.data". Since the "mozperf.data" will never get used. So I think you'll need to allow StartProfiling without an first argument?
Attachment #8486116 - Flags: review?(hv1989)
(In reply to Hannes Verschore [:h4writer] from comment #3) > Comment on attachment 8486116 [details] [diff] [review] > Allow passing a filename through to perf > > Review of attachment 8486116 [details] [diff] [review]: > ----------------------------------------------------------------- > > There is a strange thing going on. StartProfiling requires a first argument > (and will throw an error if you don't provide that). So it is somewhat > strange to have this profileName ? profileName : "mozperf.data". Since the > "mozperf.data" will never get used. So I think you'll need to allow > StartProfiling without an first argument? That's the way it already works. Here's the top of StartProfiling: static bool StartProfiling(JSContext *cx, unsigned argc, jsval *vp) { CallArgs args = CallArgsFromVp(argc, vp); if (args.length() == 0) { args.rval().setBoolean(JS_StartProfiling(nullptr, getpid())); return true; } I think you spotted the RequiredStringArg and believed it. :-) [Argh! I never clicked "Save Changes" and now you're gone.]
Comment on attachment 8486116 [details] [diff] [review] Allow passing a filename through to perf Review of attachment 8486116 [details] [diff] [review]: ----------------------------------------------------------------- Yeah you are totally correct.
Attachment #8486116 - Flags: review+
Severity: normal → S3

Steve, should we land this change / discard this bug?

Blocks: sm-testing
Severity: S3 → N/A
Type: defect → enhancement
Flags: needinfo?(sphink)
Priority: -- → P5

Hm... I don't know if anyone will use this, but having it ignore the filename seems worse than doing something with it, so I guess I'd like to land it.

Flags: needinfo?(sphink)
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bb4e680910eb Allow setting filename when using perf r=nbp
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: