Hi all,
Now I found that if use the command 'perf script' for Arm CoreSight trace
data, it fails to parse kernel symbols if we don't specify kernel vmlinux
file. So when we don't specify kernel symbol files then perf tool will
roll back to use /proc/kallsyms for kernel symbols parsing, as result it will
run into below flow:
thread__find_addr_map(thread, cpumode, MAP__FUNCTION, address, &al);
map__load(al.map);
dso__data_read_offset(al.map->dso, machine, offset, buffer, size);
`-> data_read_offset()
I can observe the function data_read_offset() returns failure, this is caused
by checking the offset sanity "if (offset > dso->data.file_size)" (I pasted
the whole function code at below in case you want to get more context for it),
but if perf use "/proc/kallsyms" to load kernel symbols, the variable
'dso->data.file_size' will be set to zero thus the sanity checking always
thinks the offset is out of the file size bound.
Now I still don't understand how the dso/map support "/proc/kallsyms" and
have no idea to fix this issue, though I spent some time to look into it.
Could you give some suggestion for this? Or even better if you have fixing
for this, I am glad to test at my side.
static ssize_t data_read_offset(struct dso *dso, struct machine *machine,
u64 offset, u8 *data, ssize_t size)
{
if (data_file_size(dso, machine))
return -1;
/* Check the offset sanity. */
if (offset > dso->data.file_size)
return -1;
if (offset + size < offset)
return -1;
return cached_read(dso, machine, offset, data, size);
}
Thanks,
Leo Yan
This set addresses 3 problems observed with the CLAIM tag feature. The first
patch adds support for CLAIM tags to the ETB10 drivers. The second and third
patch deal with releasing the tags on ETF and ETM3x devices.
Review and testing would be appreciated.
Regards,
Mathieu
Mathieu Poirier (3):
coresight: etb10: Add support for CLAIM tag
coresight: etf: Release CLAIM tag after disabling the HW
coresight: etm3x: Release CLAIM tag when operated from perf
drivers/hwtracing/coresight/coresight-etb10.c | 23 +++++++++++++++++------
drivers/hwtracing/coresight/coresight-etm3x.c | 2 ++
drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +-
3 files changed, 20 insertions(+), 7 deletions(-)
--
2.7.4
This set adds support for ETMv3/PTM1.1 trace decoding. The work has been
tested on TC2 and ST-Microelectronics' mp157c-ev1 board and applies cleanly
on 4.20-rc1. Although not related to trace decoding, the following patches
[1][2][3] are required for ETMv3/PTM1.1 traces to be generated properly on
a 4.20-rc1 mainline kernel.
I am planning to post this on the kernel mailing list in a week.
Regards,
Mathieu
Changes since V1:
* Address a problem with protocol identification in [3/3]
[1]. https://lore.kernel.org/patchwork/patch/1007184/
[2]. https://lore.kernel.org/patchwork/patch/1007185/
[3]. https://lore.kernel.org/patchwork/patch/1007186/
Mathieu Poirier (3):
perf tools: Add configuration for ETMv3 trace protocol
perf tools: Add support for ETMv3 trace decoding
perf tools: Add support for PTMv1.1 decoding
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 31 +++++++++++
tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 9 +++
tools/perf/util/cs-etm.c | 73 ++++++++++++++++++++-----
3 files changed, 99 insertions(+), 14 deletions(-)
--
2.7.4
Changes this release.
Functional update: Add additional information about the last
instruction to the generic output packet & update docs for updated
output packet.
Bugfix: typecast removed from OCSD_VER_NUM in ocsd_if_version.h to
allow use in C pre-processor.
Bugfix: ETMV4: Interworking ISA change between A32-T32 occasionally
missed during instruction decode.
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK