Bug 1365854 - Remove FRAME_LABEL_COPY. r=mstange,shu.
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, and ProfileEntry::dynamicString as ProfileEntry::dynamicString_ so the getter can be renamed dynamicString().
This commit is contained in:
@@ -497,11 +497,6 @@ ThreadStackHelper::FillStackBuffer()
|
||||
// Deduplicate identical, consecutive frames
|
||||
const char* prevLabel = nullptr;
|
||||
for (; reservedSize-- && entry != end; entry++) {
|
||||
/* We only accept non-copy labels, including js::RunScript,
|
||||
because we only want static labels in the hang stack. */
|
||||
if (entry->isCopyLabel()) {
|
||||
continue;
|
||||
}
|
||||
if (entry->isJs()) {
|
||||
prevLabel = AppendJSEntry(entry, availableBufferSize, prevLabel);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user