Bug 799638 - Use timeline events as profiler startup markers. r=taras
authorBenoit Girard <b56girard@gmail.com>
Sat, 13 Oct 2012 21:03:18 -0400
changeset 118145 2a8fef2bd2285e5b8f41f8f53770c951bc2a78af
parent 118144 632ce3e7d3efa25a537974502ba4e5c2e55feaa0
child 118146 a57ade621efb04143daaa21c148cf4fd58605fe7
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)
reviewerstaras
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 timeline events as profiler startup markers. r=taras
toolkit/components/startup/StartupTimeline.h
--- a/toolkit/components/startup/StartupTimeline.h
+++ b/toolkit/components/startup/StartupTimeline.h
@@ -18,16 +18,17 @@ mozilla_StartupTimeline_Event(LIBRARIES_
 mozilla_StartupTimeline_Event(FIRST_LOAD_URI, "firstLoadURI")
 #else
 
 #ifndef mozilla_StartupTimeline
 #define mozilla_StartupTimeline
 
 #include "prtime.h"
 #include "nscore.h"
+#include "sampler.h"
 
 #ifdef MOZ_LINKER
 extern "C" {
 /* This symbol is resolved by the custom linker. The function it resolves
  * to dumps some statistics about the linker at the key events recorded
  * by the startup timeline. */
 extern void __moz_linker_stats(const char *str)
 NS_VISIBILITY_DEFAULT __attribute__((weak));
@@ -53,16 +54,17 @@ public:
     return sStartupTimeline[ev];
   }
 
   static const char *Describe(Event ev) {
     return sStartupTimelineDesc[ev];
   }
 
   static void Record(Event ev, PRTime when = PR_Now()) {
+    SAMPLE_MARKER(Describe(ev));
     sStartupTimeline[ev] = when;
 #ifdef MOZ_LINKER
     if (__moz_linker_stats)
       __moz_linker_stats(Describe(ev));
 #endif
   }
 
   static void RecordOnce(Event ev) {