Re: [PATCH v8 03/14] perf tools: Introducing struct unwind_libunwind_ops for local unwind
From: Jiri Olsa
Date: Thu Jun 02 2016 - 16:35:06 EST
On Thu, Jun 02, 2016 at 09:55:15AM +0000, He Kuang wrote:
SNIP
> @@ -680,3 +680,52 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
>
> return get_entries(&ui, cb, arg, max_stack);
> }
> +
> +static struct unwind_libunwind_ops
> +_unwind_libunwind_ops = {
> + .prepare_access = _unwind__prepare_access,
> + .flush_access = _unwind__flush_access,
> + .finish_access = _unwind__finish_access,
> + .get_entries = _unwind__get_entries,
> +};
> +
> +struct unwind_libunwind_ops *
> +local_unwind_libunwind_ops = &_unwind_libunwind_ops;
> +
> +void unwind__register_ops(struct thread *thread,
> + struct unwind_libunwind_ops *ops)
> +{
> + thread->unwind_libunwind_ops = ops;
> +}
no need for unwind__register_ops to be global
please make it static
jirka