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

Unified Diff: base/trace_event/malloc_dump_provider.cc

Issue 1410353005: Add generic.total_physical_bytes property to MallocExtension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache2
Patch Set: Add in readme. Created 5 years, 2 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 | « no previous file | third_party/tcmalloc/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/malloc_dump_provider.cc
diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc
index 6f15a04cfa4c14a6ef0e45de170dc8001d231188..914c684f20015a1e0291daf796e142d5fe25d227 100644
--- a/base/trace_event/malloc_dump_provider.cc
+++ b/base/trace_event/malloc_dump_provider.cc
@@ -40,23 +40,13 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
if (get_property_function) {
// If the function is not null then tcmalloc is used. See
// MallocExtension::getNumericProperty.
- size_t pageheap_unmapped_bytes = 0;
bool res = get_property_function("generic.heap_size", &total_virtual_size);
DCHECK(res);
- res = get_property_function("tcmalloc.pageheap_unmapped_bytes",
- &pageheap_unmapped_bytes);
+ res = get_property_function("generic.total_physical_bytes", &resident_size);
DCHECK(res);
res = get_property_function("generic.current_allocated_bytes",
&allocated_objects_size);
DCHECK(res);
-
- // Please see TCMallocImplementation::GetStats implementation for
- // explanation
- // about this math.
- // TODO(ssid): Usage of metadata is not included in page heap bytes
- // (crbug.com/546491). MallocExtension::GetNumericProperty will be extended
- // to get this value.
- resident_size = total_virtual_size - pageheap_unmapped_bytes;
} else {
struct mallinfo info = mallinfo();
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
« no previous file with comments | « no previous file | third_party/tcmalloc/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698