docs/dev/benchmark-oprofile
raw| 1 | #!/bin/sh -x |
| 2 | |
| 3 | # Cleanup |
| 4 | opcontrol --no-vmlinux |
| 5 | opcontrol --stop |
| 6 | opcontrol --shutdown |
| 7 | opcontrol --reset |
| 8 | |
| 9 | # Record all calls |
| 10 | opcontrol --separate=none |
| 11 | |
| 12 | # NMI conflicts with oprofile |
| 13 | echo 0 > /proc/sys/kernel/nmi_watchdog |
| 14 | |
| 15 | # Select events to be recorded |
| 16 | opcontrol --event=CPU_CLK_UNHALTED:30000:0:1:1 |
| 17 | |
| 18 | opcontrol --start |
| 19 | # The actual programm |
| 20 | "$@" |
| 21 | opcontrol --stop |
| 22 | opcontrol --dump |
| 23 | echo "Output: opreport -l" |