From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Clark Williams <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 04/15] perf tools: Add map_groups to 'struct addr_location'
Date: Fri, 29 Nov 2019 13:06:31 -0300 [thread overview]
Message-ID: <20191129160631.GD26963@kernel.org> (raw)
In-Reply-To: <20191129151733.GC26963@kernel.org>
Em Fri, Nov 29, 2019 at 12:17:33PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Nov 29, 2019 at 02:40:56PM +0100, Jiri Olsa escreveu:
> > > +++ b/tools/perf/util/callchain.c
> > > @@ -1119,8 +1119,8 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *
> > > goto out;
> > > }
> > >
> > > - if (al->map->groups == &al->machine->kmaps) {
> > > - if (machine__is_host(al->machine)) {
> > > + if (al->mg == &al->mg->machine->kmaps) {
> > heya, I'm getting segfault because of this change
> > perf record --call-graph dwarf ./ex
> > (gdb) r report --stdio
> > Program received signal SIGSEGV, Segmentation fault.
> > fill_callchain_info (al=0x7fffffffa1b0, node=0xcd2bd0, hide_unresolved=false) at util/callchain.c:1122
> > 1122 if (al->maps == &al->maps->machine->kmaps) {
> > (gdb) p al->maps
> > $1 = (struct maps *) 0x0
> > I wish all those map changes would go through some review,
> > I have no idea how the code works now ;-)
> ouch, I did tons of tests, obviously some more, and reviewing, would
> catch these, my bad, will try and fix this...
> And yeah, I reproduced the problem, working on a fix.
Can you try with this one-liner?
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 416d174d223c..c8c5410315e8 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2446,6 +2446,7 @@ static int append_inlines(struct callchain_cursor *cursor, struct map_symbol *ms
list_for_each_entry(ilist, &inline_node->val, list) {
struct map_symbol ilist_ms = {
+ .maps = ms->maps,
.map = map,
.sym = ilist->symbol,
};
next prev parent reply other threads:[~2019-11-29 16:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 18:37 [GIT PULL] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 01/15] perf map: Use map->dso->kernel + map__kmaps() in map__kmaps() Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 02/15] perf symbols: Stop using map->groups, we can use kmaps instead Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 03/15] perf map_groups: Pass the object to map_groups__find_ams() Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 04/15] perf tools: Add map_groups to 'struct addr_location' Arnaldo Carvalho de Melo
2019-11-29 13:40 ` Jiri Olsa
2019-11-29 15:17 ` Arnaldo Carvalho de Melo
2019-11-29 16:06 ` Arnaldo Carvalho de Melo [this message]
2019-11-29 18:03 ` Jiri Olsa
2019-11-29 18:59 ` Arnaldo Carvalho de Melo
2019-11-29 19:09 ` Jiri Olsa
2019-12-04 7:53 ` [tip: perf/urgent] perf machine: Fill map_symbol->maps in append_inlines() to fix segfault tip-bot2 for Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 05/15] perf annotate: Pass a 'map_symbol' in places receiving a pair of 'map' and 'symbol' pointers Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 06/15] perf unwind: Use 'struct map_symbol' in 'struct unwind_entry' Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 07/15] perf callchain: Use 'struct map_symbol' in 'struct callchain_cursor_node' Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 08/15] pref tools: Make 'struct addr_map_symbol' contain 'struct map_symbol' Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 09/15] perf symbols: Use kmaps(map)->machine when we know its a kernel map Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 10/15] perf tools: Add a 'struct map_groups' pointer to 'struct map_symbol' Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 11/15] perf annotate: Stop using map->groups, use map_symbol->mg instead Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 12/15] perf map: Combine maps__fixup_overlappings with its only use Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 13/15] perf map: Remove ->groups from 'struct map' Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 14/15] perf tool: Provide an option to print perf_event_open args and return value Arnaldo Carvalho de Melo
2019-11-12 18:37 ` [PATCH 15/15] perf parse: Use YYABORT to clear stack after failure, plugging leaks Arnaldo Carvalho de Melo
2019-11-15 7:35 ` [GIT PULL] perf/core improvements and fixes Ingo Molnar
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=20191129160631.GD26963@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).