Index: base/profiler/scoped_tracker.h |
diff --git a/base/profiler/scoped_tracker.h b/base/profiler/scoped_tracker.h |
index a1885571351a7a7ca31a3d63e80342743b0d220f..7c452232f3816b5f2766aeb53d4743888316458a 100644 |
--- a/base/profiler/scoped_tracker.h |
+++ b/base/profiler/scoped_tracker.h |
@@ -19,6 +19,22 @@ namespace tracked_objects { |
// ScopedTracker instruments a region within the code if the instrumentation is |
// enabled. It can be used, for example, to find out if a source of jankiness is |
// inside the instrumented code region. |
+// Details: |
+// 1. This class creates a task (like ones created by PostTask calls or IPC |
+// message handlers). This task can be seen in chrome://profiler and is sent as |
+// a part of profiler data to the UMA server. See profiler_event.proto. |
+// 2. That task extends from the object's constructor to its destructor |
Mark Mentovai
2014/11/04 20:53:41
I had to read this a few times to make maximum sen
vadimt
2014/11/04 21:11:14
Done.
|
+// executions. |
+// 3. The execution time associated with the task is the wallclock time between |
+// its constructor and destructor, minus wallclock times of directly nested |
+// tasks. |
+// 4. Task creation that this class utilizes was highly optimized by jar@. |
Mark Mentovai
2014/11/04 20:53:41
Only if jar is OK being called out by name.
vadimt
2014/11/04 21:11:14
Done.
|
+// 5. The class doesn't create a task unless this was enabled for the current |
+// process. Search for ScopedTracker::Enable for the current list of processes |
+// and channels where it's activated. |
+// 6. The class is designed for temporarily instrumenting code to find |
+// performance problems, after which the instrumentation has to be removed. |
Mark Mentovai
2014/11/04 20:53:42
Make this stronger: “has to be”→“must”.
vadimt
2014/11/04 21:11:14
Done.
|
+// However, in rare cases it might be added permanently, as an exception. |
Mark Mentovai
2014/11/04 20:53:42
This is kind of wishy-washy. If there are cases wh
vadimt
2014/11/04 21:11:14
Let's remove for now. If I or someone else wants t
|
class BASE_EXPORT ScopedTracker { |
public: |
ScopedTracker(const Location& location); |