support tsc mode on aarch64 using cntvct_el0 #1142
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR makes tsc mode work on aarch64 using cntvct_el0. As far as I can tell, e.g. from the quanta crate, the cntvct timestamp is invariant on all aarch64 machines.
It's supposedly not available on iOS but then AFAICT async-profiler doesn't run on iOS either.
Related issues
Fixes #1139
Motivation and context
jfrs with a tsc allow for easier alignment between traces from the application and samples. aarch64 (ARM 64-bit) architecture is getting more and more popular, and it's useful to allow tsc-based profiling on aarch64 as well.
How has this been tested?
Tested manually on a Graviton 2 machine.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.