JuliaPerf / JuliaPerf/LinuxPerf.jl
Implausible cycle count when PMU muxing is active
- Dominant language
- Julia
- Stars
- 53
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
It's not uncommon for me to get a reading like this:
```julia
julia> @pstats "cpu-cycles,instructions,branch-instructions,branch-misses,cache-misses,cache-references" rand(1000,1000)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╶ cpu-cycles 8.60e+04 62.9% # 0.0 cycles per ns
╶ instructions 7.89e+06 100.0% # 91.8 insns per cycle
╶ branch-instructions 1.29e+05 100.0% # 1.6% of insns
╶ branch-misses 9.09e+02 100.0% # 0.7% of branch insns
╶ cache-misses 3.44e+03 100.0% # 0.5% of cache refs
╶ cache-references 6.77e+05 37.5%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
about ~10-30% of the time, compared to a more reasonable measurement:
```julia
julia> @pstats "cpu-cycles,instructions,branch-instructions,branch-misses,cache-misses,cache-references" rand(1000,1000)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
╶ cpu-cycles 3.59e+07 82.6% # 1.6 cycles per ns
╶ instructions 4.35e+07 82.6% # 1.2 insns per cycle
╶ branch-instructions 7.04e+06 82.6% # 16.2% of insns
╶ branch-misses 1.93e+05 82.6% # 2.7% of branch insns
╶ cache-misses 5.19e+05 82.6% # 11.7% of cache refs
╶ cache-references 4.46e+06 87.2%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
~100 instructions per cycle seems... a little high
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.