]> git.proxmox.com Git - mirror_qemu.git/commit
simpletrace: fix flight recorder --no-header option
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Aug 2017 08:44:30 +0000 (09:44 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Aug 2017 11:50:29 +0000 (12:50 +0100)
commit840d8351774664d01c328d31ed33b0e2d85c866e
tree6545ca9e2f36ceaca50d830ec6151f3bcd2dbc84
parentd6b76d68054b81943648ab0af2f9634ae946854b
simpletrace: fix flight recorder --no-header option

The simpletrace.py script can pretty-print flight recorder ring buffers.
These are not full simpletrace binary trace files but just the end of a
trace file.  There is no header and the event ID mapping information is
often unavailable since the ring buffer may have filled up and discarded
event ID mapping records.

The simpletrace.stp script that generates ring buffer traces uses the
same trace-events-all input file as simpletrace.py.  Therefore both
scripts have the same global ordering of trace events.  A dynamic event
ID mapping isn't necessary: just use the trace-events-all file as the
reference for how event IDs are numbered.

It is now possible to analyze simpletrace.stp ring buffers again using:

  $ ./simpletrace.py trace-events-all path/to/ring-buffer

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170815084430.7128-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
scripts/simpletrace.py