| Index: base/trace_event/memory_dump_provider.h
|
| diff --git a/base/trace_event/memory_dump_provider.h b/base/trace_event/memory_dump_provider.h
|
| index 6e6551cc03988df685fb72d2e489e626ba583ab3..9fefdec5a4fd0a827017c3575b2567bd3538d612 100644
|
| --- a/base/trace_event/memory_dump_provider.h
|
| +++ b/base/trace_event/memory_dump_provider.h
|
| @@ -13,15 +13,27 @@ namespace trace_event {
|
|
|
| class ProcessMemoryDump;
|
|
|
| +// Contains information about the type of memory dump the MemoryDumpProvider
|
| +// should generate on dump request. This is to control the size of dumps
|
| +// generated.
|
| +struct MemoryDumpArgs {
|
| + enum LevelOfDetail { LEVEL_OF_DETAIL_LOW, LEVEL_OF_DETAIL_HIGH };
|
| +
|
| + LevelOfDetail level_of_detail;
|
| +};
|
| +
|
| // The contract interface that memory dump providers must implement.
|
| class BASE_EXPORT MemoryDumpProvider {
|
| public:
|
| // Called by the MemoryDumpManager when generating memory dumps.
|
| - // The embedder should return true if the |pmd| was successfully populated,
|
| - // false if something went wrong and the dump should be considered invalid.
|
| + // The |args| specify if the embedder should generate light/heavy dumps on
|
| + // dump requests. The embedder should return true if the |pmd| was
|
| + // successfully populated, false if something went wrong and the dump should
|
| + // be considered invalid.
|
| // (Note, the MemoryDumpManager has a fail-safe logic which will disable the
|
| // MemoryDumpProvider for the entire trace session if it fails consistently).
|
| - virtual bool OnMemoryDump(ProcessMemoryDump* pmd) = 0;
|
| + virtual bool OnMemoryDump(const MemoryDumpArgs& args,
|
| + ProcessMemoryDump* pmd) = 0;
|
|
|
| protected:
|
| MemoryDumpProvider() {}
|
|
|