From e31e00c7a27c06de783c61f1dd2aa9da1d353e45 Mon Sep 17 00:00:00 2001 From: Michael Layzell Date: Tue, 8 Aug 2017 13:28:29 -0400 Subject: [PATCH] Bug 1365309 - Part 3: Reduce expected frame count for GeckoProfiler.SuspendAndSample, r=njn This is necessary as with FramePointerStackWalk if the current frame is in glibc when we suspend the target thread we sometimes can't collect more than one native frame as there are no frame pointers. We'll still collect at least one entry, so this check relaxes the assertion. MozReview-Commit-ID: IbatTQwDti1 --- tools/profiler/tests/gtest/GeckoProfiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/profiler/tests/gtest/GeckoProfiler.cpp b/tools/profiler/tests/gtest/GeckoProfiler.cpp index 27186f9a4733..8a4dfb9c64a2 100644 --- a/tools/profiler/tests/gtest/GeckoProfiler.cpp +++ b/tools/profiler/tests/gtest/GeckoProfiler.cpp @@ -770,7 +770,7 @@ void DoSuspendAndSample(int aTid, nsIThread* aThread) /* sampleNative = */ true); ASSERT_TRUE(collector.mSetIsMainThread == 1); - ASSERT_TRUE(collector.mFrames > 5); // approximate; must be > 0 + ASSERT_TRUE(collector.mFrames > 0); }), NS_DISPATCH_SYNC); }