From: Jiri Olsa <jolsa@redhat.com>
To: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: acme@kernel.org, linux-kernel@vger.kernel.org,
namhyung@kernel.org, mark.rutland@arm.com,
naveen.n.rao@linux.vnet.ibm.com
Subject: Re: [PATCH] perf dso: Fix dso comparison
Date: Tue, 24 Mar 2020 14:22:58 +0100 [thread overview]
Message-ID: <20200324132258.GX1534489@krava> (raw)
In-Reply-To: <3cf2bd1b-e1c2-f82f-a06a-ce0d5e4b5eac@linux.ibm.com>
On Tue, Mar 24, 2020 at 06:07:23PM +0530, Ravi Bangoria wrote:
SNIP
> > looks good, do we need to add the dso_id check to sort__dso_cmp?
>
> I guess with different filename there is no need to compare dso_id.
> But for same filename, adding dso_id cmp will separate out the
> samples:
>
> Ex, Without dso_id compare:
>
> $ ./perf report -s dso,dso_size -v
> 66.63% /home/ravi/a.out 4096
> 33.36% /home/ravi/Workspace/linux/tools/perf/a.out 4096
>
> $ ./perf report -s dso,dso_size
> 99.99% a.out 4096
>
>
> With below diff:
>
> - return strcmp(dso_name_l, dso_name_r);
> + ret = strcmp(dso_name_l, dso_name_r);
> + if (ret)
> + return ret;
> + else
> + return dso__cmp_id(dso_l, dso_r);
>
>
> $ ./perf report -s dso,dso_size
> 99.99% a.out 4096
> 33.36% a.out 4096
>
> though, the o/p also depends which other sort keys are used along
> with dso key. Do you think this change makes sense?
the above behaviour is something I'd expect from 'dso'
sort key to do - separate out different dsos, even with
the same name
jirka
next prev parent reply other threads:[~2020-03-24 13:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 4:24 [PATCH] perf dso: Fix dso comparison Ravi Bangoria
2020-03-24 10:48 ` Jiri Olsa
2020-03-24 12:37 ` Ravi Bangoria
2020-03-24 13:22 ` Jiri Olsa [this message]
2020-03-24 13:42 ` Arnaldo Carvalho de Melo
2020-03-24 13:42 ` Ravi Bangoria
2020-03-24 13:00 ` Arnaldo Carvalho de Melo
2020-03-24 13:20 ` Jiri Olsa
2020-03-24 13:21 ` Arnaldo Carvalho de Melo
2020-03-24 13:44 ` Naveen N. Rao
2020-04-04 8:41 ` [tip: perf/urgent] " tip-bot2 for Ravi Bangoria
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=20200324132258.GX1534489@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=namhyung@kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=ravi.bangoria@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.