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 110342 2a8fef2bd2285e5b8f41f8f53770c951bc2a78af
parent 110341 632ce3e7d3efa25a537974502ba4e5c2e55feaa0
child 110343 a57ade621efb04143daaa21c148cf4fd58605fe7
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewerstaras
bugs799638
milestone19.0a1
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) {