Bug 1134515 - Ensure SPSBaselineOSRMarker checks pseudostack size properly. r=shu, a=sledru
authorKannan Vijayan <kvijayan@mozilla.com>
Thu, 12 Mar 2015 12:13:16 -0400
changeset 258429 10c3198eb453
parent 258428 7efd806788be
child 258430 5f042fe29707
push id4668
push userryanvm@gmail.com
push date2015-04-13 16:23 +0000
treeherdermozilla-beta@002faed66e96 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu, sledru
bugs1134515
milestone38.0
Bug 1134515 - Ensure SPSBaselineOSRMarker checks pseudostack size properly. r=shu, a=sledru
js/src/vm/SPSProfiler.cpp
--- a/js/src/vm/SPSProfiler.cpp
+++ b/js/src/vm/SPSProfiler.cpp
@@ -353,17 +353,19 @@ SPSEntryMarker::~SPSEntryMarker()
     MOZ_ASSERT(size_before == *profiler->size_);
 }
 
 SPSBaselineOSRMarker::SPSBaselineOSRMarker(JSRuntime* rt, bool hasSPSFrame
                                            MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
     : profiler(&rt->spsProfiler)
 {
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;
-    if (!hasSPSFrame || !profiler->enabled()) {
+    if (!hasSPSFrame || !profiler->enabled() ||
+        profiler->size() >= profiler->maxSize())
+    {
         profiler = nullptr;
         return;
     }
 
     size_before = profiler->size();
     if (profiler->size() == 0)
         return;