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

Side by Side Diff: base/trace_event/memory_dump_manager.h

Issue 2760253005: memory-infra: Fill the memory dump callback result (1/2) (Closed)
Patch Set: tweak a few comments Created 3 years, 9 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 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDumpAsyncState); 290 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDumpAsyncState);
291 }; 291 };
292 292
293 static const int kMaxConsecutiveFailuresCount; 293 static const int kMaxConsecutiveFailuresCount;
294 static const char* const kSystemAllocatorPoolName; 294 static const char* const kSystemAllocatorPoolName;
295 295
296 MemoryDumpManager(); 296 MemoryDumpManager();
297 ~MemoryDumpManager() override; 297 ~MemoryDumpManager() override;
298 298
299 static void SetInstanceForTesting(MemoryDumpManager* instance); 299 static void SetInstanceForTesting(MemoryDumpManager* instance);
300 static uint32_t SumSizesInKbForPrefix(const std::string&,
Primiano Tucci (use gerrit) 2017/03/22 17:19:52 I'd call this "GetDumpsSumKb" (to make clear that
hjd 2017/03/22 19:24:20 Done.
301 const ProcessMemoryDump*);
300 static void FinalizeDumpAndAddToTrace( 302 static void FinalizeDumpAndAddToTrace(
301 std::unique_ptr<ProcessMemoryDumpAsyncState> pmd_async_state); 303 std::unique_ptr<ProcessMemoryDumpAsyncState> pmd_async_state);
302 304
303 // Internal, used only by MemoryDumpManagerDelegate. 305 // Internal, used only by MemoryDumpManagerDelegate.
304 // Creates a memory dump for the current process and appends it to the trace. 306 // Creates a memory dump for the current process and appends it to the trace.
305 // |callback| will be invoked asynchronously upon completion on the same 307 // |callback| will be invoked asynchronously upon completion on the same
306 // thread on which CreateProcessDump() was called. 308 // thread on which CreateProcessDump() was called.
307 void CreateProcessDump(const MemoryDumpRequestArgs& args, 309 void CreateProcessDump(const MemoryDumpRequestArgs& args,
308 const MemoryDumpCallback& callback); 310 const MemoryDumpCallback& callback);
309 311
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 411 }
410 412
411 private: 413 private:
412 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); 414 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate);
413 }; 415 };
414 416
415 } // namespace trace_event 417 } // namespace trace_event
416 } // namespace base 418 } // namespace base
417 419
418 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 420 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698