ARM-software / trappy

This repository has moved to https://gitlab.arm.com/tooling/trappy
Apache License 2.0
60 stars 39 forks source link

Parsing raw vs formatted is unnecessarily complex #266

Closed bjackman closed 6 years ago

bjackman commented 6 years ago

Warning: I don't think I have quite the full picture here, take this with a pinch of salt.

Most ftrace events are the same in raw and formatted mode. Therefore we should just require a fully-raw trace, instead of marking certain events as need-raw and others as need-formatted.

derkling commented 6 years ago

AFAIR, the reason for formatted parsing is arrays decoding... which is something required for many thermal events. That's why to start with @JaviMerino added since the beginning the support for formatted traces. This allows to avoid maintaining in trappy a code to parse array events from a binary trace since this code if already part of trace-cmd.

Thus, I would say that to be as much generic as possible, we still need the formatted events parsing, but I would say that we should consider raw parsing the default for every class.

All that considered, didn't @credp added the support to interleave raw and formatted events in the same trace? Here is the patch: c10c721b48 This exploits the new support in trace-cmd to specify which event should be formatted while all the others are reported (by default) as raw events.

bjackman commented 6 years ago

OK, that makes sense. I have submitted a related patch here: https://github.com/ARM-software/trappy/pull/267

But while doing it I could not figure out why the non-raw parsing was needed at all. But this answers that question, thanks.