ARM-software / synchronization-benchmarks

Collection of synchronization micro-benchmarks and traces from infrastructure applications
Other
37 stars 36 forks source link

lockhammer/prefetch64: do not dereference lock pointer #71

Closed jty2 closed 2 years ago

jty2 commented 2 years ago

On aarch64, prefetch64() takes a pointer to the lock, but dereferences the pointer as the address to prefetch. Don't do that; it causes memory accesses to a random memory location (i.e. takes the literal lock value as the address).
Instead, just pass the value of the pointer into the PRFM instruction.