This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: record btrace experience [Re: x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure]]
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 26 Jan 2015 07:59:59 +0000
- Subject: RE: record btrace experience [Re: x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure]]
- Authentication-results: sourceware.org; auth=none
- References: <1389686678-9039-1-git-send-email-markus dot t dot metzger at intel dot com> <1389686678-9039-7-git-send-email-markus dot t dot metzger at intel dot com> <20150108204943 dot GA4851 at host2 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B231E6C3811 at IRSMSX104 dot ger dot corp dot intel dot com> <A78C989F6D9628469189715575E55B231E6C4759 at IRSMSX104 dot ger dot corp dot intel dot com> <20150122163740 dot GA11113 at host2 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B231E6C51CF at IRSMSX104 dot ger dot corp dot intel dot com> <20150125191240 dot GA2646 at host1 dot jankratochvil dot net>
> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Sunday, January 25, 2015 8:13 PM
Thanks a lot for the feedback.
> BTW these defaults sometimes did limit my use of btrace but right now I do
> not
> have a reproducer where it works with setting them unlimited while it does
> not
> while leaving them as they are:
> (gdb) show record instruction-history-size
> Number of instructions to print in "record instruction-history" is 10.
> (gdb) show record function-call-history-size
> Number of functions to print in "record function-call-history" is 10.
Regarding instruction-history-size and function-call-history-size,
they only affect the number of lines displayed in the "record
instruction-history" and "record function-call-history" commands. They
should have no impact on recording or on the backtrace command.
I think what you are looking for is a command to set the buffer size.
See https://sourceware.org/ml/gdb-patches/2014-11/msg00462.html.
> The problem I see is how to transparently enable btrace on some host.
>
> Instead of
> -ex r
> one has to type
> -ex start -ex 'set record instruction-history-size unlimited' -ex 'set
> record function-call-history-size unlimited' -ex 'record btrace' -ex c
> which is really not convenient.
[...]
> Obviously it would be nice to be able to do just:
> echo 'record btrace' >>~/.gdbinit
Agreed.
I guess you know the record architecture better than I do. The record
command pushes a new record target onto the target stack. This requires
a running inferior.
We could try to instead install a hook to delay pushing the record target
until we have an inferior. The hook will remain installed when the inferior
terminates or is rerun; "record stop" will remove the hook.
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052