aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/trace/SkChromeTracingTracer.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-07-21 11:06:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-21 16:38:23 +0000
commit65e4c614f0edbcf8d05bfc2a25a6e60d277fb7df (patch)
tree4fac7baec4b6f5ace655263b65262a23cefc8f4d /tools/trace/SkChromeTracingTracer.cpp
parent57aa367aa3c5911cd4a21230799b147e44190282 (diff)
Add category support to JSON and SkDebugf tracing
Bug: skia: Change-Id: I4d0bdb9d954e49b79ace0552d7b74b36a512c00d Reviewed-on: https://skia-review.googlesource.com/25642 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/trace/SkChromeTracingTracer.cpp')
-rw-r--r--tools/trace/SkChromeTracingTracer.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/trace/SkChromeTracingTracer.cpp b/tools/trace/SkChromeTracingTracer.cpp
index aa71ff0448..4d76d2956d 100644
--- a/tools/trace/SkChromeTracingTracer.cpp
+++ b/tools/trace/SkChromeTracingTracer.cpp
@@ -27,7 +27,7 @@ SkEventTracer::Handle SkChromeTracingTracer::addTraceEvent(char phase,
char phaseString[2] = { phase, 0 };
traceEvent["ph"] = phaseString;
traceEvent["name"] = name;
- traceEvent["cat"] = "skia"; // TODO
+ traceEvent["cat"] = this->getCategoryGroupName(categoryEnabledFlag);
auto now = std::chrono::high_resolution_clock::now();
std::chrono::duration<double, std::nano> ns = now.time_since_epoch();
traceEvent["ts"] = ns.count() * 1E-3;
@@ -78,11 +78,6 @@ void SkChromeTracingTracer::updateTraceEventDuration(const uint8_t* categoryEnab
(*traceEvent)["dur"] = us - (*traceEvent)["ts"].asDouble();
}
-const uint8_t* SkChromeTracingTracer::getCategoryGroupEnabled(const char* name) {
- static uint8_t yes = SkEventTracer::kEnabledForRecording_CategoryGroupEnabledFlags;
- return &yes;
-}
-
void SkChromeTracingTracer::flush() {
SkString dirname = SkOSPath::Dirname(fFilename.c_str());
if (!sk_exists(dirname.c_str(), kWrite_SkFILE_Flag)) {