[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACbG308+OeurvpxM=J32MvUdUJFdD4j1rX84jLk91PvS-XGMSA@mail.gmail.com>
Date: Wed, 22 Jun 2016 08:17:02 -0500
From: Nilay Vaish <nilayvaish@...il.com>
To: Wang Nan <wangnan0@...wei.com>
Cc: acme@...nel.org, Linux Kernel list <linux-kernel@...r.kernel.org>,
pi3orama@....com, He Kuang <hekuang@...wei.com>,
Jiri Olsa <jolsa@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Zefan Li <lizefan@...wei.com>
Subject: Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist
On 22 June 2016 at 04:08, Wang Nan <wangnan0@...wei.com> wrote:
> @@ -1916,3 +1922,24 @@ perf_evlist__find_evsel_by_str(struct perf_evlist *evlist,
>
> return NULL;
> }
> +
> +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent)
> +{
> + struct perf_evlist *evlist;
> +
> + if (perf_evlist__is_aux(parent)) {
> + pr_err("Internal error: create aux evlist from another aux evlist\n");
> + return NULL;
> + }
> +
> + evlist = zalloc(sizeof(*evlist));
> + if (!evlist)
> + return NULL;
> +
> + perf_evlist__init(evlist, parent->cpus, parent->threads);
> + evlist->parent = parent->parent;
A very minor suggestion. I think evlist->parent should be set to
'parent' and not 'parent->parent'. I agree the two values are equal,
but setting to parent->parent just does not seem right.
--
Nilay
Powered by blists - more mailing lists