summaryrefslogtreecommitdiffstats
path: root/base/profiler
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 01:27:03 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 01:27:03 +0000
commit3422af1d763d8fe33d31863ff1bd1bfe103681a1 (patch)
tree2f3b0e0f3d0783ef6b0cd547e04c73314c0e2a30 /base/profiler
parent82d9d3ac74211ae08a355a6184d156d0fd31f728 (diff)
downloadchromium_src-3422af1d763d8fe33d31863ff1bd1bfe103681a1.zip
chromium_src-3422af1d763d8fe33d31863ff1bd1bfe103681a1.tar.gz
chromium_src-3422af1d763d8fe33d31863ff1bd1bfe103681a1.tar.bz2
Enable memory profiler on Linux when TC_MALLOC is enabled.
Added a tc_malloc memory extension to get bytes allocated on current thread (GetBytesAllocatedOnCurrentThread API call). R=jam@chromium.org,jar@chromium.org BUG=139667 TEST=test about:profiler after setting the env variable CHROME_PROFILER_TIME=1. In about:profiler, it will show the memory allocated per thread. This change impacts linux only. This is same as the following previously approved CL. Added needed BASE_EXPORT for kAlternateProfilerTime and SetAlternateTimeSource. the https://chromiumcodereview.appspot.com/10820063/ Review URL: https://chromiumcodereview.appspot.com/10834199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150477 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/profiler')
-rw-r--r--base/profiler/alternate_timer.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/profiler/alternate_timer.h b/base/profiler/alternate_timer.h
index 7fd9fa2..fdc75dc 100644
--- a/base/profiler/alternate_timer.h
+++ b/base/profiler/alternate_timer.h
@@ -23,13 +23,14 @@ typedef unsigned int NowFunction();
// Environment variable name that is used to activate alternate timer profiling
// (such as using TCMalloc allocations to provide a pseudo-timer) for tasks
// instead of wall clock profiling.
-extern const char kAlternateProfilerTime[];
+BASE_EXPORT extern const char kAlternateProfilerTime[];
// Set an alternate timer function to replace the OS time function when
// 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, TimeSourceType type);
+BASE_EXPORT 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.