Bug 1303277 - Adjust the refresh driver warning threshold in function of whether valgrind is running rather than just the build target. r=nical.
authorJulian Seward <jseward@acm.org>
Thu, 06 Oct 2016 13:27:33 +0200
changeset 316807 e00a24772316bfdd3f89f769653e4564271c8e2d
parent 316806 0a6dfc47275bccf2424287ee7c562aeea84c10d9
child 316808 71808c547e9c2877d2d24a534e0b608ed2c053c4
push id30783
push userphilringnalda@gmail.com
push dateFri, 07 Oct 2016 02:58:32 +0000
treeherdermozilla-central@a5b04b518afe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1303277
milestone52.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 1303277 - Adjust the refresh driver warning threshold in function of whether valgrind is running rather than just the build target. r=nical.
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -79,22 +79,26 @@ static mozilla::LazyLogModule sRefreshDr
 
 #define DEFAULT_THROTTLED_FRAME_RATE 1
 #define DEFAULT_RECOMPUTE_VISIBILITY_INTERVAL_MS 1000
 // after 10 minutes, stop firing off inactive timers
 #define DEFAULT_INACTIVE_TIMER_DISABLE_SECONDS 600
 
 // The number of seconds spent skipping frames because we are waiting for the compositor
 // before logging.
-#ifdef MOZ_VALGRIND
-#define REFRESH_WAIT_WARNING 10
-#elif defined(DEBUG) || defined(MOZ_ASAN)
-#define REFRESH_WAIT_WARNING 5
+#if defined(MOZ_ASAN)
+# define REFRESH_WAIT_WARNING 5
+#elif defined(DEBUG) && !defined(MOZ_VALGRIND)
+# define REFRESH_WAIT_WARNING 5
+#elif defined(DEBUG) && defined(MOZ_VALGRIND)
+# define REFRESH_WAIT_WARNING (RUNNING_ON_VALGRIND ? 20 : 5)
+#elif defined(MOZ_VALGRIND)
+# define REFRESH_WAIT_WARNING (RUNNING_ON_VALGRIND ? 10 : 1)
 #else
-#define REFRESH_WAIT_WARNING 1
+# define REFRESH_WAIT_WARNING 1
 #endif
 
 namespace {
   // `true` if we are currently in jank-critical mode.
   //
   // In jank-critical mode, any iteration of the event loop that takes
   // more than 16ms to compute will cause an ongoing animation to miss
   // frames.