remarkable-linux/tools/perf
David Ahern 7c0f4a4113 perf kvm: Guest userspace samples should not be lumped with host uspace
e.g., perf kvm --host  --guest report -i perf.data --stdio -D
shows:

1 599127912065356 0x143b8 [0x48]: PERF_RECORD_SAMPLE(IP, 5): 5671/5676: 0x7fdf95a061c0 period: 1 addr: 0
... chain: nr:2
.....  0: ffffffffffffff80
.....  1: fffffffffffffe00
 ... thread: qemu-kvm:5671
 ...... dso: <not found>

(IP, 5) means sample in guest userspace. Those samples should not be lumped
into the VMM's host thread. i.e, the report output:

    56.86%  qemu-kvm  [unknown]         [u] 0x00007fdf95a061c0

With this patch the output emphasizes it is a guest userspace hit:

    56.86%  [guest/5671]  [unknown]         [u] 0x00007fdf95a061c0

Looking at 3 VMs (2 64-bit, 1 32-bit) with each running a CPU bound
process (openssl speed), perf report currently shows:

  93.84%  117726   qemu-kvm  [unknown]   [u] 0x00007fd7dcaea8e5

which is wrong. With this patch you get:

  31.50%   39258   [guest/18772]  [unknown]   [u] 0x00007fd7dcaea8e5
  31.50%   39236   [guest/11230]  [unknown]   [u] 0x0000000000a57340
  30.84%   39232   [guest/18395]  [unknown]   [u] 0x00007f66f641e107

Tested-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1342826756-64663-4-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-07-25 11:29:46 -03:00
..
arch
bench perf bench: Fix confused variable namings and descriptions in mem subsystem 2012-07-02 14:35:45 -03:00
config perf ui/gtk: Add GTK info_bar widget to browser window 2012-06-19 13:06:19 -03:00
Documentation perf bench: Fix confused variable namings and descriptions in mem subsystem 2012-07-02 14:35:45 -03:00
python
scripts
ui perf annotate: Check null of sym pointer before using it 2012-06-19 14:30:26 -03:00
util perf kvm: Guest userspace samples should not be lumped with host uspace 2012-07-25 11:29:46 -03:00
.gitignore perf tools: Ignore auto-generated bison/flex files 2012-04-14 13:50:39 -03:00
builtin-annotate.c perf tools: Convert critical messages to ui__error() 2012-05-29 11:53:42 -03:00
builtin-bench.c perf bench: Documentation update 2012-06-27 13:17:48 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Work better with pipe mode 2012-05-22 13:03:54 -03:00
builtin-diff.c perf diff: Fix to work with new hists design 2012-03-22 15:12:09 -03:00
builtin-evlist.c perf tools: Move all users of event_name to perf_evsel__name 2012-06-19 13:06:20 -03:00
builtin-help.c
builtin-inject.c perf inject: Fix broken perf inject -b 2012-05-22 12:59:28 -03:00
builtin-kmem.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-kvm.c
builtin-list.c
builtin-lock.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-probe.c perf probe: Detect probe target when m/x options are absent 2012-05-11 13:58:53 -03:00
builtin-record.c perf tools: Move all users of event_name to perf_evsel__name 2012-06-19 13:06:20 -03:00
builtin-report.c perf report: Delay sample_type checks in pipe mode 2012-06-27 13:19:14 -03:00
builtin-sched.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-script.c perf tools: Stop using a global trace events description list 2012-06-27 13:08:42 -03:00
builtin-stat.c Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core 2012-06-20 13:41:53 +02:00
builtin-test.c perf tools: Move all users of event_name to perf_evsel__name 2012-06-19 13:06:20 -03:00
builtin-timechart.c
builtin-top.c perf tools: Remove unused evsel parameter from machine__resolve_callchain 2012-06-19 13:06:21 -03:00
builtin.h
command-list.txt
CREDITS
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
Makefile perf tools: Trivial build fix 2012-06-27 13:32:06 -03:00
MANIFEST perf tools: Fix make tarballs 2012-05-30 15:05:59 -03:00
perf-archive.sh perf archive: Correct cutting of symbolic link 2012-04-14 13:52:15 -03:00
perf.c
perf.h perf record: Fix branch_stack type in perf_record_opts 2012-05-25 18:32:44 -03:00