Hi Leo,

This information should not be added to the library here - for a number of reasons:-
1) It adds a type that is not actually used in the library - and a maintenance burden that is unrelated to the library.
2) It adds another compile time dependence between perf and the version of the library installed.
3) Exception number mapping to type of exception differs between trace protocols - for example exception number values output for ETMv3 differ from those used in ETMv4 - PE reset is 0b1000 in ETMv3, 0b00000 in ETMv4.
This is why we output the exception number rather than type in the generic packets. Clients can map an exception number to particular type as they will know the trace protocol and core architecture.

My recommendation is that the exception type mapping if required by perf is localised to the perf etm decoder code - cs-etm.h or cs-etm-decoder.h - and care must be taken to map exception types according to underlying protocol as well as number.

Regards

Mike



On Mon, 10 Dec 2018 at 05:14, Leo Yan <notifications@github.com> wrote:

Add enumeration for exception number in header file, this can be used
for Linux perf tool building to support sample flags setting.

Signed-off-by: Leo Yan leo.yan@linaro.org


You can view, comment on, or merge this pull request online at:

  https://github.com/Linaro/OpenCSD/pull/15

Commit Summary

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.



--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK