ARM: dts: sc7730: add Performance Monitoring Unit(PMU) node
This patch is to support perf command with performance monitoring
unit (PMU) of SC7730S CPU on Z3 device. If you want to monitor
hardware information such as cpu cycles, insns per cycle, cache miss,
and branches, you must enable this patch.
For example,
sh-3.2# uname -a
Linux localhost 3.10.65-00016-g465f771-dirty #2-Tizen SMP PREEMPT Fri Dec 4 08:38:31 KST 2015 armv7l GNU/Linux
sh-3.2#
sh-3.2# perf list | grep "Hardware event"
cpu-cycles OR cycles [Hardware event]
instructions [Hardware event]
cache-references [Hardware event]
cache-misses [Hardware event]
branch-instructions OR branches [Hardware event]
branch-misses [Hardware event]
bus-cycles [Hardware event]
stalled-cycles-frontend OR idle-cycles-frontend [Hardware event]
stalled-cycles-backend OR idle-cycles-backend [Hardware event]
ref-cycles [Hardware event]
sh-3.2#
sh-3.2#
sh-3.2# perf stat ls
Performance counter stats for 'ls':
5.950928 task-clock # 0.666 CPUs utilized
5 context-switches # 0.840 K/sec
0 cpu-migrations # 0.000 K/sec
224 page-faults # 0.038 M/sec
5962814 cycles # 1.002 GHz
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
1629441 instructions # 0.27 insns per cycle
197736 branches # 33.228 M/sec
55299 branch-misses # 27.97% of all branches
0.
008941650 seconds time elapsed
sh-3.2#
sh-3.2# perf record -a
^C (Press Ctrl + C key)
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.947 MB perf.data (~41368 samples) ]
sh-3.2# cat /proc/sys/kernel/kptr_restrict
2
sh-3.2# echo 0 > /proc/sys/kernel/kptr_restrict
sh-3.2# cat /proc/sys/kernel/kptr_restrict
0
sh-3.2# perf report
Samples: 2K of event 'cycles', Event count (approx.):
331006766
13.53% swapper [kernel.kallsyms] [k] sc_enter_idle
8.59% swapper [kernel.kallsyms] [k] tick_nohz_idle_exit
7.67% enlightenment libc-2.20-2014.11.so [.] 0x000bdf34
4.92% swapper [kernel.kallsyms] [k] _raw_spin_unlock_irq
4.61% enlightenment [kernel.kallsyms] [k] _raw_spin_unlock_irqr
4.11% enlightenment [kernel.kallsyms] [k] user_exit
3.98% enlightenment [kernel.kallsyms] [k] _raw_spin_unlock_irq
2.94% swapper [kernel.kallsyms] [k] tick_nohz_idle_enter
1.83% tizenstoreservi [kernel.kallsyms] [k] _raw_spin_unlock_irq
1.61% enlightenment libecore.so.1.13.0 [.] 0x0000ba3c
1.00% enlightenment libpthread-2.20-2014.11.so [.] recvmsg
0.89% enlightenment libeo.so.1.13.0 [.] _eo_call_resolve
0.75% enlightenment [kernel.kallsyms] [k] fget_light
0.74% enlightenment [kernel.kallsyms] [k] __gptimer_clocksource
0.73% enlightenment libpthread-2.20-2014.11.so [.] 0x00009db0
0.72% tizenstoreservi libc-2.20-2014.11.so [.] 0x000d9fa8
0.70% enlightenment libeo.so.1.13.0 [.] eo_data_scope_get
0.65% enlightenment [kernel.kallsyms] [k] do_select
0.64% enlightenment libecore_x.so.1.13.0 [.] 0x000322c6
0.64% enlightenment libeo.so.1.13.0 [.] _eo_do_start
0.59% cloud-pdm-serve [kernel.kallsyms] [k] _raw_spin_unlock_irq
0.55% enlightenment enlightenment [.] 0x00051120
sh-3.2#
Change-Id: Icc16380e3dc7027d45b7a6a202c589375d68b255
Reported-by: Geunsik Lim <geunsik.lim@samsung.com>
Tested-by: Geunsik Lim <geunsik.lim@samsung.com>
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Signed-off-by: Congfu Zhao <Congfu.Zhao@spreadtrum.com>
CC: Vishnu Pratap Singh <vishnu.ps@samsung.com>
CC: Manjunatha Achar <a.manjunatha@samsung.com>
CC: Rajkumar Chandrasekar <c.rajkumar@samsung.com>
CC: Pintu Kumar <pintu.k@samsung.com>
CC: MyungJoo Ham <myungjoo.ham@samsung.com>