mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: acme@redhat.com, a.p.zijlstra@chello.nl, mingo@elte.hu,
	paulus@samba.org, cjashfor@linux.vnet.ibm.com,
	fweisbec@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] perf, tool: Force guest machine definition option
Date: Fri, 13 Apr 2012 13:32:07 +0200	[thread overview]
Message-ID: <20120413113207.GB3384@m.brq.redhat.com> (raw)
In-Reply-To: <4F86E965.4010506@gmail.com>

On Thu, Apr 12, 2012 at 08:40:37AM -0600, David Ahern wrote:
> On 4/12/12 6:21 AM, Jiri Olsa wrote:
> >Running 'perf kvm record' without any of following options:
> >   --guestmount
> >   --guestvmlinux
> >   --guestkallsyms
> >   --guestmodules
> >
> >is causing the guest machine to be ommited from the data file,
> >and all guest samples are counted in nr_unprocessable_samples.
> 
> Even with guestmount specified you can hit this path -- e.g., no
> pid-based directory under guestmount for a VM.

hm, something's wrong anyway..

[root@dhcp-26-214 perf]# ./perf kvm --guest --guestkallsyms=./kallsyms record -p 1791
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.013 MB perf.data.guest (~576 samples) ]
[root@dhcp-26-214 perf]# ./perf kvm --guest --guestkallsyms=./kallsyms report --stdio
Segmentation fault (core dumped)

it segfaults on guest mmap (attached bt) having NULL machine,
since no guest kernel buildid/dso was stored&loaded..
the host/guest machines code seems too 'complex' ;)

jirka


Program received signal SIGSEGV, Segmentation fault.
0x000000000046a35e in machine__mmap_name (self=0x0, bf=0x7fffffffbf30 "[kernel.kallsyms]", size=4096) at util/map.c:711
711                     snprintf(bf, size, "[%s.%d]", "guest.kernel.kallsyms", self->pid);
Missing separate debuginfos, use: debuginfo-install atk-2.2.0-2.fc16.x86_64 bzip2-libs-1.0.6-3.fc15.x86_64 cairo-1.10.2-4.fc16.x86_64 elfutils-libelf-0.153-1.fc16.x86_64 elfutils-libs-0.153-1.fc16.x86_64 fontconfig-2.8.0-4.fc16.x86_64 freetype-2.4.6-4.fc16.x86_64 gdk-pixbuf2-2.24.1-1.fc16.x86_64 glib2-2.30.2-1.fc16.x86_64 gtk2-2.24.8-3.fc16.x86_64 libX11-1.4.3-1.fc16.x86_64 libXau-1.0.6-2.fc15.x86_64 libXcomposite-0.4.3-2.fc15.x86_64 libXcursor-1.1.11-3.fc15.x86_64 libXdamage-1.1.3-2.fc15.x86_64 libXext-1.3.0-1.fc16.x86_64 libXfixes-5.0-1.fc16.x86_64 libXi-1.4.5-1.fc16.x86_64 libXinerama-1.1.1-2.fc15.x86_64 libXrandr-1.3.1-2.fc15.x86_64 libXrender-0.9.6-2.fc15.x86_64 libffi-3.0.10-1.fc16.x86_64 libpng-1.2.46-2.fc16.x86_64 libselinux-2.1.6-6.fc16.x86_64 libxcb-1.7-3.fc16.x86_64 newt-0.52.14-1.fc16.x86_64 nss-softokn-freebl-3.13.3-1.fc16.x86_64 pango-1.29.4-1.fc16.x86_64 perl-libs-5.14.2-197.fc16.x86_64 pixman-0.22.2-1.fc16.x86_64 python-libs-2.7.2-5.2.fc16.x86_64 slang-2.2.4-1.fc16.x86_64 xz-libs-5.1.1-1alpha.fc16.x86_64
(gdb) bt
#0  0x000000000046a35e in machine__mmap_name (self=0x0, bf=0x7fffffffbf30 "[kernel.kallsyms]", size=4096) at util/map.c:711
#1  0x0000000000443d84 in perf_event__process_kernel_mmap (tool=0x7fffffffdf40, event=0x7ffff7ff5168, machine=0x0) at util/event.c:550
#2  0x0000000000444265 in perf_event__process_mmap (tool=0x7fffffffdf40, event=0x7ffff7ff5168, sample=0x7fffffffd430, machine=0x0)
    at util/event.c:656
#3  0x000000000046d099 in perf_session_deliver_event (session=0x905570, event=0x7ffff7ff5168, sample=0x7fffffffd430, tool=
    0x7fffffffdf40, file_offset=360) at util/session.c:884
#4  0x000000000046d578 in perf_session__process_event (session=0x905570, event=0x7ffff7ff5168, tool=0x7fffffffdf40, file_offset=360)
    at util/session.c:990
#5  0x000000000046ddc6 in __perf_session__process_events (session=0x905570, data_offset=288, data_size=13824, file_size=14112, tool=
    0x7fffffffdf40) at util/session.c:1219
#6  0x000000000046df60 in perf_session__process_events (self=0x905570, tool=0x7fffffffdf40) at util/session.c:1258
#7  0x0000000000423b7d in __cmd_report (rep=0x7fffffffdf40) at builtin-report.c:367
#8  0x0000000000424f3e in cmd_report (argc=0, argv=0x9053a0, prefix=0x0) at builtin-report.c:752
#9  0x00000000004370c9 in __cmd_report (argc=2, argv=0x7fffffffe420) at builtin-kvm.c:84
#10 0x00000000004373ee in cmd_kvm (argc=2, argv=0x7fffffffe420, prefix=0x0) at builtin-kvm.c:131
#11 0x0000000000414ead in run_builtin (p=0x796488, argc=4, argv=0x7fffffffe420) at perf.c:273
#12 0x00000000004150a7 in handle_internal_command (argc=4, argv=0x7fffffffe420) at perf.c:345
#13 0x00000000004151f3 in run_argv (argcp=0x7fffffffe30c, argv=0x7fffffffe300) at perf.c:389
#14 0x0000000000415479 in main (argc=4, argv=0x7fffffffe420) at perf.c:487

  reply	other threads:[~2012-04-13 11:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 12:20 [PATCH 0/3] perf, tool: kvm record & event processing fixies Jiri Olsa
2012-04-12 12:21 ` [PATCH 1/3] perf, tool: Force guest machine definition option Jiri Olsa
2012-04-12 14:40   ` David Ahern
2012-04-13 11:32     ` Jiri Olsa [this message]
2012-04-13 12:21       ` David Ahern
2012-04-13 12:41         ` Jiri Olsa
2012-04-13 14:15           ` David Ahern
2012-04-15 14:05             ` Jiri Olsa
2012-04-15 21:32               ` David Ahern
2012-04-12 12:21 ` [PATCH 2/3] perf, tool: Skip event correctly for unknown id/machine Jiri Olsa
2012-04-15  8:34   ` [tip:perf/urgent] perf session: " tip-bot for Jiri Olsa
2012-04-12 12:21 ` [PATCH 3/3] perf, tool: Fail on processing event with unknown size Jiri Olsa
2012-04-16 18:42   ` [PATCHv2 " Jiri Olsa
2012-05-11  6:37     ` [tip:perf/core] perf session: " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120413113207.GB3384@m.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®