This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] btrace: compute line range when printing
- From: Pedro Alves <palves at redhat dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: gdb-patches at sourceware dot org, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Mon, 02 Mar 2015 22:08:37 +0000
- Subject: Re: [PATCH] btrace: compute line range when printing
- Authentication-results: sourceware.org; auth=none
- References: <1423496274-17687-1-git-send-email-markus dot t dot metzger at intel dot com>
On 02/09/2015 03:37 PM, Markus Metzger wrote:
> The "record function-call-history" command prints the range of source lines
> for a function segment when given the /l modifier. This information is
> computed for the entire execution history when processing the recorded branch
> trace.
>
> To speed up the initial trace processing, we compute the information when
> we print a function segment and only if requested. The computation is fast
> enough (due to the limited scope) that it is not worth storing the data in
> struct btrace_function, anymore.
>
> CC: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
>
> * btrace.h (btrace_function) <lbegin, lend>: Remove.
> * btrace.c (ftrace_debug): Do not print the line range.
> (ftrace_skip_file, ftrace_update_lines): Remove.
> (ftrace_new_function): Remove lbegin and lend initialization.
> (btrace_compute_ftrace_bts): Remove call to ftrace_update_lines.
> * record-btrace.c (btrace_compute_src_line_range): New.
> (btrace_call_history_src_line): Call btrace_compute_src_line_range.
OK.
Thanks,
Pedro Alves