diff options
author | ssid <ssid@chromium.org> | 2015-08-06 06:01:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-06 13:02:02 +0000 |
commit | 90694aeec592b22686ad54bc1a225c2b44cc468e (patch) | |
tree | f9f505dc2d345162f16f5552367ff49fdd833916 /skia | |
parent | d369f9805ca82ca90b6b618b45ccc4af27d574a6 (diff) | |
download | chromium_src-90694aeec592b22686ad54bc1a225c2b44cc468e.zip chromium_src-90694aeec592b22686ad54bc1a225c2b44cc468e.tar.gz chromium_src-90694aeec592b22686ad54bc1a225c2b44cc468e.tar.bz2 |
[tracing] Introduce MemoryDumpArgs to enable light and heavy dumps
The memory dump providers dump a lot of details at each dump which
causes the trace size to be huge. So, this CL introduces MemoryDumpArgs
that will be passed to each DumpProvider as an argument of OnMemoryDump.
The args specify a high or low level of detail. This provides a means to
request a light or heavy dump from the providers when necessary.
TBR=reed@google.com, jam@chromium.org
BUG=499731
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1262333005
Cr-Commit-Position: refs/heads/master@{#342103}
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/skia_memory_dump_provider.cc | 1 | ||||
-rw-r--r-- | skia/ext/skia_memory_dump_provider.h | 1 | ||||
-rw-r--r-- | skia/ext/skia_memory_dump_provider_unittest.cc | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/skia/ext/skia_memory_dump_provider.cc b/skia/ext/skia_memory_dump_provider.cc index a7c445f..3944ad4 100644 --- a/skia/ext/skia_memory_dump_provider.cc +++ b/skia/ext/skia_memory_dump_provider.cc @@ -23,6 +23,7 @@ SkiaMemoryDumpProvider::SkiaMemoryDumpProvider() {} SkiaMemoryDumpProvider::~SkiaMemoryDumpProvider() {} bool SkiaMemoryDumpProvider::OnMemoryDump( + const base::trace_event::MemoryDumpArgs& args, base::trace_event::ProcessMemoryDump* process_memory_dump) { auto font_mad = process_memory_dump->CreateAllocatorDump("skia/sk_font_cache"); diff --git a/skia/ext/skia_memory_dump_provider.h b/skia/ext/skia_memory_dump_provider.h index 65e732b..e98ea2f 100644 --- a/skia/ext/skia_memory_dump_provider.h +++ b/skia/ext/skia_memory_dump_provider.h @@ -18,6 +18,7 @@ class SK_API SkiaMemoryDumpProvider // base::trace_event::MemoryDumpProvider implementation: bool OnMemoryDump( + const base::trace_event::MemoryDumpArgs& args, base::trace_event::ProcessMemoryDump* process_memory_dump) override; private: diff --git a/skia/ext/skia_memory_dump_provider_unittest.cc b/skia/ext/skia_memory_dump_provider_unittest.cc index bea4a8b..3e38022 100644 --- a/skia/ext/skia_memory_dump_provider_unittest.cc +++ b/skia/ext/skia_memory_dump_provider_unittest.cc @@ -11,8 +11,10 @@ namespace skia { TEST(SkiaMemoryDumpProviderTest, OnMemoryDump) { scoped_ptr<base::trace_event::ProcessMemoryDump> process_memory_dump( new base::trace_event::ProcessMemoryDump(nullptr)); + base::trace_event::MemoryDumpArgs dump_args = { + base::trace_event::MemoryDumpArgs::LEVEL_OF_DETAIL_HIGH}; SkiaMemoryDumpProvider::GetInstance()->OnMemoryDump( - process_memory_dump.get()); + dump_args, process_memory_dump.get()); ASSERT_TRUE(process_memory_dump->GetAllocatorDump("skia/sk_font_cache")); ASSERT_TRUE(process_memory_dump->GetAllocatorDump("skia/sk_resource_cache")); |