New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 597350 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Chrome traces should contain metadata about what clock they're using

Project Member Reported by charliea@chromium.org, Mar 23 2016

Issue description

There's an ever growing number of tracing use cases where we need to sync Chrome traces with other types of traces. A few such types of traces are ETW traces (for low-level Windows information), BattOr traces (which provide device power consumption data), and ftrace traces. We're building out a clock sync architecture that will allow consumers of traces - primarily trace viewer, at this point - to consume these traces and align them based on what clock they're using.

One problem that we've run into is that Chrome has somewhat complex logic around which clock it uses, and it'd be nice for the trace consumer to know what clock was being used for a given trace without having to guess. That would allow it to safely make assumptions like "Well both ETW and Chrome were using the QueryPerformanceCounter for timestamps - it's safe to assume that we can just overlay those traces without shifting timestamps."

In order to do this, we have to do two things:

1) Add a means of retrieving some sort of "Clock ID" from TimeTicks that will return the current clock (e.g. "LINUX_CLOCK_MONOTONIC_MICROS", "WIN_QPC")
2) Add the output of this TimeTicks::ClockId() to the Chrome trace metadata section (this doc - http://bit.ly/1MCMqsv - contains all discussion re: where to include that metadata)


 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fdd7d49cc24ed079bfe164110970c25723d363a8

commit fdd7d49cc24ed079bfe164110970c25723d363a8
Author: charliea <charliea@chromium.org>
Date: Thu Mar 31 19:05:18 2016

time: Add a static TimeTicks method that returns the underlying clock

In a follow-up CL, the return value of this method will be written into
traces recorded by Chrome so that, when syncing Chrome traces with
external traces, we have more information to determine whether the two
traces use timestamps from the same underlying clock and can therefore
be combined.

BUG= 597350 

Review URL: https://codereview.chromium.org/1824673002

Cr-Commit-Position: refs/heads/master@{#384352}

[modify] https://crrev.com/fdd7d49cc24ed079bfe164110970c25723d363a8/base/time/time.h
[modify] https://crrev.com/fdd7d49cc24ed079bfe164110970c25723d363a8/base/time/time_mac.cc
[modify] https://crrev.com/fdd7d49cc24ed079bfe164110970c25723d363a8/base/time/time_posix.cc
[modify] https://crrev.com/fdd7d49cc24ed079bfe164110970c25723d363a8/base/time/time_win.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Apr 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a9c1264c13dd33d0e929b4477390d8ccda3cdd5

commit 7a9c1264c13dd33d0e929b4477390d8ccda3cdd5
Author: charliea <charliea@chromium.org>
Date: Fri Apr 01 11:57:04 2016

tracing: Add the TimeTicks clock source as trace metadata

This is useful when syncing Chrome traces with external traces because
we have more information to determine whether the two traces use
timestamps from the same underlying clock and can therefore be combined.

BUG= 597350 

Review URL: https://codereview.chromium.org/1826973004

Cr-Commit-Position: refs/heads/master@{#384555}

[modify] https://crrev.com/7a9c1264c13dd33d0e929b4477390d8ccda3cdd5/chrome/common/trace_event_args_whitelist.cc
[modify] https://crrev.com/7a9c1264c13dd33d0e929b4477390d8ccda3cdd5/content/browser/tracing/tracing_controller_impl.cc

Status: Fixed (was: Assigned)

Sign in to add a comment