Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: chrome/browser/resources/tracing/linux_perf_importer.js

Issue 10137006: Allow linux trace events to not be time-shifted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/tracing/linux_perf_importer_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/tracing/linux_perf_importer.js
diff --git a/chrome/browser/resources/tracing/linux_perf_importer.js b/chrome/browser/resources/tracing/linux_perf_importer.js
index 56c77a2863dbc4fa184a6fef31aa66ddcdb5eaf6..ffeb5a732b3d09eb00bea37f6af60b6badbb8e92 100644
--- a/chrome/browser/resources/tracing/linux_perf_importer.js
+++ b/chrome/browser/resources/tracing/linux_perf_importer.js
@@ -312,6 +312,10 @@ cr.define('tracing', function() {
// Shift all the slice times based on the sync record.
var sync = this.clockSyncRecords_[0];
+ // NB: parentTS of zero denotes no times-shift; this is
+ // used when user and kernel event clocks are identical.
+ if (sync.parentTS == 0 || sync.parentTS == sync.perfTS)
+ return true;
var timeShift = sync.parentTS - sync.perfTS;
for (var cpuNumber in this.cpuStates_) {
var cpuState = this.cpuStates_[cpuNumber];
« no previous file with comments | « no previous file | chrome/browser/resources/tracing/linux_perf_importer_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698