linux/tools/perf
Arnaldo Carvalho de Melo 0a1eae391d perf tools: Don't keep unreferenced maps when unmaps are detected
For a file with:

[root@emilia linux-2.6-tip]# perf report -D -fi allmodconfig-j32.perf.data | grep events:
     TOTAL events:      36933
      MMAP events:       9056
      LOST events:          0
      COMM events:       1702
      EXIT events:       1887
  THROTTLE events:          8
UNTHROTTLE events:          8
      FORK events:       1894
      READ events:          0
    SAMPLE events:      22378
      ATTR events:          0
EVENT_TYPE events:          0
TRACING_DATA events:          0
  BUILD_ID events:          0
[root@emilia linux-2.6-tip]#

Testing with valgrind and making perf_session__delete() a nop, so that
we can notice how many maps were actually deleted due to not having any
samples on it:

==== HEAP SUMMARY:

Before:

==10339==     in use at exit: 8,909,997 bytes in 68,690 blocks
==10339==   total heap usage: 78,696 allocs, 10,007 frees, 11,925,853 bytes allocated

After:

==10506==     in use at exit: 8,902,605 bytes in 68,606 blocks
==10506==   total heap usage: 78,696 allocs, 10,091 frees, 11,925,853 bytes allocated

I.e. just 84 detected unmaps with no hits out of 9056 for this workload,
not much, but in some other long running workload this may save more
bytes.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-08-02 19:45:23 -03:00
..
arch Merge branch 'linus' into perf/core 2010-07-21 21:43:06 +02:00
bench perf options: Check v type in OPT_U?INTEGER 2010-05-17 15:43:38 -03:00
Documentation perf man pages: Fix cut'n'paste error 2010-07-28 11:30:10 -03:00
scripts perf, sched migration: Librarize task states and event headers helpers 2010-08-02 01:32:00 +02:00
util perf tools: Don't keep unreferenced maps when unmaps are detected 2010-08-02 19:45:23 -03:00
.gitignore perf tools: .gitignore += config.make config.make.autogen 2010-06-17 10:24:31 -03:00
builtin-annotate.c perf tools: Make event__preprocess_sample parse the sample 2010-06-05 09:35:19 -03:00
builtin-bench.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-buildid-cache.c perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
builtin-buildid-list.c perf tools: Remove unneeded code for tracking the cwd in perf sessions 2010-07-27 11:46:12 -03:00
builtin-diff.c perf tools: Remove unneeded code for tracking the cwd in perf sessions 2010-07-27 11:46:12 -03:00
builtin-help.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-inject.c perf inject: Add missing bits 2010-05-04 10:48:22 -03:00
builtin-kmem.c perf: add perf-inject builtin 2010-05-02 13:36:56 -03:00
builtin-kvm.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-list.c perf list: Fix large list output by using the pager 2009-08-13 09:05:48 +02:00
builtin-lock.c perf options: Type check OPT_BOOLEAN and fix the offenders 2010-05-17 16:22:37 -03:00
builtin-probe.c perf probe: Rename common fields/functions from kprobe to probe. 2010-07-30 12:01:38 -03:00
builtin-record.c perf tools: Release session and symbol resources on exit 2010-07-30 18:31:28 -03:00
builtin-report.c perf tools: Remove unneeded code for tracking the cwd in perf sessions 2010-07-27 11:46:12 -03:00
builtin-sched.c perf: Use event__process_task from perf sched 2010-06-01 00:10:32 +02:00
builtin-stat.c perf tools: Add the ability to specify list of cpus to monitor 2010-06-05 09:33:01 -03:00
builtin-test.c perf options: Type check OPT_BOOLEAN and fix the offenders 2010-05-17 16:22:37 -03:00
builtin-timechart.c x86 cpufreq, perf: Make trace_power_frequency cpufreq driver independent 2010-07-22 12:08:27 +02:00
builtin-top.c perf tools: Make event__preprocess_sample parse the sample 2010-06-05 09:35:19 -03:00
builtin-trace.c perf: Report lost events in perf trace debug mode 2010-06-24 23:36:23 +02:00
builtin.h perf: add perf-inject builtin 2010-05-02 13:36:56 -03:00
command-list.txt perf inject: Add missing bits 2010-05-04 10:48:22 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01:00
feature-tests.mak perf tools: Reorganize the Makefile feature tests 2010-06-09 16:57:39 -03:00
Makefile perf tools: Fix fallback to cplus_demangle() when bfd_demangle() is not available 2010-07-22 17:30:39 -03:00
MANIFEST perf tools: Make target to generate self contained source tarball 2010-06-05 09:33:35 -03:00
perf-archive.sh perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
perf.c perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
perf.h perf options: Type check OPT_BOOLEAN and fix the offenders 2010-05-17 16:22:37 -03:00