mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "acme@kernel.org" <acme@kernel.org>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>
Subject: Re: [PATCH V5 3/3] perf tool: check buildid for symoff
Date: Fri, 28 Nov 2014 10:43:42 +0100	[thread overview]
Message-ID: <20141128094341.GA27703@krava.brq.redhat.com> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F0770167680F@SHSMSX103.ccr.corp.intel.com>

On Wed, Nov 26, 2014 at 04:10:51PM +0000, Liang, Kan wrote:
> 
> > 
> > On Mon, Nov 24, 2014 at 11:00:29AM -0500, Kan Liang wrote:
> > > From: Kan Liang <kan.liang@intel.com>
> > >
> > > symoff can support both same binaries and different binaries. However,
> > > the offset may be changed for different binaries. This patch checks
> > > the buildid of perf.data. If they are from different binaries, print a
> > > warning to notify the user.
> > >
> > > Signed-off-by: Kan Liang <kan.liang@intel.com>
> > > ---
> > >  tools/perf/builtin-diff.c | 25 +++++++++++++++++++++++++
> > >  tools/perf/util/sort.c    |  3 +++
> > >  tools/perf/util/sort.h    |  1 +
> > >  3 files changed, 29 insertions(+)
> > >
> > > diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> > > index 03a4001..2a8c17a 100644
> > > --- a/tools/perf/builtin-diff.c
> > > +++ b/tools/perf/builtin-diff.c
> > > @@ -678,6 +678,28 @@ static void data__free(struct data__file *d)
> > >  	}
> > >  }
> > >
> > > +static void buildid_check(void)
> > > +{
> > > +	struct dsos *base_k_dsos = &data__files[0].session-
> > >machines.host.kernel_dsos;
> > > +	struct dsos *base_u_dsos = &data__files[0].session-
> > >machines.host.user_dsos;
> > > +	struct dsos *k_dsos_tmp, *u_dsos_tmp;
> > > +	struct data__file *d;
> > > +	int i;
> > > +
> > > +	data__for_each_file_new(i, d) {
> > > +		k_dsos_tmp = &d->session->machines.host.kernel_dsos;
> > > +		u_dsos_tmp = &d->session->machines.host.user_dsos;
> > > +
> > > +		if (!dsos__build_ids_equal(base_k_dsos, k_dsos_tmp))
> > > +			pr_warning("The perf.data come from different
> > kernel. "
> > > +				   "The kernel symbol offset may vary for
> > different kernel.\n");
> > > +
> > > +		if (!dsos__build_ids_equal(base_u_dsos, u_dsos_tmp))
> > > +			pr_warning("The perf.data come from different
> > user binary. "
> > > +				   "The user space symbol offset may vary
> > for different
> > > +binaries.\n");
> > 
> > we dont specify the kernel version or dso path in the warning message,
> > maybe we want to print it out just once? In case there's more than 2 not
> > matching data?
>  
> Could we print the header instead? It should be more informative. 
> Maybe we can print it with --verbose.

IMO one (WARN_ONCE style) warning by default if we see
buildids discrepancy and detailed comparison for --verbose

jirka

  reply	other threads:[~2014-11-28  9:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 16:00 [PATCH V5 1/3] perf tool: Add sort key symoff for perf diff Kan Liang
2014-11-24 16:00 ` [PATCH V5 2/3] perf tool: new function to compare build_ids Kan Liang
2014-11-24 16:00 ` [PATCH V5 3/3] perf tool: check buildid for symoff Kan Liang
2014-11-25 11:51   ` Jiri Olsa
2014-11-26 16:10     ` Liang, Kan
2014-11-28  9:43       ` Jiri Olsa [this message]
2014-11-25 12:21   ` Jiri Olsa
2014-11-25 17:19     ` Liang, Kan
2014-11-27  2:05   ` Namhyung Kim
2014-11-27 14:09     ` Liang, Kan
2014-11-28  9:49       ` Jiri Olsa
2014-11-28 16:43         ` Liang, Kan

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=20141128094341.GA27703@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.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®