btrace: fix gap indication
authorMarkus Metzger <markus.t.metzger@intel.com>
Tue, 12 Jan 2016 09:44:37 +0000 (10:44 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Fri, 28 Oct 2016 08:49:27 +0000 (10:49 +0200)
commit63ab433e29b2715f429551cdbec72dab0d752c20
treea654babd2cb72b8f699f194bfdd323c162292ae5
parent2fc9bcf136a72ecc56a333cb658a8eaac8c9fec7
btrace: fix gap indication

Trace gaps due to overflows or non-contiguous trace are ignored in the 'info
record' command.  Fix that.

Also add a warning when decoding the trace and print the instruction number
preceding the trace gap in that warning message.  It looks like this:

    (gdb) info record
    Active record target: record-btrace
    Recording format: Intel Processor Trace.
    Buffer size: 16kB.
    warning: Decode error (-13) at instruction 101044 (offset = 0x29f0, pc = 0x7ffff728a642): no memory mapped at this address.
    Recorded 101044 instructions in 2093 functions (1 gaps) for thread 1 (process 5360).
    (gdb) record instruction-history 101044
    101044     0x00007ffff728a640:  pop    %r13
    [decode error (-13): no memory mapped at this address]

Remove the dead code that was supposed to print a gaps warning at the end of
trace decode.  This isn't really needed since we now print a warning for each
gap.

gdb/
* btrace.c (ftrace_add_pt): Fix gap indication.  Add warning for non-
contiguous trace and overflow.  Rephrase trace decode warning and print
instruction number.  Remove dead gaps warning.
(btrace_compute_ftrace_bts): Rephrase warnings and print instruction
number.
gdb/ChangeLog
gdb/btrace.c
This page took 0.03393 seconds and 4 git commands to generate.