lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200324134207.GH9917@kernel.org>
Date:   Tue, 24 Mar 2020 10:42:07 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Ravi Bangoria <ravi.bangoria@...ux.ibm.com>,
        linux-kernel@...r.kernel.org, namhyung@...nel.org,
        mark.rutland@....com, naveen.n.rao@...ux.vnet.ibm.com
Subject: Re: [PATCH] perf dso: Fix dso comparison

Em Tue, Mar 24, 2020 at 02:22:58PM +0100, Jiri Olsa escreveu:
> 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

This specific one can be resolved using -v when long_name will be used,
the biggest problem is when long_name is the same (and thus short_name),
which can happen when developing some software, i.e. compile+rebuild and
get a different content, same short/long name, in that case we should
use some diferentiator, the build-id comes to mind, but one that could
be more useful would be file timestamp, meaning, hey, the older version
is actually better, which one, lemme look at the build-id, and even the
source code if developed with -g, by using the copy we stored in the
build-id cache (~/.debug), which would be really useful workflow.

- Arnaldo

> jirka
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ