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: <20181126184540.GC5518@kernel.org>
Date:   Mon, 26 Nov 2018 15:45:40 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Ravi Bangoria <ravi.bangoria@...ux.ibm.com>,
        alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
        yao.jin@...ux.intel.com, linux-kernel@...r.kernel.org,
        yuzhoujian@...ichuxing.com, tmricht@...ux.vnet.ibm.com,
        anton@...ba.org
Subject: Re: [PATCH] perf stat: Fix shadow stats for clock events

Em Fri, Nov 16, 2018 at 02:35:55PM +0100, Jiri Olsa escreveu:
> On Fri, Nov 16, 2018 at 09:58:43AM +0530, Ravi Bangoria wrote:
> > Commit 0aa802a79469 ("perf stat: Get rid of extra clock display
> > function") introduced scale and unit for clock events. Thus,
> > perf_stat__update_shadow_stats() now saves scaled values of
> > clock events in msecs, instead of original nsecs. But while
> > calculating values of shadow stats we still consider clock
> > event values in nsecs. This results in a wrong shadow stat
> > values. Ex,
> > 
> >   # ./perf stat -e task-clock,cycles ls
> >     <SNIP>
> >               2.60 msec task-clock:u    #    0.877 CPUs utilized
> >          2,430,564      cycles:u        # 1215282.000 GHz
> > 
> > Fix this by saving original nsec values for clock events in
> > perf_stat__update_shadow_stats(). After patch:
> > 
> >   # ./perf stat -e task-clock,cycles ls
> >     <SNIP>
> >               3.14 msec task-clock:u    #    0.839 CPUs utilized
> >          3,094,528      cycles:u        #    0.985 GHz
> > 
> > Reported-by: Anton Blanchard <anton@...ba.org>
> > Suggested-by: Jiri Olsa <jolsa@...hat.com>
> > Fixes: 0aa802a79469 ("perf stat: Get rid of extra clock display function")
> > Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
> 
> Reviewed-by: Jiri Olsa <jolsa@...nel.org>

Thanks, applied.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ