Bug 799638 - Use stackwalk on startup profiling for win/mac. r=ehsan
authorBenoit Girard <b56girard@gmail.com>
Sat, 13 Oct 2012 21:03:09 -0400
changeset 118144 632ce3e7d3efa25a537974502ba4e5c2e55feaa0
parent 118143 f82c3f3bb6548edf4840ca7cafa7e0a9937dadb4
child 118145 2a8fef2bd2285e5b8f41f8f53770c951bc2a78af
push id1997
push userakeybl@mozilla.com
push dateMon, 07 Jan 2013 21:25:26 +0000
treeherdermozilla-beta@4baf45cdcf21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs799638
milestone19.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 799638 - Use stackwalk on startup profiling for win/mac. r=ehsan
tools/profiler/TableTicker.cpp
--- a/tools/profiler/TableTicker.cpp
+++ b/tools/profiler/TableTicker.cpp
@@ -1005,19 +1005,23 @@ void mozilla_sampler_init()
   // We can't open pref so we use an environment variable
   // to know if we should trigger the profiler on startup
   // NOTE: Default
   const char *val = PR_GetEnv("MOZ_PROFILER_STARTUP");
   if (!val || !*val) {
     return;
   }
 
-  const char* features = "js";
+  const char* features[] = {"js"
+#if defined(XP_WIN) || defined(XP_MACOSX)
+                         , "stackwalk"
+#endif
+                         };
   mozilla_sampler_start(PROFILE_DEFAULT_ENTRY, PROFILE_DEFAULT_INTERVAL,
-                        &features, 1);
+                        features, mozilla::ArrayLength(features));
 }
 
 void mozilla_sampler_deinit()
 {
   mozilla_sampler_stop();
   // We can't delete the Stack because we can be between a
   // sampler call_enter/call_exit point.
   // TODO Need to find a safe time to delete Stack