TaskTracer: Difference between revisions

/* Labels
(Bug 1332577 is removing mozilla_sampler_save_profile_to_file_async and you now need to call profiler_save_profile_to_file_async directly.)
(/* Labels)
 
(2 intermediate revisions by the same user not shown)
Line 116: Line 116:


   console.log("#tt# Log message"); // #tt# is the prefix.
   console.log("#tt# Log message"); // #tt# is the prefix.
For the case of labeling at begin and end of a scope, |AutoScopedLabel| is a helper class to do that.
  {
  #ifdef MOZ_TASK_TRACER
    AutoScopedLabel label("Event [%s] ...", str...);  // label "Begin Event [...]..."
  #endif
    // do something ....
  } // label "End Event [...]..."
The "Begin ..." label would be added when the instance of |AutoScopedLabel| was created.  And, "End ..." label would be added when the instance was destroyed.


== DESIGN ==
== DESIGN ==
Confirmed users
398

edits