diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-07-25 13:58:41 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-07-25 13:58:41 +0200 |
| commit | 7e2719c913c833bdd93b463f5a7dc878d5a22273 (patch) | |
| tree | a008dcd0d07c6be5b19b9eec0e7330b025d9e215 /src/asm.h | |
| parent | b98fabdf4b91a6093b3d91f15cb55b21ab89c0f3 (diff) | |
| download | cachepc-7e2719c913c833bdd93b463f5a7dc878d5a22273.tar.gz cachepc-7e2719c913c833bdd93b463f5a7dc878d5a22273.zip | |
Read program counters directly, add print and remove procfs approach for testing
Diffstat (limited to 'src/asm.h')
| -rwxr-xr-x | src/asm.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -25,10 +25,9 @@ cachepc_readpmc(uint64_t event) uint32_t lo, hi; asm volatile ( - "mov %[event], %%rcx\t\n" - "rdpmc\t\n" + "rdmsr" : "=a" (lo), "=d" (hi) - : [event] "r" (event) + : "c"(event) ); return ((uint64_t) hi << 32) | lo; |
