Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Serialize rdtsc instruction on x86_64 #2727

Merged
merged 1 commit into from
Sep 4, 2019
Merged

Serialize rdtsc instruction on x86_64 #2727

merged 1 commit into from
Sep 4, 2019

Conversation

kubo39
Copy link
Contributor

@kubo39 kubo39 commented Aug 6, 2019

Unfortunately rdtsc can produce skewed results without mfence sometimes.
This is what GNU/Linux does in rdtsc_ordered function.

src/rt/trace.d Outdated Show resolved Hide resolved
Unfortunately rdtsc can produce skewed results without mfence sometimes.
This is what GNU/Linux does in rdtsc_ordered function.
ref: https://github.com/torvalds/linux/blob/03b9730b769fc4d87e40f6104f4c5b2e43889f19/arch/x86/include/asm/msr.h#L130-L154
@kubo39 kubo39 marked this pull request as ready for review August 7, 2019 06:57
Copy link
Member

@UplinkCoder UplinkCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not hurt.

@n8sh n8sh added the 72h no objection -> merge The PR will be merged if there are no objections raised. label Aug 29, 2019
@n8sh n8sh added the auto-merge label Sep 4, 2019
@dlang-bot dlang-bot merged commit 3781cab into dlang:master Sep 4, 2019
@kubo39 kubo39 deleted the serialize-rdtsc branch March 5, 2020 09:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
72h no objection -> merge The PR will be merged if there are no objections raised.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants