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

Side by Side Diff: base/trace_event/malloc_dump_provider.cc

Issue 1546033002: Switch to standard integer types in base/trace_event/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/malloc_dump_provider.h" 5 #include "base/trace_event/malloc_dump_provider.h"
6 6
7 #include <stddef.h>
8
9 #include "base/allocator/allocator_extension.h"
10 #include "base/trace_event/process_memory_dump.h"
11 #include "build/build_config.h"
12
7 #if defined(OS_MACOSX) 13 #if defined(OS_MACOSX)
8 #include <malloc/malloc.h> 14 #include <malloc/malloc.h>
9 #else 15 #else
10 #include <malloc.h> 16 #include <malloc.h>
11 #endif 17 #endif
12 18
13 #include "base/allocator/allocator_extension.h"
14 #include "base/trace_event/process_memory_dump.h"
15
16 namespace base { 19 namespace base {
17 namespace trace_event { 20 namespace trace_event {
18 21
19 // static 22 // static
20 const char MallocDumpProvider::kAllocatedObjects[] = "malloc/allocated_objects"; 23 const char MallocDumpProvider::kAllocatedObjects[] = "malloc/allocated_objects";
21 24
22 // static 25 // static
23 MallocDumpProvider* MallocDumpProvider::GetInstance() { 26 MallocDumpProvider* MallocDumpProvider::GetInstance() {
24 return Singleton<MallocDumpProvider, 27 return Singleton<MallocDumpProvider,
25 LeakySingletonTraits<MallocDumpProvider>>::get(); 28 LeakySingletonTraits<MallocDumpProvider>>::get();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 other_dump->AddScalar(MemoryAllocatorDump::kNameSize, 94 other_dump->AddScalar(MemoryAllocatorDump::kNameSize,
92 MemoryAllocatorDump::kUnitsBytes, 95 MemoryAllocatorDump::kUnitsBytes,
93 resident_size - allocated_objects_size); 96 resident_size - allocated_objects_size);
94 } 97 }
95 98
96 return true; 99 return true;
97 } 100 }
98 101
99 } // namespace trace_event 102 } // namespace trace_event
100 } // namespace base 103 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/java_heap_dump_provider_android.h ('k') | base/trace_event/memory_allocator_dump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698