From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Wang Nan <wangnan0@huawei.com>,
jolsa@kernel.org, linux-kernel@vger.kernel.org,
lizefan@huawei.com, namhyung@kernel.org, a.p.zijlstra@chello.nl,
paulus@samba.org, mingo@redhat.com,
masami.hiramatsu.pt@hitachi.com
Subject: Re: [PATCH v2] perf: fix dwarf unwind using libunwind.
Date: Wed, 14 Jan 2015 09:50:25 -0300 [thread overview]
Message-ID: <20150114125025.GA3691@kernel.org> (raw)
In-Reply-To: <20150114115749.GB6369@krava.redhat.com>
Em Wed, Jan 14, 2015 at 12:57:49PM +0100, Jiri Olsa escreveu:
> On Wed, Jan 14, 2015 at 10:36:47AM +0800, Wang Nan wrote:
> > Perf tool fails to unwind user stack if the event raises in a shared
>
> SNIP
>
> > +
> > __attribute__ ((noinline))
> > static int krava_3(struct thread *thread)
> > {
> > - return unwind_thread(thread);
> > + struct thread *array[2] = {thread, thread};
> > + void *fp = &bsearch;
> > + /*
> > + * make _bsearch a volatile function pointer to
> > + * prevent potential optimization, which may expand
> > + * bsearch and call compare directly from this function,
> > + * instead of libc shared object.
> > + */
> > + void *(*volatile _bsearch)(void *, void *, size_t,
> > + size_t, int (*)(void *, void *));
> > +
> > + _bsearch = fp;
> > + _bsearch(array, &thread, 2, sizeof(struct thread **), compare);
> > + return global_unwind_retval;
> > }
>
> ah, I've got confused with the NO_LIBUNWIND_DEBUG_FRAME name
> and got the impression that we could use it in the tests/make
> as another compile option test..
>
> but your change is even better ;-) thanks for updating this test
>
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks, applied to perf/urgent.
- Arnaldo
next prev parent reply other threads:[~2015-01-14 12:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 2:54 [PATCH] perf: fix dwarf unwind using libunwind Wang Nan
2015-01-13 7:10 ` Jiri Olsa
2015-01-13 8:36 ` Wang Nan
2015-01-13 9:19 ` Jiri Olsa
2015-01-14 2:36 ` [PATCH v2] " Wang Nan
2015-01-14 11:57 ` Jiri Olsa
2015-01-14 12:50 ` Arnaldo Carvalho de Melo [this message]
2015-01-17 10:12 ` [tip:perf/urgent] perf test: Fix " tip-bot for Wang Nan
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=20150114125025.GA3691@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=wangnan0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.