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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/child/idle_helper.cc

Issue 2359503002: Let TRACE_EVENT_XXX_WITH_TIMESTAMP accept TimeTicks instead of int64_t (Closed)
Patch Set: Rebase Created 4 years, 3 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 | « third_party/WebKit/Source/platform/TraceEvent.h ('k') | ui/events/latency_info.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "platform/scheduler/child/idle_helper.h" 5 #include "platform/scheduler/child/idle_helper.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "platform/scheduler/base/real_time_domain.h" 10 #include "platform/scheduler/base/real_time_domain.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 "old_state", 411 "old_state",
412 IdleHelper::IdlePeriodStateToString(idle_period_state_), 412 IdleHelper::IdlePeriodStateToString(idle_period_state_),
413 "new_state", IdleHelper::IdlePeriodStateToString(new_state)); 413 "new_state", IdleHelper::IdlePeriodStateToString(new_state));
414 414
415 if (idle_period_trace_event_started_ && running_idle_task_for_tracing_ && 415 if (idle_period_trace_event_started_ && running_idle_task_for_tracing_ &&
416 !new_running_idle_task) { 416 !new_running_idle_task) {
417 running_idle_task_for_tracing_ = false; 417 running_idle_task_for_tracing_ = false;
418 if (!idle_period_deadline_.is_null() && now > idle_period_deadline_) { 418 if (!idle_period_deadline_.is_null() && now > idle_period_deadline_) {
419 TRACE_EVENT_ASYNC_STEP_INTO_WITH_TIMESTAMP0( 419 TRACE_EVENT_ASYNC_STEP_INTO_WITH_TIMESTAMP0(
420 tracing_category_, idle_period_tracing_name_, this, "DeadlineOverrun", 420 tracing_category_, idle_period_tracing_name_, this, "DeadlineOverrun",
421 std::max(idle_period_deadline_, last_idle_task_trace_time_) 421 std::max(idle_period_deadline_, last_idle_task_trace_time_));
422 .ToInternalValue());
423 } 422 }
424 } 423 }
425 424
426 if (IsInIdlePeriod(new_state)) { 425 if (IsInIdlePeriod(new_state)) {
427 if (!idle_period_trace_event_started_) { 426 if (!idle_period_trace_event_started_) {
428 idle_period_trace_event_started_ = true; 427 idle_period_trace_event_started_ = true;
429 TRACE_EVENT_ASYNC_BEGIN1(tracing_category_, idle_period_tracing_name_, 428 TRACE_EVENT_ASYNC_BEGIN1(tracing_category_, idle_period_tracing_name_,
430 this, "idle_period_length_ms", 429 this, "idle_period_length_ms",
431 (new_deadline - now).ToInternalValue()); 430 (new_deadline - now).ToInternalValue());
432 } 431 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 case IdlePeriodState::IN_LONG_IDLE_PERIOD_PAUSED: 467 case IdlePeriodState::IN_LONG_IDLE_PERIOD_PAUSED:
469 return "in_long_idle_period_paused"; 468 return "in_long_idle_period_paused";
470 default: 469 default:
471 NOTREACHED(); 470 NOTREACHED();
472 return nullptr; 471 return nullptr;
473 } 472 }
474 } 473 }
475 474
476 } // namespace scheduler 475 } // namespace scheduler
477 } // namespace blink 476 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/TraceEvent.h ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698