summaryrefslogtreecommitdiff
path: root/base/trace_event/trace_event_synthetic_delay.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/trace_event/trace_event_synthetic_delay.cc')
-rw-r--r--base/trace_event/trace_event_synthetic_delay.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/trace_event/trace_event_synthetic_delay.cc b/base/trace_event/trace_event_synthetic_delay.cc
index b6ce2845c4..cfae7435e9 100644
--- a/base/trace_event/trace_event_synthetic_delay.cc
+++ b/base/trace_event/trace_event_synthetic_delay.cc
@@ -4,6 +4,7 @@
#include "base/macros.h"
#include "base/memory/singleton.h"
+#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "base/trace_event/trace_event_synthetic_delay.h"
namespace {
@@ -80,6 +81,7 @@ void TraceEventSyntheticDelay::Begin() {
// calculation is done with a lock held, it will always be correct. The only
// downside of this is that we may fail to apply some delays when the target
// duration changes.
+ ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration");
if (!target_duration_.ToInternalValue())
return;
@@ -94,6 +96,7 @@ void TraceEventSyntheticDelay::Begin() {
void TraceEventSyntheticDelay::BeginParallel(TimeTicks* out_end_time) {
// See note in Begin().
+ ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration");
if (!target_duration_.ToInternalValue()) {
*out_end_time = TimeTicks();
return;
@@ -108,6 +111,7 @@ void TraceEventSyntheticDelay::BeginParallel(TimeTicks* out_end_time) {
void TraceEventSyntheticDelay::End() {
// See note in Begin().
+ ANNOTATE_BENIGN_RACE(&target_duration_, "Synthetic delay duration");
if (!target_duration_.ToInternalValue())
return;