Bug 802333 - Reduce the default profile size for ARMv6 devices. r=blassey
authorBenoit Girard <b56girard@gmail.com>
Thu, 18 Oct 2012 11:12:53 -0400
changeset 110805 cb9400fcae84c6f63733cfa26f508920f6ca4d52
parent 110804 f5bbdc2a1b3d01aaf1332f68352ce2273c862293
child 110806 06777f847494fa67e9bd8f41dd9e3e8181b98075
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersblassey
bugs802333
milestone19.0a1
Bug 802333 - Reduce the default profile size for ARMv6 devices. r=blassey
tools/profiler/Makefile.in
tools/profiler/sps_sampler.h
--- a/tools/profiler/Makefile.in
+++ b/tools/profiler/Makefile.in
@@ -22,16 +22,20 @@ EXPORTS += \
   shared-libraries.h \
   $(NULL)
 
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/mozglue/linker \
   -I$(topsrcdir)/ipc/chromium/src \
   $(NULL)
 
+ifneq (,$(filter armeabi,$(ANDROID_CPU_ARCH)))
+DEFINES += -DARCH_ARMV6
+endif
+
 ifneq (,$(MOZ_PROFILING))
 ifneq (,$(filter Android,$(OS_TARGET)))
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/tools/profiler/libunwind/src/include \
   -I$(DEPTH)/tools/profiler/libunwind/src/include \
   $(NULL)
 
 SHARED_LIBRARY_LIBS += \
--- a/tools/profiler/sps_sampler.h
+++ b/tools/profiler/sps_sampler.h
@@ -78,17 +78,17 @@ extern bool stack_key_initialized;
 
 /* FIXME/bug 789667: memory constraints wouldn't much of a problem for
  * this small a sample buffer size, except that serializing the
  * profile data is extremely, unnecessarily memory intensive. */
 #ifdef MOZ_WIDGET_GONK
 # define PLATFORM_LIKELY_MEMORY_CONSTRAINED
 #endif
 
-#ifndef PLATFORM_LIKELY_MEMORY_CONSTRAINED
+#if !defined(PLATFORM_LIKELY_MEMORY_CONSTRAINED) && !defined(ARCH_ARMV6)
 # define PROFILE_DEFAULT_ENTRY 1000000
 #else
 # define PROFILE_DEFAULT_ENTRY 100000
 #endif
 
 #if defined(PLATFORM_LIKELY_MEMORY_CONSTRAINED)
 /* A 1ms sampling interval has been shown to be a large perf hit
  * (10fps) on memory-contrained (low-end) platforms, and additionally