Closed Bug 1480595 Opened Last year Closed Last year

TimeStamp needs to be informed about aarch64 windows

Categories

(Core :: mozglue, enhancement)

ARM64
Windows
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

There is a *lot* of x86-ish only code here.  I don't know what is the right thing to try and replace it all with.  Maybe there will be some vaguely-monotonic-ish clock that Windows supplies that we can use for a first pass.
This is a bit of a hack, but it is appropriate for getting everything to
the point where we could evaluate whether our behavior needs to change.
Attachment #9003223 - Flags: review?(mh+mozilla)
Comment on attachment 9003223 [details] [diff] [review]
make TimeStamp compilable for AArch64 Windows

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

::: mozglue/misc/TimeStamp_windows.cpp
@@ +430,5 @@
>  {
> +#if defined(_M_ARM64)
> +  // XXX: We're not really sure that this is the case, but given that AArch64
> +  // is a newer CPU design, we're going to assume that ARM has learned that
> +  // stable counters are better than unstable ones.  Need to verify.

Wikipedia says "ARMv7[12] and ARMv8[13] architectures provide a generic counter which counts at a constant frequency."

https://en.wikipedia.org/wiki/Time_Stamp_Counter

That page also says that MS provides the QPC API specifically to avoid the shortcomings of the TSC, I think it's safe to assume that the QPC API does the right thing on aarch64, whatever that is.

You may want to update the comment to reflect that.
Attachment #9003223 - Flags: review?(mh+mozilla) → review+
Thanks for the review.  I've updated the comment as below.
Attachment #9003567 - Flags: review+
Attachment #9003223 - Attachment is obsolete: true
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8facd78c242
make TimeStamp compilable for AArch64 Windows; r=glandium
Assignee: nobody → nfroyd
https://hg.mozilla.org/mozilla-central/rev/a8facd78c242
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.