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] [day] [month] [year] [list]
Message-ID: <YDZHaZ+ku5za4+uD@krava>
Date:   Wed, 24 Feb 2021 13:32:41 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Ian Rogers <irogers@...gle.com>
Subject: Re: [PATCH 1/2] libperf: Add perf_evlist__reset_id_hash()

On Wed, Feb 24, 2021 at 05:42:15PM +0900, Namhyung Kim wrote:
> On Wed, Feb 24, 2021 at 5:11 PM Namhyung Kim <namhyung@...nel.org> wrote:
> >
> > Add the perf_evlist__reset_id_hash() function to libperf API so that
> > it can be called to reset the hash table.  This is necessary for perf
> > stat to run the workload multiple times.
> >
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > ---
> [SNIP]
> > diff --git a/tools/lib/perf/libperf.map b/tools/lib/perf/libperf.map
> > index 7be1af8a546c..285100143d89 100644
> > --- a/tools/lib/perf/libperf.map
> > +++ b/tools/lib/perf/libperf.map
> > @@ -42,6 +42,7 @@ LIBPERF_0.0.1 {
> >                 perf_evlist__munmap;
> >                 perf_evlist__filter_pollfd;
> >                 perf_evlist__next_mmap;
> > +               perf_evlist__reset_id_hash;
> >                 perf_mmap__consume;
> >                 perf_mmap__read_init;
> >                 perf_mmap__read_done;
> 
> I saw perf_evsel__free_fd and perf_evsel__free_id is called from
> util/evlist.c without being listed here.  Do we need to add them?

perf is special user of libperf and we link it statically
at the moment, so it's not needed

I think we should add perf_evlist__reset_id_hash to internal
header, because for libperf.so we expose only logical API units
with described usage, not just single (special purpose) function

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ