mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: kan.liang@intel.com
Cc: acme@kernel.org, jolsa@redhat.com, linux-kernel@vger.kernel.org,
	ak@linux.intel.com
Subject: Re: [PATCH V2 2/3] perf tool:perf diff support for different binaries
Date: Mon, 17 Nov 2014 14:09:33 +0900	[thread overview]
Message-ID: <87fvditnua.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1415653280-1374-3-git-send-email-kan.liang@intel.com> (kan liang's message of "Mon, 10 Nov 2014 16:01:19 -0500")

On Mon, 10 Nov 2014 16:01:19 -0500, kan liang wrote:
> From: Kan Liang <kan.liang@intel.com>
>
> Currently, the perf diff only works with same binaries. That's because
> it compares the symbol start address. It doesn't work if the perf.data
> comes from different binaries. This patch matches the function names.
>
> Signed-off-by: Kan Liang <kan.liang@intel.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


> ---
>  tools/perf/util/sort.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> index 9402885..ee235ab 100644
> --- a/tools/perf/util/sort.c
> +++ b/tools/perf/util/sort.c
> @@ -1430,6 +1430,15 @@ int sort_dimension__add(const char *tok)
>  			sort__has_parent = 1;
>  		} else if (sd->entry == &sort_sym) {
>  			sort__has_sym = 1;
> +			/*
> +			 * perf diff displays the performance difference amongst
> +			 * two or more perf.data files. Those files could come from
> +			 * different binaries. So we should not compare their ips.
> +			 * The name of symble should be the key we do compare.
> +			 */
> +			if (sort__mode == SORT_MODE__DIFF)
> +				sd->entry->se_collapse = sort__sym_sort;
> +
>  		} else if (sd->entry == &sort_dso) {
>  			sort__has_dso = 1;
>  		}

  reply	other threads:[~2014-11-17  5:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 21:01 [PATCH V2 0/3] perf tool: perf diff sort changes kan.liang
2014-11-10 21:01 ` [PATCH V2 1/3] perf tool: Fix perf diff symble sort issue kan.liang
2014-11-17  5:08   ` Namhyung Kim
2014-11-10 21:01 ` [PATCH V2 2/3] perf tool:perf diff support for different binaries kan.liang
2014-11-17  5:09   ` Namhyung Kim [this message]
2014-11-10 21:01 ` [PATCH V2 3/3] perf tool: Add sort key addr for perf diff kan.liang
2014-11-17  5:27   ` Namhyung Kim

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=87fvditnua.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.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

Powered by JetHome