lkml.org 
[lkml]   [2020]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/7] perf util: Create streams
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

\
 
 \ /
  Last update: 2020-08-31 15:57    [W:0.045 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site