public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
	"paulus@samba.org" <paulus@samba.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"acme@kernel.org" <acme@kernel.org>,
	"acme@redhat.com" <acme@redhat.com>,
	"jolsa@kernel.org" <jolsa@kernel.org>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	"Hunter, Adrian" <adrian.hunter@intel.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"brueckner@linux.vnet.ibm.com" <brueckner@linux.vnet.ibm.com>,
	"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>
Subject: Re: [PATCH v1] perf callchain: fix kernel symbol resolution by remembering the cpumode
Date: Fri, 27 Mar 2015 20:12:42 +0100	[thread overview]
Message-ID: <20150327201242.337b04db@thinkpad-w530> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F0770177B54A@SHSMSX103.ccr.corp.intel.com>

> 
> 
> > Commit 2e77784bb7d8 ("perf callchain: Move cpumode resolve code to
> > add_callchain_ip") promised "No change in behavior.".
> > 
> > As this commit breaks callchains on s390x (symbols not getting resolved,
> > observed when profiling the kernel), this statement is wrong. The
> > cpumode must be kept when iterating over all ips, otherwise the default
> > (PERF_RECORD_MISC_USER) will be used by error.
> 
> Indeed.
> Besides thread__resolve_callchain_sample, lbr path also need to 
> be patched.

Thanks, I'll include that and send another version.

David

> 
> @@ -1538,6 +1536,7 @@ static int resolve_lbr_callchain_sample
> (struct thread *thread,
>  {
>         struct ip_callchain *chain = sample->callchain;
>         int chain_nr = min(max_stack, (int)chain->nr);
> +       u8 cpumode = PERF_RECORD_MISC_USER;
>         int i, j, err;
>         u64 ip;
> 
> @@ -1584,7 +1583,7 @@ static int resolve_lbr_callchain_sample
> (struct thread *thread,
>                                         ip = lbr_stack->entries[0].to;
>                         }
> 
> -                       err = add_callchain_ip(thread, parent, root_al, false, ip);
> +                      err = add_callchain_ip(thread, parent, root_al, &cpumode, ip);
>                         if (err)
>                                 return (err < 0) ? err : 0;
>                 }
> 
> Thanks,
> Kan
> 


  reply	other threads:[~2015-03-27 19:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 15:08 [PATCH v1] perf callchain: fix kernel symbol resolution by remembering the cpumode David Hildenbrand
2015-03-27 16:09 ` Liang, Kan
2015-03-27 19:12   ` David Hildenbrand [this message]
2015-03-30  8:11 ` [PATCH v2] " David Hildenbrand
2015-03-30  8:54   ` Jiri Olsa
2015-03-30  9:18     ` David Hildenbrand
2015-04-02 12:23   ` [tip:perf/core] perf callchain: Fix " tip-bot for David Hildenbrand

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=20150327201242.337b04db@thinkpad-w530 \
    --to=dahi@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=schwidefsky@de.ibm.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