ARM-software / tarmac-trace-utilities

Tools for analyzing and browsing Tarmac instruction traces.
Apache License 2.0
67 stars 22 forks source link

not support m0 tarmac log #13

Closed Johnmc104 closed 10 months ago

Johnmc104 commented 1 year ago

need add features

Johnmc104 commented 1 year ago

elf_and_log.zip

statham-arm commented 1 year ago

Thanks for this sample. Indeed, this is a type of Tarmac that TTU's parser is not yet able to handle. At a glance, the differences seem to be:

  1. there's no space between the numeric timestamp and the unit ("396ns" instead of "396 ns")
  2. the instruction-set state and CPU mode fields are missing from IT and IS instruction lines, along with the : that usually separates those from the instruction.

Can you say something about where this trace came from? Your title suggests that the CPU was Cortex-M0, but what was the Tarmac-generating tool?

As a workaround for the moment, I found I was able to reprocess your trace into one that TTU can handle using the following Perl one-liner:

perl -pe 's{^(\d+)(ns)}{$1 $2}; s{^(\S+ \S+ (IT|IS) \S+ \S+)}{$1 T svc_s :}' tarmac1.log > fixed.log
Johnmc104 commented 11 months ago

This is tarmac rtl module from Cortex-M0-AT510-r0p0-00rel0 (RTL development kit)

statham-arm commented 10 months ago

I've just pushed changes that should enable these tools to parse that Tarmac file.

Unfortunately, they still can't do it by default, because the missing instruction-set state (compared to the usual format) needs to be filled in. But there's a new command-line option --implicit-thumb that should allow this file to be parsed.