tracing: split out the CategoryRegistry from the TraceLog

Changes introduced by this CL:
 - Split out the category logic out of the TraceLog into CategoryRegistry.
   Makes it easier to unbundle, reuse and reason about.

 - Get rid of the parallel arrays for tracking names, filters and state
   of each category and switch them to one array of struct. This not
   only makes the code easier to read, but also opens the way for
   having categories defined at compile time that don't need any
   lazy initialization of the "enabled" ptr.

 - Naming cleanup: the term "category group" has always been confusing.
   All it does is reflecting a subtle implementation detail (the fact
   that a category name can be "cat1,cat2") which is quite irrelevant
   from a functional viewpoint.

BUG=659689

Review-Url: https://codereview.chromium.org/2452063003
Cr-Original-Commit-Position: refs/heads/master@{#431300}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 094ac7f87d78a80e3934e148855a908977559166
1 file changed
tree: e9b85fe09b738c31d3d10ed37802c5902c44ee73
  1. tools/