Good day,
First and foremost, for coresight related questions please CC the coresight mailing list. There is a lot of knowledgeable people on it that can help with your questions.
On 29 March 2017 at 04:09, Kaiyou Wang Kaiyou.Wang@arm.com wrote:
Hi Mathieu,
I have find the root cause about the issue, thanks
Another questions,
1> I port the coresight dts config from JUNO-busybox to JUNO-android, but the cpu hung during the kernel boot stage, do you have any suggestion?
The first thing to do would be to disable coresight. If the board still hangs there is not much I can do for you. Otherwise there is either a problem with power domains or the clocks. You will likely have to instrument the kernel to see where things hang.
2> I try to use the sysFS attribute of Coresight to trace data, but decode the data failed by the OpenCSD,
The interesting question here is how did you try to use the OpenCSD library to decode traces acquired via sysFS? OpenCSD requires a lot of trace configuration information that is not present in raw sysFS traces. The integration between coresight and perf is an example of how those trace configuration information need to be communicated to the library.
Is there any introduction of Coresight sysFS usage? And Can perf decode the raw trace data?
No - perf can't decode raw traces gathered from sysFS for reasons mentionned above.
Regards, Mathieu
thanks
From: Kaiyou Wang Sent: Wednesday, March 29, 2017 10:02 AM To: 'mathieu.poirier@linaro.org' Subject: Some question about OpenCSD coresight drive usage
Hi Mathieu,
Sorry to disturb, I have some question about the coresight driver usage, could you give me some suggestion?
I try to perf recode the trace event on JUNO busybox platform:
/ # ./perf record -e cs_etm/@20010000.etf/ --per-thread uname
map_groups__set_modules_path_dir: cannot open /lib/modules/4.9.0-dirty dir
Problems setting modules path maps, continuing anyway...
path: /sys/bus/coresight/devices/20010000.etf/enable_sink
mmap size 528384B
[ 2257.038441] coresight-funnel 20040000.main-funnel: FUNNEL inport 1 enabled
[ 2257.045268] coresight-funnel 230c0000.cluster1-funnel: FUNNEL inport 3 enabled
Linux
[ 2257.055129] coresight-funnel 230c0000.cluster1-funnel: FUNNEL inport 3 disabled
[ 2257.062376] coresight-funnel 20040000.main-funnel: FUNNEL inport 1 disabled
[ 2257.069277] coresight-tmc 20010000.etf: TMC-ETB/ETF disabled
[ perf record: Woken up 1 times to write data ]
failed to write feature 8
failed to write feature 9
failed to write feature 14
[ perf record: Captured and wrote 0.041 MB perf.data ]
Then try to decode the perf.data on host-linux, but it faild, could you give me some suggestion?
kaiwan01@sha-swtool:~/code/OpenCSD/trace-data$ cat disasm.sh
#!/bin/bash
export EXEC_PATH=/home/kaiwan01/code/OpenCSD/OpenCSD-perf/perf-opencsd-4.8/tools/perf/
export SCRIPT_PATH=$EXEC_PATH/scripts/python/
export XTOOL_PATH=/home/kaiwan01/tools/gcc-linaro-4.9-2015.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/bin/
perf --exec-path=${EXEC_PATH} script --script=python:${SCRIPT_PATH}/cs-trace-disasm.py -- -d ${XTOOL_PATH}/aarch64-linux-gnu-objdump
kaiwan01@sha-swtool:~/code/OpenCSD/trace-data$ ./disasm.sh
Traceback (most recent call last):
File "/home/kaiwan01/code/OpenCSD/OpenCSD-perf/perf-opencsd-4.8/tools/perf//scripts/python//cs-trace-disasm.py", line 113, in process_event
disasm_output = check_output(disasm).split('\n')
File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Fatal Python error: problem in Python trace event handler
./disasm.sh: line 7: 24616 Aborted (core dumped) perf --exec-path=${EXEC_PATH} script --script=python:${SCRIPT_PATH}/cs-trace-disasm.py -- -d ${XTOOL_PATH}/aarch64-linux-gnu-objdump
kaiwan01@sha-swtool:~/code/OpenCSD/trace-data$
Thanks and Best Regards,
Kaiyou
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.