Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
d9630aee
Commit
d9630aee
authored
Feb 10, 2016
by
Elliott Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add aarch64 support to src/cycleclock.h.
From google3's base/cycleclock.
parent
cd525ae8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
cycleclock.h
src/cycleclock.h
+8
-0
No files found.
src/cycleclock.h
View file @
d9630aee
...
...
@@ -99,6 +99,14 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
_asm
rdtsc
#elif defined(COMPILER_MSVC)
return
__rdtsc
();
#elif defined(__aarch64__)
// System timer of ARMv8 runs at a different frequency than the CPU's.
// The frequency is fixed, typically in the range 1-50MHz. It can be
// read at CNTFRQ special register. We assume the OS has set up
// the virtual timer properly.
int64_t
virtual_timer_value
;
asm
volatile
(
"mrs %0, cntvct_el0"
:
"=r"
(
virtual_timer_value
));
return
virtual_timer_value
;
#elif defined(__ARM_ARCH)
#if (__ARM_ARCH >= 6) // V6 is the earliest arch that has a standard cyclecount
uint32_t
pmccntr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment