-
Notifications
You must be signed in to change notification settings - Fork 56
L1 Cache Miss Analysis
Min Zhou edited this page Jul 8, 2015
·
2 revisions
PerfJ
is only work on new versions of JDK with frame pointer preserved.
Copy or download the [sample code] (https://github.com/coderplay/perfj/blob/master/examples/L1CacheMiss.java) to you local machine
wget https://raw.githubusercontent.com/coderplay/perfj/master/examples/L1CacheMiss.java
Compile it
javac –cp . L1CacheMiss.java
Run it with PreserveFramePointer enabled
java -Xmx2g -XX:+PreserveFramePointer L1CacheMiss
After that, run perfj
bin/perfj record -e L1-dcache-load-misses -F 99 -g -p `pgrep -f L1CacheMiss`
After a while use Ctrl+C
to terminate the profiling. We will see a perf.data
as well as /tmp/perf-$pid.map
are generated by perfj on local disk. Finally, show the result
bin/perfj report --stdio