ARM-software / trappy

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

ftrace: Improve error messages when failing to parse trace #245

Closed bjackman closed 7 years ago

JaviMerino commented 7 years ago

I have added a test and fixed the typo. It's merged as b1b1c9ec6deb6cb879c683f7ddaebb98d2f016ac. Out of curiosity, why did you come accross the special_fields_match error? by using "version" or "cpu" as unique words? If that's the case, I wonder if instead of raising an exception we should have just added a continue.

bjackman commented 7 years ago

Thanks a lot for that! I came across the error when trying to parse a trace that was malformed in a way that trace-cmd didn't seem to mind about but that broke TRAPPy rather confusingly. Sorry, I'm hesitant to go into more detail for confidentiality reasons (otherwise I would share the trace).

JaviMerino commented 7 years ago

Fair enough. I was surprised because I was trying to find out something that caused it to fail and all I could think of was either using "version" as unique word or if trace-cmd had failed to parse some trace events and have left raw event in the trace.dat.