Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1102)

Unified Diff: base/profiler/alternate_timer.h

Issue 10225017: Explicitly track the time source type in base/profiler/alternate_timer.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed a spot.. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/allocator/allocator_shim.cc ('k') | base/profiler/alternate_timer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/alternate_timer.h
diff --git a/base/profiler/alternate_timer.h b/base/profiler/alternate_timer.h
index 778dc62e658722595492b505dfe6d2fce49ca0ca..5397e1957bd151df64f36e346dafe0ce412b474d 100644
--- a/base/profiler/alternate_timer.h
+++ b/base/profiler/alternate_timer.h
@@ -12,6 +12,11 @@
namespace tracked_objects {
+BASE_EXPORT enum TimeSourceType {
+ TIME_SOURCE_TYPE_WALL_TIME,
+ TIME_SOURCE_TYPE_TCMALLOC
+};
+
// Provide type for an alternate timer function.
typedef unsigned int NowFunction();
@@ -24,11 +29,14 @@ extern const char kAlternateProfilerTime[];
// profiling. Typically this is called by an allocator that is providing a
// function that indicates how much memory has been allocated on any given
// thread.
-void SetAlternateTimeSource(NowFunction* now_function);
+void SetAlternateTimeSource(NowFunction* now_function, TimeSourceType type);
// Gets the pointer to a function that was set via SetAlternateTimeSource().
// Returns NULL if no set was done prior to calling GetAlternateTimeSource.
-BASE_EXPORT NowFunction* GetAlternateTimeSource();
jar (doing other things) 2012/04/26 00:00:11 I suspect you still need to say BASE_EXPORT here.
Ilya Sherman 2012/04/26 00:05:46 I don't believe BASE_EXPORT is needed here anymore
+NowFunction* GetAlternateTimeSource();
+
+// Returns the type of the currently set time source.
+BASE_EXPORT TimeSourceType GetTimeSourceType();
} // namespace tracked_objects
« no previous file with comments | « base/allocator/allocator_shim.cc ('k') | base/profiler/alternate_timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698