linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 00/14] perf tools: Speedup DWARF unwind
@ 2014-05-15 17:23 Jiri Olsa
  2014-05-15 17:23 ` [PATCH 01/14] perf tools: Cache register accesses for unwind processing Jiri Olsa
                   ` (14 more replies)
  0 siblings, 15 replies; 37+ messages in thread
From: Jiri Olsa @ 2014-05-15 17:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Arnaldo Carvalho de Melo, Corey Ashford, David Ahern,
	Frederic Weisbecker, Ingo Molnar, Jean Pihet, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Jiri Olsa

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 <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
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(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread
* [GIT PULL 00/14] perf/core improvements and fixes
@ 2014-06-12 15:30 Jiri Olsa
  2014-06-12 15:30 ` [PATCH 13/14] perf tests: Add test for caching dso file descriptors Jiri Olsa
  0 siblings, 1 reply; 37+ messages in thread
From: Jiri Olsa @ 2014-06-12 15:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andi Kleen, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra

hi Ingo,
please consider pulling

thanks,
jirka

The following changes since commit 7184062b94b4bfac08715fb786fd2df399c5d6ee:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-06-12 13:54:42 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo

for you to fetch changes up to 45dc1bb5c1d47f9519e2101f6b073bb4bb1d1f99:

  perf tests: Add test for closing dso objects on EMFILE error (2014-06-12 16:53:23 +0200)

----------------------------------------------------------------
perf/core improvements and fixes:

. Honor user freq/interval properly in record command (Namhyung Kim)

. Speedup DWARF unwind (Jiri Olsa)

Signed-off-by: Jiri Olsa <jolsa@kernel.org>

----------------------------------------------------------------
Jiri Olsa (13):
      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 for caching dso file descriptors
      perf tests: Add test for closing dso objects on EMFILE error

Namhyung Kim (1):
      perf record: Fix to honor user freq/interval properly

 tools/perf/tests/builtin-test.c    |  42 +++++-
 tools/perf/tests/dso-data.c        | 214 +++++++++++++++++++++++++++-
 tools/perf/tests/tests.h           |   2 +
 tools/perf/util/dso.c              | 279 +++++++++++++++++++++++++++++++++----
 tools/perf/util/dso.h              |  50 ++++++-
 tools/perf/util/event.h            |   5 +
 tools/perf/util/evsel.c            |   4 +-
 tools/perf/util/perf_regs.c        |  10 +-
 tools/perf/util/perf_regs.h        |   4 +-
 tools/perf/util/unwind-libunwind.c |   2 -
 10 files changed, 574 insertions(+), 38 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2014-06-12 15:32 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15 17:23 [PATCHv2 00/14] perf tools: Speedup DWARF unwind Jiri Olsa
2014-05-15 17:23 ` [PATCH 01/14] perf tools: Cache register accesses for unwind processing Jiri Olsa
2014-05-15 17:23 ` [PATCH 02/14] perf tools: Separate dso data related variables Jiri Olsa
2014-05-15 17:23 ` [PATCH 03/14] perf tools: Add data_fd into dso object Jiri Olsa
2014-05-15 17:23 ` [PATCH 04/14] perf tools: Add global list of opened dso objects Jiri Olsa
2014-05-15 17:23 ` [PATCH 05/14] perf tools: Add global count " Jiri Olsa
2014-05-15 17:23 ` [PATCH 06/14] perf tools: Cache dso data file descriptor Jiri Olsa
2014-05-27  1:05   ` Namhyung Kim
2014-05-27  7:37     ` Jiri Olsa
2014-05-29  0:02       ` Namhyung Kim
2014-05-29  9:01         ` Jiri Olsa
2014-05-15 17:23 ` [PATCH 07/14] perf tools: Add file size check and factor dso__data_read_offset Jiri Olsa
2014-05-15 17:23 ` [PATCH 08/14] perf tools: Allow to close dso fd in case of open failure Jiri Olsa
2014-05-15 17:23 ` [PATCH 09/14] perf tools: Add dso__data_* interface descriptons Jiri Olsa
2014-05-27  1:06   ` Namhyung Kim
2014-05-27  7:38     ` Jiri Olsa
2014-05-15 17:23 ` [PATCH 10/14] perf tests: Spawn child for each test Jiri Olsa
2014-05-27  1:08   ` Namhyung Kim
2014-05-27  7:39     ` Jiri Olsa
2014-05-15 17:23 ` [PATCH 11/14] perf tests: Allow reuse of test_file function Jiri Olsa
2014-05-15 17:23 ` [PATCH 12/14] perf tests: Add test interface for dso data fd limit Jiri Olsa
2014-05-27  1:10   ` Namhyung Kim
2014-05-27  7:51     ` Jiri Olsa
2014-05-15 17:23 ` [PATCH 13/14] perf tests: Add test for caching dso file descriptors Jiri Olsa
2014-05-27  1:36   ` Namhyung Kim
2014-05-27  7:54     ` Jiri Olsa
2014-05-29  0:06       ` Namhyung Kim
2014-05-29  8:37         ` Jiri Olsa
2014-05-30  2:11           ` Namhyung Kim
2014-05-30  8:42             ` Jiri Olsa
2014-05-15 17:23 ` [PATCH 14/14] perf tests: Add test for closing dso objects on EMFILE error Jiri Olsa
2014-05-27  1:43   ` Namhyung Kim
2014-05-27  7:59     ` Jiri Olsa
2014-05-23  8:13 ` [PATCHv2 00/14] perf tools: Speedup DWARF unwind Jiri Olsa
2014-05-23 13:26   ` Jean Pihet
2014-05-26 17:36     ` Jiri Olsa
  -- strict thread matches above, loose matches on Subject: below --
2014-06-12 15:30 [GIT PULL 00/14] perf/core improvements and fixes Jiri Olsa
2014-06-12 15:30 ` [PATCH 13/14] perf tests: Add test for caching dso file descriptors Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).