hi,I started implementing GDB process record and replay with ARM CoreSight as described in the rfc published early this year. Current implementation of coresight tracing in Perf is based on the sysfs interface, by accessing /sys/bus/event_source/devices/cs_etm ... file. GDB implementation of bts and ipt is based on the syscall "sys_perf_event_open".it would be nice to use the similar mechanism for realizing similar functionalities. therefore I would like to know if linux kernel (with coresight deivers) is exposing coresight drivers through the syscall sys_perf_event_open and if this is the case how shall I configure the perf_event_attr to use it. thanks Zied Guermazi
Good day,
On Thu, 5 Dec 2019 at 06:36, zied guermazi guermazi_zied@yahoo.com wrote:
hi, I started implementing GDB process record and replay with ARM CoreSight as described in the rfc published early this year. Current implementation of coresight tracing in Perf is based on the sysfs interface, by accessing /sys/bus/event_source/devices/cs_etm ... file. GDB implementation of bts and ipt is based on the syscall "sys_perf_event_open". it would be nice to use the similar mechanism for realizing similar functionalities. therefore I would like to know if linux kernel (with coresight deivers) is exposing coresight drivers through the syscall sys_perf_event_open and if this is the case how shall I configure the perf_event_attr to use it.
The coresight subsystem and drivers work the same way with regards to the sys_perf_event_open() system call. Implementation for both ARM and Intel follow the same perf/AUX buffer interface in order to provide a common front to users. In fact using coresight with perf works pretty much the same way as BTS or PT - documentation on that can be found in the kernel tree [1] and on github [2].
Thanks, Mathieu
[1]. https://elixir.bootlin.com/linux/latest/source/Documentation/trace/coresight... [2]. https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md
thanks Zied Guermazi
linaro-toolchain@lists.linaro.org