[PATCH 01/25] ldv/unwind: improve stacktrace feature(v3)
Luca Clementi
luca.clementi at gmail.com
Sat Nov 16 19:32:06 UTC 2013
On Sat, Nov 9, 2013 at 10:41 PM, Masatake YAMATO <yamato at redhat.com> wrote:
> Based on the discussion on strace-devel, I improved following points:
>
This patch does not apply cleanly on the ldv/unwind branch of Denys,
he amended a commit on the top of the old ldv/unwind, so you need to
fetch and git reset --hard remotes/origin/ldv/unwind.
The conflicts are trivial.
And the patch series works well.
Just two minor comments.
> +
> +static void
> +stacktrace_capture(struct tcb *tcp)
> +{
> + stacktrace_walk(tcp, queue_put_call, queue_put_error,
> + tcp->queue);
> +}
stacktrace_capture is called only once, is there any reason why it
can't be removed?
> +
> +
> +static void
> +print_call_cb(void *dummy,
> + char *binary_filename,
> + char *symbol_name,
> + unw_word_t function_off_set,
> + unsigned long true_offset)
> +{
> + print_call(binary_filename,
> + symbol_name,
> + function_off_set,
> + true_offset);
> +}
> +
> +static void
> +print_error_cb(void *dummy,
> + const char *error,
> + unsigned long true_offset)
> +{
> + print_error(error, true_offset);
> +}
> +
> +static void
> +stacktrace_print(struct tcb *tcp)
> +{
> + DPRINTF("tcp=%p, queue=%p", "stackprint", tcp, tcp->queue->head);
> + stacktrace_walk(tcp, print_call_cb, print_error_cb, NULL);
> +}
> +
stacktrace_print ditto...
I'm just looking if the patch can be simplified a little.
Luca
More information about the Strace-devel
mailing list