From: Arun Sharma <asharma@fb.com>
To: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Jean Pihet <jean.pihet@linaro.org>
Subject: Re: [PATCH 2/2] perf callchain: Use global caching provided by libunwind
Date: Tue, 23 Sep 2014 14:01:22 +0000 [thread overview]
Message-ID: <54217D09.40500@fb.com> (raw)
In-Reply-To: 1411453828-14832-2-git-send-email-namhyung@kernel.org
On 9/23/14, 12:00 PM, Namhyung Kim wrote:
> + unw_set_caching_policy(addr_space, UNW_CACHE_GLOBAL);
The result is a bit surprising for me. In micro benchmarking (eg:
Lperf-simple), the per-thread policy is generally faster because it
doesn't involve locking.
libunwind/tests/Lperf-simple
unw_getcontext : cold avg= 109.673 nsec, warm avg= 28.610 nsec
unw_init_local : cold avg= 259.876 nsec, warm avg= 9.537 nsec
no cache : unw_step : 1st= 3258.387 min= 2922.331 avg= 3002.384 nsec
global cache : unw_step : 1st= 1192.093 min= 960.486 avg= 982.208 nsec
per-thread cache: unw_step : 1st= 429.153 min= 113.533 avg= 121.762 nsec
I can see how the global policy would involve less memory allocation
because of shared data structures. Curious about the reason for the
speedup (specifically if libunwind should change the defaults for the
non-local unwinding case).
-Arun
next prev parent reply other threads:[~2014-09-23 14:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 6:30 [PATCH 1/2] perf callchain: Create an address space per thread Namhyung Kim
2014-09-23 6:30 ` [PATCH 2/2] perf callchain: Use global caching provided by libunwind Namhyung Kim
2014-09-23 12:28 ` Jiri Olsa
2014-09-23 12:53 ` Namhyung Kim
2014-09-24 1:04 ` Namhyung Kim
2014-09-23 14:01 ` Arun Sharma [this message]
2014-09-24 2:24 ` Namhyung Kim
2014-09-24 13:45 ` Jean Pihet
2014-09-26 5:50 ` Namhyung Kim
2014-09-26 7:14 ` Jean Pihet
2014-09-29 2:35 ` Namhyung Kim
2014-09-23 12:24 ` [PATCH 1/2] perf callchain: Create an address space per thread Jiri Olsa
2014-09-23 12:49 ` Namhyung Kim
2014-09-26 15:35 ` Arnaldo Carvalho de Melo
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=54217D09.40500@fb.com \
--to=asharma@fb.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=jean.pihet@linaro.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/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.