On 24 March 2017 at 15:37, Kim Phillips kim.phillips@arm.com wrote:
On Fri, 24 Mar 2017 13:21:41 -0600 Mathieu Poirier mathieu.poirier@linaro.org wrote:
On 24 March 2017 at 13:04, Kim Phillips kim.phillips@arm.com wrote:
and searching for etr in the current documentation, I assume you mean I should execute perf like this?:
root@juno:~# taskset -c 2 /home/kim/git/OpenCSD/tools/perf/perf record -o perf-etm.data -e cs_etm/@20070000.etr/u --per-thread taskset -c 2 ./sort-O3 failed to mmap with 12 (Cannot allocate memory) root@juno:~#
Two things can happen here:
- The name for the ETR is wrong
- This isn't a perf-opencsd-4.11-rc1 kernel
Nope, because that kernel locks up the machine.
I'd like you to do two things:
- From the cmd line, "ls /sys/bus/coresight/devices/"
- Also from the cmd line, "uname -a"
This is using Linus' ToT kernel - the one that doesn't lock up:
There lies the problem - in mainline the ETR driver doesn't have support for the perf API. Coincidentally Mike is working on this. The perf-opencsd-4.11-rc1 has an ancient (and inefficient) ETR driver that does support the perf API.
root@juno:~# ls /sys/bus/coresight/devices/ 20010000.etf 20070000.etr 20130000.funnel 22040000.etm 23040000.etm 23240000.etm 20030000.tpiu 20100000.stm 20140000.etf 220c0000.funnel 230c0000.funnel 23340000.etm 20040000.funnel 20120000.replicator 20150000.funnel 22140000.etm 23140000.etm root@juno:~# uname -a Linux juno 4.11.0-rc3-00035-g093b995 #25 SMP PREEMPT Wed Mar 22 01:41:55 CDT 2017 aarch64 GNU/Linux root@juno:~#
I just retried, and still get it:
root@juno:~# ls /sys/bus/coresight/devices/ 20010000.etf 20070000.etr 20130000.funnel 22040000.etm 23040000.etm 23240000.etm 20030000.tpiu 20100000.stm 20140000.etf 220c0000.funnel 230c0000.funnel 23340000.etm 20040000.funnel 20120000.replicator 20150000.funnel 22140000.etm 23140000.etm root@juno:~# uname -a Linux juno 4.11.0-rc1-00027-g4222fb0-dirty #8 SMP PREEMPT Fri Mar 24 16:24:27 CDT 2017 aarch64 GNU/Linux root@juno:~# taskset -c 2 /home/kim/git/OpenCSD/tools/perf/perf record -o perf-etm.data -e cs_etm/@20070000.etr/u --per-thread taskset -c 2 ./sort-O3 [ 265.315513] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 265.322590] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 265.328980] coresight-tmc 20010000.etf: TMC-ETF enabled [ 265.334158] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 265.340552] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled [ 265.357418] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 265.363887] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 265.370368] coresight-tmc 20010000.etf: TMC disabled [ 265.375284] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 265.381747] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 265.388914] coresight-tmc 20070000.etr: TMC-ETR disabled [ 265.394686] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 265.401756] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 265.408145] coresight-tmc 20010000.etf: TMC-ETF enabled [ 265.413321] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 265.419715] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled Bubble sorting array of 30000 elements [ 267.612175] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 267.618645] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 267.625127] coresight-tmc 20010000.etf: TMC disabled [ 267.630043] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 267.636506] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 267.643672] coresight-tmc 20070000.etr: TMC-ETR disabled [ 267.652043] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 267.659116] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 267.665504] coresight-tmc 20010000.etf: TMC-ETF enabled [ 267.670682] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 267.677076] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled [ 270.096735] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 270.103203] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 270.109684] coresight-tmc 20010000.etf: TMC disabled [ 270.114600] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 270.121061] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 270.128228] coresight-tmc 20070000.etr: TMC-ETR disabled [ 270.133498] sched: RT throttling activated [ 270.140684] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 270.147755] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 270.154144] coresight-tmc 20010000.etf: TMC-ETF enabled [ 270.159321] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 270.165715] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled [ 271.620865] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 271.627333] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 271.633815] coresight-tmc 20010000.etf: TMC disabled [ 271.638731] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 271.645193] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 271.652359] coresight-tmc 20070000.etr: TMC-ETR disabled [ 271.660671] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 271.667744] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 271.674133] coresight-tmc 20010000.etf: TMC-ETF enabled [ 271.679310] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 271.685704] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled [ 274.097522] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 274.103989] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 274.110470] coresight-tmc 20010000.etf: TMC disabled [ 274.115386] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 274.121848] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 274.129014] coresight-tmc 20070000.etr: TMC-ETR disabled [ 274.137360] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 274.144432] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 274.150821] coresight-tmc 20010000.etf: TMC-ETF enabled [ 274.155997] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 274.162391] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled [ 275.637795] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 275.644263] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 275.650744] coresight-tmc 20010000.etf: TMC disabled [ 275.655661] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 275.662122] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 275.669289] coresight-tmc 20070000.etr: TMC-ETR disabled [ 275.677110] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 275.684183] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 275.690572] coresight-tmc 20010000.etf: TMC-ETF enabled [ 275.695749] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 275.702143] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled [ 278.098230] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 278.104697] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 278.111178] coresight-tmc 20010000.etf: TMC disabled [ 278.116094] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 278.122557] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 278.129723] coresight-tmc 20070000.etr: TMC-ETR disabled [ 278.137606] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 278.144679] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 278.151067] coresight-tmc 20010000.etf: TMC-ETF enabled [ 278.156244] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 278.162638] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled [ 279.654355] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 279.660823] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 279.667305] coresight-tmc 20010000.etf: TMC disabled [ 279.672221] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 279.678683] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 279.685850] coresight-tmc 20070000.etr: TMC-ETR disabled [ 279.693640] coresight-replicator-qcom 20120000.replicator: REPLICATOR enabled [ 279.700711] coresight-funnel 20150000.funnel: FUNNEL inport 0 enabled [ 279.707100] coresight-tmc 20010000.etf: TMC-ETF enabled [ 279.712276] coresight-funnel 20040000.funnel: FUNNEL inport 0 enabled [ 279.718670] coresight-funnel 220c0000.funnel: FUNNEL inport 1 enabled 14979 ms [ 281.711004] coresight-funnel 220c0000.funnel: FUNNEL inport 1 disabled [ 281.717471] coresight-funnel 20040000.funnel: FUNNEL inport 0 disabled [ 281.723953] coresight-tmc 20010000.etf: TMC disabled [ 281.728868] coresight-funnel 20150000.funnel: FUNNEL inport 0 disabled [ 281.735331] coresight-replicator-qcom 20120000.replicator: REPLICATOR disabled [ 281.742497] coresight-tmc 20070000.etr: TMC-ETR disabled
Please avoid including long traces like this in emails. If you absolutely want to included them a pastebin would be more appropriate.
[ perf record: Woken up 9 times to write data ] Warning: AUX data lost 8 times out of 9!
[ perf record: Captured and wrote
<hard lockup>
Mathieu
Kim