From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: markus.t.metzger@intel.com
Cc: gdb-patches@sourceware.org, markus.t.metzger@gmail.com
Subject: Re: [PATCH 2/3] record-btrace, disas: omit pc prefix
Date: Wed, 27 Feb 2013 07:59:00 -0000 [thread overview]
Message-ID: <20130227075925.GA5003@host2.jankratochvil.net> (raw)
In-Reply-To: <1361808917-16934-3-git-send-email-markus.t.metzger@intel.com>
On Mon, 25 Feb 2013 17:15:16 +0100, markus.t.metzger@intel.com wrote:
> From: Markus Metzger <markus.t.metzger@intel.com>
>
> Add a disassembly flag to omit the pc prefix and use it in the "record
> instruction-history" command of record-btrace.
>
> The pc prefix would appear multiple times in the branch trace disassembly,
> which is more confusing than helpful.
I do not see it, moreover I find the output better without this patch:
with the patch:
(gdb) record instruction-history
warning: Recorded trace may be corrupted.
warning: Recorded trace may be corrupted.
warning: Recorded trace may be corrupted.
0x00007ffff62fe56a <_int_malloc+298>: add $0xa8,%rsp
0x00007ffff62fe571 <_int_malloc+305>: mov %r12,%rax
0x00007ffff62fe574 <_int_malloc+308>: pop %rbx
0x00007ffff62fe575 <_int_malloc+309>: pop %rbp
0x00007ffff62fe576 <_int_malloc+310>: pop %r12
0x00007ffff62fe578 <_int_malloc+312>: pop %r13
0x00007ffff62fe57a <_int_malloc+314>: pop %r14
0x00007ffff62fe57c <_int_malloc+316>: pop %r15
0x00007ffff62fe57e <_int_malloc+318>: retq
0x00007ffff6300ecc <__GI___libc_malloc+92>: test %rax,%rax
(gdb) p/x $pc
$1 = 0x7ffff6300ecc
without the patch:
(gdb) record instruction-history
0x00007ffff6303f51 <freehook+209>: mov %rax,0x0(%rbp)
0x00007ffff6303f55 <freehook+213>: pop %rbx
0x00007ffff6303f56 <freehook+214>: pop %rbp
0x00007ffff6303f57 <freehook+215>: pop %r12
0x00007ffff6303f59 <freehook+217>: pop %r13
0x00007ffff6303f5b <freehook+219>: pop %r14
0x00007ffff6303f5d <freehook+221>: retq
0x00007ffff62c8921 <_IO_vfprintf_internal+257>: mov %r12,%rdi
0x00007ffff62c8924 <_IO_vfprintf_internal+260>: callq 0x7ffff62a03d0 <free@plt+64>
=> 0x00007ffff62a03d0 <free@plt+64>: jmpq *0x399c9a(%rip) # 0x7ffff663a070
(gdb) p/x $pc
$1 = 0x7ffff62a03d0
It seems to me like the preference of "=> " or not "=> " is not related to
"record instruction-history".
If you do like disassemblies more without "=> " it can be made some new global
option unrelated to "record".
> 2013-02-25 Markus Metzger <markus.t.metzger@intel.com>
>
> * record-btrace.c (btrace_insn_history): Omit the pc prefix in
> the instruction history disassembly.
> * disasm.c (dump_insns): Omit the pc prefix, if requested.
> * disasm.h (DISASSEMBLY_OMIT_PC): New.
Thanks,
Jan
next prev parent reply other threads:[~2013-02-27 7:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 16:15 [PATCH 0/3] target record-btrace markus.t.metzger
2013-02-25 16:16 ` [PATCH 2/3] record-btrace, disas: omit pc prefix markus.t.metzger
2013-02-27 7:59 ` Jan Kratochvil [this message]
2013-02-28 7:45 ` Metzger, Markus T
2013-02-28 7:56 ` Jan Kratochvil
2013-02-28 8:45 ` Metzger, Markus T
2013-02-28 8:54 ` Jan Kratochvil
2013-02-25 16:16 ` [PATCH 1/3] record, btrace: add record-btrace target markus.t.metzger
2013-02-27 7:38 ` Jan Kratochvil
2013-02-27 19:43 ` Jan Kratochvil
2013-02-28 17:17 ` Metzger, Markus T
2013-03-01 9:26 ` Jan Kratochvil
2013-02-25 16:16 ` [PATCH 3/3] doc, record: document record changes markus.t.metzger
2013-02-26 17:24 ` Eli Zaretskii
2013-03-01 14:07 ` Metzger, Markus T
2013-03-01 14:26 ` Eli Zaretskii
2013-03-01 14:48 ` Metzger, Markus T
2013-03-01 15:12 ` Eli Zaretskii
2013-03-01 15:21 ` Metzger, Markus T
2013-03-02 9:46 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130227075925.GA5003@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@gmail.com \
--cc=markus.t.metzger@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox