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

Issue 13583007: Create a field trial to test if we can detect good QPC implementations. (Closed)

Created:
7 years, 8 months ago by James Simonsen
Modified:
7 years, 7 months ago
CC:
chromium-reviews, MAD, erikwright+watch_chromium.org, Ilya Sherman, Sigurður Ásgeirsson, scottmg
Visibility:
Public.

Description

Create a field trial to test if we can detect good QPC implementations. We'd like to use QPC (TimeTicks::HighResNow) for all uses of TimeTicks. It's likely this will only work on some subset of Windows systems. This field trial is meant to determine if an implementation is good and if our heuristics are able to detect a good implementation. This particular CL checks for an Intel CPU parameter that indicates rdtsc is consistently incremented. Firefox uses the same check. I hope to determine that this is in fact correct and on which versions of Windows QPC calls rdtsc directly. We can add more heuristics later. BUG=158234 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=197431

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add histograms #

Patch Set 3 : Really add histograms #

Total comments: 6

Patch Set 4 : Try to force a core change #

Total comments: 6

Patch Set 5 : Rename to experiment #

Total comments: 2

Patch Set 6 : Skip XP #

Patch Set 7 : Dynamically find GetCurrentProcessorNumber function #

Total comments: 3

Patch Set 8 : Restore affinity at the end #

Total comments: 2

Patch Set 9 : Use chrome namespace #

Patch Set 10 : Fix win64 #

Patch Set 11 : Revert histogram fix #

Patch Set 12 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -0 lines) Patch
M base/cpu.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M base/cpu.cc View 1 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
A chrome/browser/metrics/time_ticks_experiment_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/browser/metrics/time_ticks_experiment_win.h View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/browser/metrics/time_ticks_experiment_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +108 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +52 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
James Simonsen
7 years, 8 months ago (2013-04-03 22:29:43 UTC) #1
Ilya Sherman
FYI: You can also include the necessary changes to histograms.xml as part of this CL: ...
7 years, 8 months ago (2013-04-03 22:57:33 UTC) #2
jar (doing other things)
Please consider two comments below (the nit should probably be changed). With that... base LGTM. ...
7 years, 8 months ago (2013-04-04 00:26:12 UTC) #3
James Simonsen
On 2013/04/03 22:57:33, Ilya Sherman wrote: > FYI: You can also include the necessary changes ...
7 years, 8 months ago (2013-04-04 02:26:51 UTC) #4
darin (slow to review)
https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc File chrome/browser/metrics/time_ticks_field_trial_win.cc (right): https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc#newcode48 chrome/browser/metrics/time_ticks_field_trial_win.cc:48: QueryPerformanceCounter(&qpc_now); Perhaps it would make sense to insert some ...
7 years, 8 months ago (2013-04-04 06:15:11 UTC) #5
Sigurður Ásgeirsson
Drive-by, did not review in detail. https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc File chrome/browser/metrics/time_ticks_field_trial_win.cc (right): https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc#newcode27 chrome/browser/metrics/time_ticks_field_trial_win.cc:27: // TODO(simonjam): We ...
7 years, 8 months ago (2013-04-04 12:35:14 UTC) #6
jar (doing other things)
https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc File chrome/browser/metrics/time_ticks_field_trial_win.cc (right): https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc#newcode48 chrome/browser/metrics/time_ticks_field_trial_win.cc:48: QueryPerformanceCounter(&qpc_now); I was thinking about suggesting a sleep... but ...
7 years, 8 months ago (2013-04-04 16:58:48 UTC) #7
Sigurður Ásgeirsson
https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc File chrome/browser/metrics/time_ticks_field_trial_win.cc (right): https://codereview.chromium.org/13583007/diff/7001/chrome/browser/metrics/time_ticks_field_trial_win.cc#newcode49 chrome/browser/metrics/time_ticks_field_trial_win.cc:49: int delta = static_cast<int>(qpc_now.QuadPart - qpc_last.QuadPart); If the whole ...
7 years, 8 months ago (2013-04-04 17:17:18 UTC) #8
James Simonsen
Sorry for the delay... PTAL. I've added the SetThreadAffinityMask call and a histogram to show ...
7 years, 8 months ago (2013-04-12 01:47:02 UTC) #9
jar (doing other things)
Just a question and a nit, but it seems to LG from what I saw ...
7 years, 8 months ago (2013-04-12 02:14:54 UTC) #10
James Simonsen
https://codereview.chromium.org/13583007/diff/16001/chrome/browser/metrics/time_ticks_field_trial_win.cc File chrome/browser/metrics/time_ticks_field_trial_win.cc (right): https://codereview.chromium.org/13583007/diff/16001/chrome/browser/metrics/time_ticks_field_trial_win.cc#newcode10 chrome/browser/metrics/time_ticks_field_trial_win.cc:10: #include "base/metrics/field_trial.h" On 2013/04/12 02:14:54, jar wrote: > Is ...
7 years, 8 months ago (2013-04-12 02:29:46 UTC) #11
Sigurður Ásgeirsson
looks good, except I think you'll break Chrome on XP if you check this in ...
7 years, 8 months ago (2013-04-12 13:34:02 UTC) #12
James Simonsen
https://codereview.chromium.org/13583007/diff/27001/chrome/browser/metrics/time_ticks_experiment_win.cc File chrome/browser/metrics/time_ticks_experiment_win.cc (right): https://codereview.chromium.org/13583007/diff/27001/chrome/browser/metrics/time_ticks_experiment_win.cc#newcode69 chrome/browser/metrics/time_ticks_experiment_win.cc:69: GetCurrentProcessorNumber() != starting_core) { On 2013/04/12 13:34:02, Sigurður Ásgeirsson ...
7 years, 8 months ago (2013-04-13 02:17:57 UTC) #13
Sigurður Ásgeirsson
If you bind to a function that's not available, your DLL or executable will fail ...
7 years, 8 months ago (2013-04-14 02:02:27 UTC) #14
James Simonsen
On 2013/04/14 02:02:27, Sigurður Ásgeirsson wrote: > I'd suggest using the Vista only function as ...
7 years, 8 months ago (2013-04-16 21:17:51 UTC) #15
Sigurður Ásgeirsson
Nice, though you'll get no metrics for Windows XP with the code as-is (I checked ...
7 years, 8 months ago (2013-04-17 13:36:16 UTC) #16
James Simonsen
Okay, let's just rely on setting the affinity mask doing the right thing then. Also, ...
7 years, 8 months ago (2013-04-19 01:32:34 UTC) #17
Sigurður Ásgeirsson
sweet - lgtm as far as the QPC is concerned. However, you will find that ...
7 years, 8 months ago (2013-04-19 12:59:16 UTC) #18
James Simonsen
Darin, can I get lgtm for chrome/? On 2013/04/19 12:59:16, Sigurður Ásgeirsson wrote: > sweet ...
7 years, 8 months ago (2013-04-22 17:47:09 UTC) #19
darin (slow to review)
LGTM, but... https://codereview.chromium.org/13583007/diff/44001/chrome/browser/metrics/time_ticks_experiment_win.h File chrome/browser/metrics/time_ticks_experiment_win.h (right): https://codereview.chromium.org/13583007/diff/44001/chrome/browser/metrics/time_ticks_experiment_win.h#newcode12 chrome/browser/metrics/time_ticks_experiment_win.h:12: namespace chrome_browser_metrics { I'm not a fan ...
7 years, 8 months ago (2013-04-22 18:25:05 UTC) #20
James Simonsen
On 2013/04/22 18:25:05, darin wrote: > LGTM, but... > > https://codereview.chromium.org/13583007/diff/44001/chrome/browser/metrics/time_ticks_experiment_win.h > File chrome/browser/metrics/time_ticks_experiment_win.h (right): ...
7 years, 7 months ago (2013-04-29 21:40:40 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonjam@chromium.org/13583007/53001
7 years, 7 months ago (2013-04-29 21:41:08 UTC) #22
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=244
7 years, 7 months ago (2013-04-29 21:47:21 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonjam@chromium.org/13583007/72001
7 years, 7 months ago (2013-04-30 00:07:09 UTC) #24
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=141123
7 years, 7 months ago (2013-04-30 01:17:24 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonjam@chromium.org/13583007/92001
7 years, 7 months ago (2013-04-30 01:22:30 UTC) #26
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=141227
7 years, 7 months ago (2013-04-30 04:09:17 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonjam@chromium.org/13583007/109001
7 years, 7 months ago (2013-04-30 17:01:28 UTC) #28
commit-bot: I haz the power
7 years, 7 months ago (2013-04-30 19:46:07 UTC) #29
Message was sent while issue was closed.
Change committed as 197431

Powered by Google App Engine
This is Rietveld 408576698