[tracing] Fix MemoryDumpManager periodic scheduler and improve tests
commit49b700716fb5d9a306237df1ed00e162d89b3a4c
authorprimiano <primiano@chromium.org>
Wed, 9 Sep 2015 18:33:29 +0000 (9 11:33 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 9 Sep 2015 18:34:17 +0000 (9 18:34 +0000)
treed0737c8b73531f2c023e3d2e40c0d624969858a1
parent301a12fb905b311cb68a7d0a32dd2a6c24d885f9
[tracing] Fix MemoryDumpManager periodic scheduler and improve tests

This a cleanup CL in preparation of next changes to memory-infra.
- Add much more coverage to the TraceConfig-related tests as this is
  very critical to avoid regressions in either the chrome://tracing
  UI and telemetry w.r.t. periodic dumps.
- Refactor the tests to use sane and readable in-line expectations
  instead of the awkward back and forths between test fixtures
  and MockDumpProvvider.
- Minor fix in the loogic which schedules periodic dumps in the
  MemoryDumpManager. If ligh_period=1ms and heavy_period=4ms,
  the sequence sholud be HLLLHLLL, not HLLLLHLLLL as it was
  before this change.
- Normalize the "virtual_size" column in the malloc dump provider.

BUG=518823,499731

Review URL: https://codereview.chromium.org/1306843006

Cr-Commit-Position: refs/heads/master@{#347964}
base/trace_event/malloc_dump_provider.cc
base/trace_event/memory_dump_manager.cc
base/trace_event/memory_dump_manager.h
base/trace_event/memory_dump_manager_unittest.cc