Open Bug 791420 Opened 12 years ago Updated 2 years ago

Enable HasStableTSC on all CPUs

Categories

(Core :: General, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

Details

Attachments

(1 file)

Current HasStableTSC always returns false because of a typo "GenuntelineI". The stable tsc flag also seems to be valid on AMD so let's try trusting it everywhere. Even if for some reason the tsc is not stable enough to be used for timing on linux, hopefully our requirements for timing are lower enough and hopefully Windows is smart enough to give us a working QPC such that we can rely on it.
Attachment #661443 - Flags: review?(ehsan)
So, firstly I'm not sure which typo you're talking about.

Secondly, do you know if this is going to work on all AMD CPUs?  If yes, shouldn't we check for AMD CPUs explicitly as well?
Comment on attachment 661443 [details] [diff] [review]
Enable constant TSC on all cpus

Review of attachment 661443 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/ds/TimeStamp_windows.cpp
@@ +32,5 @@
> + * is slightly looser than the one used by Linux for two reasons.
> + * Linux only allows this on AMD and Intel cpu's and it will mark
> + * the tsc as unstable with mark_tsc_unstable for various reasons.
> + * Hopefully, a stable tsc ensures that QueryPerformanceCounter
> + * will work properly. */

Please provide a better comment here explaining why we check for what we check below.
Attachment #661443 - Flags: review?(ehsan) → review+
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: