Commit f6fd1216 authored by Tao Bai's avatar Tao Bai Committed by Commit Bot

ContentCapture: Add dedicated TraceEvent

This patch added content-capture trace event category, also traced
scheduling task and task running event.

Bug: 1006418
Change-Id: I2dbe38bbf3e09645abb6185e8efa15587ffb00ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1817282Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699899}
parent 72240395
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
X("cma") \ X("cma") \
X("compositor") \ X("compositor") \
X("content") \ X("content") \
X("content-capture") \
X("devtools") \ X("devtools") \
X("devtools.timeline") \ X("devtools.timeline") \
X("devtools.timeline.async") \ X("devtools.timeline.async") \
......
...@@ -196,7 +196,7 @@ bool ContentCaptureTask::RunInternal() { ...@@ -196,7 +196,7 @@ bool ContentCaptureTask::RunInternal() {
} }
void ContentCaptureTask::Run(TimerBase*) { void ContentCaptureTask::Run(TimerBase*) {
TRACE_EVENT0("blink", "CaptureContentTask::Run"); TRACE_EVENT0("content-capture", "RunTask");
is_scheduled_ = false; is_scheduled_ = false;
if (!RunInternal()) { if (!RunInternal()) {
ScheduleInternal(ScheduleReason::kRetryTask); ScheduleInternal(ScheduleReason::kRetryTask);
...@@ -229,6 +229,8 @@ void ContentCaptureTask::ScheduleInternal(ScheduleReason reason) { ...@@ -229,6 +229,8 @@ void ContentCaptureTask::ScheduleInternal(ScheduleReason reason) {
delay_task_->StartOneShot(delay, FROM_HERE); delay_task_->StartOneShot(delay, FROM_HERE);
is_scheduled_ = true; is_scheduled_ = true;
TRACE_EVENT_INSTANT1("content-capture", "ScheduleTask",
TRACE_EVENT_SCOPE_THREAD, "reason", reason);
} }
void ContentCaptureTask::Schedule(ScheduleReason reason) { void ContentCaptureTask::Schedule(ScheduleReason reason) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment