[tracing] Switch TracedValue to pickles: lighter and accountable
TraceValue is used pretty much everywhere in tracing.
It is conceptually similar but exposes a much simpler API of
base::Value. Until now it used base::Value under the hoods.
Problems:
- We need a way to account accurately the memory used by tracing for
the sake of memory profiling (See crbug.com/495628).
- base::Value is too complex / uses too many std::strings
(e.g., tracing doesn't need keys to be strings, just static char*)
- is very hard to predict memory usage of std::string (strongly
impl dependant)
Proposed solution:
This CL introduces a drop-in replacement for TracedValue, inspired by
the following principles:
- Be simple and small: just a pickle.
- Don't copy strings if not necessary: keep the const char* ptrs to
"quoted" static strings.
For more details see the attached bug and the design doc goo.gl/xw7tyR
BUG=495628
Review URL: https://codereview.chromium.org/
1173793003
Cr-Commit-Position: refs/heads/master@{#333932}