Bug 791404: Sample at 10ms on gonk for more realistic results. r=BenWa
authorChris Jones <jones.chris.g@gmail.com>
Mon, 24 Sep 2012 15:38:07 -0700
changeset 108061 4cf7fbb68148595cd6f87345245a93d8bcb47738
parent 108060 072674dbb5c7fefb95e2a6aa92b5e5c6fecd88b3
child 108062 d12c34bb82fa3100d0986ef5dec17e865d21e81d
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
Bug 791404: Sample at 10ms on gonk for more realistic results. r=BenWa
--- a/tools/profiler/sps_sampler.h
+++ b/tools/profiler/sps_sampler.h
@@ -84,17 +84,24 @@ extern bool stack_key_initialized;
 # define PROFILE_DEFAULT_ENTRY 1000000
 # define PROFILE_DEFAULT_ENTRY 100000
-#ifdef ANDROID
+/* A 1ms sampling interval has been shown to be a large perf hit
+ * (10fps) on memory-contrained (low-end) platforms, and additionally
+ * to yield different results from the profiler.  Where this is the
+ * important case, b2g, there are also many gecko processes which
+ * magnify these effects. */
+#elif defined(ANDROID)
 // We use a lower frequency on Android, in order to make things work
 // more smoothly on phones.  This value can be adjusted later with
 // some libunwind optimizations.
 // In one sample measurement on Galaxy Nexus, out of about 700 backtraces,
 // 60 of them took more than 25ms, and the average and standard deviation
 // were 6.17ms and 9.71ms respectively.
 // For now since we don't support stackwalking let's use 1ms since it's fast