Replies: 2 comments 4 replies
-
Not stripped vmlinux and kernel modules are not available on device. They are generated when you build the kernel. For example, if you use hikey960 board as in https://source.android.com/docs/setup/build/devices#960kernel. You can build the kernel locally, flash it on device, collect ETM data, pull branch_list.data on host. Then you can use vmlinux and kernel modules generated when building the kernel to produce AutoFDO profiles.
You can just pull perf.data (generated by record -e cs-etm) on host. And run simpleperf inject on host.
OpenCSD is a library. I don't know how you can use it directly. Internally, simpleperf inject uses OpenCSD to decode the instruction stream. Simpleperf is open source, so you can modify simpleperf inject locally to do whatever you want. Or you can try linux tools perf. By the way, we have a patch updating collect_etm_data_for_autofdo.md, in https://android-review.googlesource.com/c/platform/system/extras/+/2200048. Not sure if that's helpful to you. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I've been following the instructions here: https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/collect_etm_data_for_autofdo.md
For an Android system. After much kernel and bootloader hacking, I've finally gotten CoreSight up and running and was able to collect a cs-etm trace via simpleperf. What I'm stuck on now is this step:
I can pull the branch_list.data just fine but I'm not sure where to get
vmlinux and kernel modules
. This is an Android 12 target with Linux kernel 4.19.157.Also, if I were to try to inject the binary info offline (not on target), what files would I need to download? The guide here:
https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md
Indicates that there's a
~/.debug
folder for Linaro linux. An equivalent doesn't seem to exist on Android...I want to also use OpenCSD to decode the instruction stream...
Beta Was this translation helpful? Give feedback.
All reactions