skia2/tools/trace
Brian Osman b6f8212bff Optimize the size of our JSON
Catapult (Chrome tracing) has a hard upper limit of 256 MB of JSON data.
This is independent of the number of events, because V8 can't store a
single string longer than that. Before these changes, longer traces
(eg all GL GMs, which was my test case) would be much larger (306 MB).

This CL includes four changes that help to reduce the text size:

1) Offset timestamps (saved 7.3 MB)
2) Limit timestamps and durations to 3 digits (saved 10.7 MB)
3) Shorten thread IDs (saved 7.2 MB)
4) Omit categories from JSON (saved 25.7 MB)

Note that category filtering still works, this just prevents us from
writing the categories to the JSON, which was of limited value.

At this point, my 306 MB file is now 255.3 MB, and loads.

Bug: skia:
Change-Id: Iaafc84025ddd52904f1ce9c1c2e9cbca65113079
Reviewed-on: https://skia-review.googlesource.com/35523
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-17 11:51:26 +00:00
..
SkChromeTracingTracer.cpp Optimize the size of our JSON 2017-08-17 11:51:26 +00:00
SkChromeTracingTracer.h Optimize the size of our JSON 2017-08-17 11:51:26 +00:00
SkDebugfTracer.cpp Tracing cleanup and bugfixes 2017-07-21 20:57:27 +00:00
SkDebugfTracer.h Add category support to JSON and SkDebugf tracing 2017-07-21 16:38:23 +00:00
SkEventTracingPriv.cpp Add --traceMatch argument to filter tracing categories 2017-07-26 20:12:22 +00:00
SkEventTracingPriv.h ok, basic tracing support 2017-07-24 19:22:05 +00:00