Commit 50d2dfca authored by oysteine's avatar oysteine Committed by Commit bot

Background tracing: Disable when highres clock is not available

R=simonhatch
BUG=548756

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

Cr-Commit-Position: refs/heads/master@{#357160}
parent 06e82753
......@@ -39,6 +39,7 @@ enum BackgroundTracingMetrics {
FINALIZATION_DISALLOWED = 6,
FINALIZATION_STARTED = 7,
FINALIZATION_COMPLETE = 8,
SCENARIO_ACTION_FAILED_LOWRES_CLOCK = 9,
NUMBER_OF_BACKGROUND_TRACING_METRICS,
};
......@@ -134,6 +135,13 @@ bool BackgroundTracingManagerImpl::SetActiveScenario(
if (is_tracing_)
return false;
// If we don't have a high resolution timer available, traces will be
// too inaccurate to be useful.
if (!base::TimeTicks::IsHighResolution()) {
RecordBackgroundTracingMetric(SCENARIO_ACTION_FAILED_LOWRES_CLOCK);
return false;
}
bool requires_anonymized_data = (data_filtering == ANONYMIZE_DATA);
// If the I/O thread isn't running, this is a startup scenario and
......
......@@ -53714,6 +53714,7 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<int value="6" label="Trace finalization disallowed"/>
<int value="7" label="Trace finalization started"/>
<int value="8" label="Trace finalization complete"/>
<int value="9" label="Scenario activation failed due to lowres clock"/>
</enum>
<enum name="BackingStoreResults" type="int">
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