lkml.org 
[lkml]   [2013]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/9] perf report: Don't be bothered with locking when adding hist entries
On Tue, May 14, 2013 at 11:09:03AM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@lge.com>
>
> The perf report is single-threaded, so no need to grab a lock.
> Although the fast path of pthread_mutex_[un]lock() is very fast,
> there's ~3% gain by eliminating it when we have huge sample data.
>
> $ perf record -a -F 100000 -o perf.data.bench -- perf bench sched all
> $ perf record -e cycles:upp -o perf.data.before -- \
> > perf report -i perf.data.bench --stdio > /dev/null
> ... apply this patch ...
> $ perf record -e cycles:upp -o perf.data.after -- \
> > perf report -i perf.data.bench --stdio > /dev/null
> $ perf diff perf.data.{before,after} | grep pthread
> +0.02% libpthread-2.15.so [.] _pthread_cleanup_push_defer
> +0.02% libpthread-2.15.so [.] _pthread_cleanup_pop_restore
> 0.05% -0.05% perf [.] pthread_mutex_unlock@plt
> 0.05% -0.05% perf [.] pthread_mutex_lock@plt
> 1.01% -1.01% libpthread-2.15.so [.] pthread_mutex_lock
> 1.68% -1.68% libpthread-2.15.so [.] __pthread_mutex_unlock_usercnt
> 0.05% -0.05% libpthread-2.15.so [.] pthread_mutex_unlock
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/builtin-report.c | 4 ----
> 1 file changed, 4 deletions(-)

nice :)

Acked-by: Jiri Olsa <jolsa@redhat.com>

jirka


\
 
 \ /
  Last update: 2013-05-17 17:21    [W:2.075 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site