From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751200AbaEWIOP (ORCPT ); Fri, 23 May 2014 04:14:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48277 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750823AbaEWIOM (ORCPT ); Fri, 23 May 2014 04:14:12 -0400 Date: Fri, 23 May 2014 10:13:57 +0200 From: Jiri Olsa To: Jiri Olsa Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Corey Ashford , David Ahern , Frederic Weisbecker , Ingo Molnar , Jean Pihet , Namhyung Kim , Paul Mackerras , Peter Zijlstra Subject: Re: [PATCHv2 00/14] perf tools: Speedup DWARF unwind Message-ID: <20140523081357.GC1074@krava> References: <1400174615-2121-1-git-send-email-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400174615-2121-1-git-send-email-jolsa@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ping ;-) thanks, jirka On Thu, May 15, 2014 at 07:23:21PM +0200, Jiri Olsa wrote: > hi, > trying to speedup DWARF unwind report code by factoring > related code: > - caching sample's registers access > - keep dso data file descriptor open for the > life of the dso object > - replace dso cache code by mapping dso data file > directly for the life of the dso object > > The speedup is mainly for libunwind unwind. The libdw will benefit > mainly from cached registers access, because it handles dso data > accesses by itself.. and anyway it's still faster ;-). > > v2 changes: > - adding limit for open dso objects with sort of LRU > mechanism to pick up and close dso objects if we > are over the limit > - file mmaping changes are omitted, because I couldn't prove > the improvement exactly, will resubmit later > - added dso close logic in case of no memory > - added tests > > On 10GB perf data file with dwarf unwind data I've got > around 30% speed up. > > Also reachable in here: > git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git > perf/core_unwind_speedup > > thanks, > jirka > > Cc: Arnaldo Carvalho de Melo > Cc: Corey Ashford > Cc: David Ahern > Cc: Frederic Weisbecker > Cc: Ingo Molnar > Cc: Jean Pihet > Cc: Namhyung Kim > Cc: Paul Mackerras > Cc: Peter Zijlstra > Signed-off-by: Jiri Olsa > --- > Jiri Olsa (14): > perf tools: Cache register accesses for unwind processing > perf tools: Separate dso data related variables > perf tools: Add data_fd into dso object > perf tools: Add global list of opened dso objects > perf tools: Add global count of opened dso objects > perf tools: Cache dso data file descriptor > perf tools: Add file size check and factor dso__data_read_offset > perf tools: Allow to close dso fd in case of open failure > perf tools: Add dso__data_* interface descriptons > perf tests: Spawn child for each test > perf tests: Allow reuse of test_file function > perf tests: Add test interface for dso data fd limit > perf tests: Add test for caching dso file descriptors > perf tests: Add test for closing dso objects on EMFILE error > > tools/perf/tests/builtin-test.c | 42 ++++++++++++++- > tools/perf/tests/dso-data.c | 256 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- > tools/perf/tests/tests.h | 2 + > tools/perf/util/dso.c | 274 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- > tools/perf/util/dso.h | 56 +++++++++++++++++++- > tools/perf/util/event.h | 5 ++ > tools/perf/util/perf_regs.c | 10 +++- > tools/perf/util/perf_regs.h | 4 +- > tools/perf/util/unwind-libunwind.c | 4 +- > 9 files changed, 617 insertions(+), 36 deletions(-)