|
Fixit: Split base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks
TimeTicks was being overused for time values from three different clock
sources. This change splits the class into three separate classes: The
general-purpose monotonic time (TimeTicks), the thread-local run time
(ThreadTicks), and the global system trace time (TraceTicks).
Before this change, base::Time and base::TimeTicks had identical
comparison and math operator overloads. This change creates an internal
templated base class which all of Time, TimeTicks, ThreadTicks, and
TraceTicks subclass from; in order to de-dupe this common functionality.
Updated base/trace_event/* and a few outside-of-base uses of ThreadNow()
and NowFromSystemTraceTime() to use the new classes. Thankfully, the
compiler is now able to use type-checking to guarantee values from
different clocks are not being mixed when doing time math.
BUG= 467417
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+478 lines, -454 lines) |
Patch |
 |
M |
base/message_loop/message_pump_perftest.cc
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
base/threading/thread_perftest.cc
|
View
|
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
base/time/time.h
|
View
|
1
|
16 chunks |
+208 lines, -242 lines |
0 comments
|
Download
|
 |
M |
base/time/time.cc
|
View
|
|
4 chunks |
+21 lines, -11 lines |
0 comments
|
Download
|
 |
M |
base/time/time_mac.cc
|
View
|
|
4 chunks |
+11 lines, -7 lines |
0 comments
|
Download
|
 |
M |
base/time/time_posix.cc
|
View
|
|
3 chunks |
+16 lines, -14 lines |
0 comments
|
Download
|
 |
M |
base/time/time_unittest.cc
|
View
|
|
3 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
base/time/time_win.cc
|
View
|
|
9 chunks |
+21 lines, -19 lines |
0 comments
|
Download
|
 |
M |
base/time/time_win_unittest.cc
|
View
|
1
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/trace_event/trace_event.h
|
View
|
1
|
14 chunks |
+28 lines, -14 lines |
0 comments
|
Download
|
 |
M |
base/trace_event/trace_event_android.cc
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
base/trace_event/trace_event_impl.h
|
View
|
|
10 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
 |
M |
base/trace_event/trace_event_impl.cc
|
View
|
|
12 chunks |
+24 lines, -24 lines |
0 comments
|
Download
|
 |
M |
base/trace_event/trace_event_unittest.cc
|
View
|
|
4 chunks |
+8 lines, -12 lines |
0 comments
|
Download
|
 |
M |
cc/debug/lap_timer.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cc/debug/lap_timer.cc
|
View
|
|
2 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
 |
M |
cc/debug/rendering_stats_instrumentation.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/debug/rendering_stats_instrumentation.cc
|
View
|
|
1 chunk |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
components/tracing/child_trace_message_filter.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/tracing/child_trace_message_filter.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/tracing/tracing_messages.h
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/tracing/etw_system_event_consumer_win.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/tracing/trace_message_filter.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/child/blink_platform_impl.cc
|
View
|
1
2
|
3 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/renderer/devtools/v8_sampling_profiler.cc
|
View
|
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
gpu/perftests/measurements.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
gpu/perftests/measurements.cc
|
View
|
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
ipc/ipc_message_utils.h
|
View
|
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ipc/ipc_message_utils.cc
|
View
|
|
1 chunk |
+19 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ppapi/shared_impl/ppb_trace_event_impl.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/events/latency_info.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gl/angle_platform_impl.cc
|
View
|
1
2
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gpu_timing.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 5 (2 generated)
|