Bug 1367654 (part 3) - Remove unnecessary BEGIN_PSEUDO_JS frame from AutoGeckoProfilerEntry. r=shu.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 26 May 2017 14:54:34 +1000
changeset 409581 735a87a03948ba9462017b37f64fed601444c7cd
parent 409580 343d001b8dfe9746d5423d0d1fca61c248805cc9
child 409582 4e9f60d1655fa304de744629f28f64f7c182691e
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs1367654
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1367654 (part 3) - Remove unnecessary BEGIN_PSEUDO_JS frame from AutoGeckoProfilerEntry. r=shu. BEGIN_PSEUDO_JS frames are necessary before a sequence of JS frames, in order to provide a stack address. But in AutoGeckoProfilerEntry the BEGIN_PSEUDO_JS frame is before a C++ frame, so it's useless.
js/src/vm/GeckoProfiler.cpp
--- a/js/src/vm/GeckoProfiler.cpp
+++ b/js/src/vm/GeckoProfiler.cpp
@@ -401,30 +401,25 @@ AutoGeckoProfilerEntry::AutoGeckoProfile
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;
     if (!profiler_->installed()) {
         profiler_ = nullptr;
         return;
     }
     spBefore_ = profiler_->stackPointer();
 
     profiler_->pseudoStack_->pushCppFrame(
-        label, /* dynamicString = */ nullptr, /* sp = */ this, /* line = */ 0,
-        js::ProfileEntry::Category::OTHER, js::ProfileEntry::BEGIN_PSEUDO_JS);
-
-    profiler_->pseudoStack_->pushCppFrame(
         label, /* dynamicString = */ nullptr, /* sp = */ this, /* line = */ 0, category);
 }
 
 AutoGeckoProfilerEntry::~AutoGeckoProfilerEntry()
 {
     if (!profiler_)
         return;
 
-    profiler_->pseudoStack_->pop();   // the C++ frame
-    profiler_->pseudoStack_->pop();   // the BEGIN_PSEUDO_JS frame
+    profiler_->pseudoStack_->pop();
     MOZ_ASSERT(spBefore_ == profiler_->stackPointer());
 }
 
 GeckoProfilerBaselineOSRMarker::GeckoProfilerBaselineOSRMarker(JSRuntime* rt, bool hasProfilerFrame
                                                                MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
     : profiler(&rt->geckoProfiler())
 {
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;