Closed
Bug 1365854
Opened 8 years ago
Closed 8 years ago
Remove FRAME_LABEL_COPY
Categories
(Core :: Gecko Profiler, enhancement)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(1 file)
20.42 KB,
patch
|
mstange
:
review+
shu
:
review+
|
Details | Diff | Splinter Review |
Now that ProfileEntry has both a label and a dynamic string, we don't need to allow label to be dynamic, which means we can remove FRAME_LABEL_COPY.
Assignee | ||
Comment 1•8 years ago
|
||
ProfileEntry has |string|, which can be static or dynamic, and |dynamicString|.
If |string| is dynamic, the FRAME_LABEL_COPY flag must be set, and it will be
copied into profiler output.
But there is only one place that uses dynamic |string| values, in SpiderMonkey.
And that place doesn't use |dynamicString|. So this patch changes that place to
use an empty |string| and put the old dynamic |string| value in
|dynamicString|. This in turn removes the need for FRAME_LABEL_COPY.
One minor wrinkle is that when |dynamicString| is used the old code put a space
between |string| and |dynamicString|. The new code omits the space if |string|
is empty.
The patch also renames ProfileEntry::string as ProfileEntry::label_, which
better matches how it's used.
Attachment #8868897 -
Flags: review?(shu)
Attachment #8868897 -
Flags: review?(mstange)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Comment 2•8 years ago
|
||
Comment on attachment 8868897 [details] [diff] [review]
Remove FRAME_LABEL_COPY
Review of attachment 8868897 [details] [diff] [review]:
-----------------------------------------------------------------
I like it!
::: js/public/ProfilingStack.h
@@ +42,3 @@
>
> + // An additional descriptive string of this entry which is combined with
> + // |label_| in profiler output. Need not (should not!) be static. Can be
I'm taking issue with the "(should not!)" part. For example, the GC reason at http://searchfox.org/mozilla-central/source/dom/base/nsJSEnvironment.cpp#1184 picks one of several static string candidates, and that's a perfectly acceptable use of PROFILER_LABEL_DYNAMIC in my opinion.
Attachment #8868897 -
Flags: review?(mstange) → review+
Comment 3•8 years ago
|
||
Comment on attachment 8868897 [details] [diff] [review]
Remove FRAME_LABEL_COPY
Review of attachment 8868897 [details] [diff] [review]:
-----------------------------------------------------------------
Nice simplification.
::: js/public/ProfilingStack.h
@@ +42,3 @@
>
> + // An additional descriptive string of this entry which is combined with
> + // |label_| in profiler output. Need not (should not!) be static. Can be
Yeah, agree with mstange here. "additional" is fine -- no need to constrain it imo. The dynamic part is really that the profiler can't assume it's static, not that it must be dynamic. Might warrant a rename to "maybeDescription"? Any name is fine with me though.
Attachment #8868897 -
Flags: review?(shu) → review+
Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/768e500ad190a4de4ba23899e0a0a550e785a4d3
Bug 1365854 - Remove FRAME_LABEL_COPY. r=mstange,shu.
Comment 5•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•