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]
Date:   Tue, 1 Sep 2020 22:09:12 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     "Jin, Yao" <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v4 1/7] perf util: Create streams

On Tue, Sep 01, 2020 at 10:26:25AM +0800, Jin, Yao wrote:
> Hi Jiri,
> 
> On 8/31/2020 9:56 PM, Jiri Olsa wrote:
> > On Tue, Aug 25, 2020 at 07:35:07AM +0800, Jin Yao wrote:
> > 
> > SNIP
> > 
> > > +						  int nr_streams_max,
> > > +						  enum stream_type type)
> > > +{
> > > +	struct evsel_streams *es;
> > > +	int nr_evsel = evlist->core.nr_entries, ret = -1;
> > > +
> > > +	es = create_evsel_streams(nr_evsel, nr_streams_max);
> > > +	if (!es)
> > > +		return NULL;
> > > +
> > > +	if (type == STREAM_CALLCHAIN)
> > > +		ret = evlist_init_callchain_streams(evlist, es, nr_evsel);
> > > +
> > > +	if (ret) {
> > > +		free_evsel_streams(es, nr_evsel);
> > > +		return NULL;
> > > +	}
> > > +
> > > +	return es;
> > > +}
> > > diff --git a/tools/perf/util/stream.h b/tools/perf/util/stream.h
> > > new file mode 100644
> > > index 000000000000..a8a0172b4d13
> > > --- /dev/null
> > > +++ b/tools/perf/util/stream.h
> > > @@ -0,0 +1,30 @@
> > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > +#ifndef __PERF_STREAM_H
> > > +#define __PERF_STREAM_H
> > > +
> > > +#include "callchain.h"
> > > +
> > > +enum stream_type {
> > > +	STREAM_NONE = 0,
> > > +	STREAM_CALLCHAIN
> > 
> > do you plan to add more types?
> > 
> > jirka
> > 
> 
> Thanks for looking at this patch series.
> 
> So far, no more types in plan. :)

I was wondering what's the enum for then, it could
be hardcoded and ease up the code maybe? but it's
jus a thought, I don't follow the change deeply

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ