Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: base/trace_event/trace_event_impl.cc

Issue 2142023003: Binds two IDs together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/trace_event/trace_event.h ('k') | base/trace_event/trace_event_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/trace_event_impl.h" 5 #include "base/trace_event/trace_event_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/json/string_escape.h" 10 #include "base/json/string_escape.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 if (flags_ & TRACE_EVENT_FLAG_HAS_ID) { 361 if (flags_ & TRACE_EVENT_FLAG_HAS_ID) {
362 if (scope_ != trace_event_internal::kGlobalScope) 362 if (scope_ != trace_event_internal::kGlobalScope)
363 StringAppendF(out, ",\"scope\":\"%s\"", scope_); 363 StringAppendF(out, ",\"scope\":\"%s\"", scope_);
364 StringAppendF(out, ",\"id\":\"0x%" PRIx64 "\"", static_cast<uint64_t>(id_)); 364 StringAppendF(out, ",\"id\":\"0x%" PRIx64 "\"", static_cast<uint64_t>(id_));
365 } 365 }
366 366
367 if (flags_ & TRACE_EVENT_FLAG_BIND_TO_ENCLOSING) 367 if (flags_ & TRACE_EVENT_FLAG_BIND_TO_ENCLOSING)
368 StringAppendF(out, ",\"bp\":\"e\""); 368 StringAppendF(out, ",\"bp\":\"e\"");
369 369
370 if ((flags_ & TRACE_EVENT_FLAG_FLOW_OUT) || 370 if ((flags_ & TRACE_EVENT_FLAG_FLOW_OUT) ||
371 (flags_ & TRACE_EVENT_FLAG_FLOW_IN)) { 371 (flags_ & TRACE_EVENT_FLAG_FLOW_IN) ||
372 phase_ == TRACE_EVENT_PHASE_BIND_IDS) {
372 StringAppendF(out, ",\"bind_id\":\"0x%" PRIx64 "\"", 373 StringAppendF(out, ",\"bind_id\":\"0x%" PRIx64 "\"",
373 static_cast<uint64_t>(bind_id_)); 374 static_cast<uint64_t>(bind_id_));
374 } 375 }
375 if (flags_ & TRACE_EVENT_FLAG_FLOW_IN) 376 if (flags_ & TRACE_EVENT_FLAG_FLOW_IN)
376 StringAppendF(out, ",\"flow_in\":true"); 377 StringAppendF(out, ",\"flow_in\":true");
377 if (flags_ & TRACE_EVENT_FLAG_FLOW_OUT) 378 if (flags_ & TRACE_EVENT_FLAG_FLOW_OUT)
378 StringAppendF(out, ",\"flow_out\":true"); 379 StringAppendF(out, ",\"flow_out\":true");
379 380
380 // Instant events also output their scope. 381 // Instant events also output their scope.
381 if (phase_ == TRACE_EVENT_PHASE_INSTANT) { 382 if (phase_ == TRACE_EVENT_PHASE_INSTANT) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 AppendValueAsJSON(arg_types_[i], arg_values_[i], &value_as_text); 418 AppendValueAsJSON(arg_types_[i], arg_values_[i], &value_as_text);
418 419
419 *out << value_as_text; 420 *out << value_as_text;
420 } 421 }
421 *out << "}"; 422 *out << "}";
422 } 423 }
423 } 424 }
424 425
425 } // namespace trace_event 426 } // namespace trace_event
426 } // namespace base 427 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_event.h ('k') | base/trace_event/trace_event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698