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

Unified Diff: third_party/tcmalloc/chromium/src/thread_cache.cc

Issue 9212025: Support use of third party time function to profiler (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « third_party/tcmalloc/chromium/src/thread_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/thread_cache.cc
===================================================================
--- third_party/tcmalloc/chromium/src/thread_cache.cc (revision 121705)
+++ third_party/tcmalloc/chromium/src/thread_cache.cc (working copy)
@@ -103,6 +103,7 @@
void ThreadCache::Init(pthread_t tid) {
size_ = 0;
+ total_bytes_allocated_ = 0;
max_size_ = 0;
IncreaseCacheLimitLocked();
@@ -303,6 +304,11 @@
return sampler_.GetSamplePeriod();
}
+// static
+unsigned int ThreadCache::GetBytesAllocatedOnCurrentThread() {
+ return ThreadCache::GetThreadHeap()->GetTotalBytesAllocated();
+}
+
void ThreadCache::InitModule() {
SpinLockHolder h(Static::pageheap_lock());
if (!phinited) {
« no previous file with comments | « third_party/tcmalloc/chromium/src/thread_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698