[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANLsYkyZkb4=DwFGpPCsnny1KKiHd0reQSJxFniqerdB3P0shg@mail.gmail.com>
Date: Wed, 23 Dec 2015 09:46:29 -0700
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: Rabin Vincent <rabin@....in>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Chunyan Zhang <zhang.chunyan@...aro.org>,
Mike Leach <mike.leach@....com>,
"Jeremiassen, Tor" <tor@...com>, Al Grant <al.grant@....com>,
fainelli@...adcom.com,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, linux-doc@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: [PATCH V7 24/24] perf tools: adding coresight etm PMU record capabilities
On 19 December 2015 at 10:27, Rabin Vincent <rabin@....in> wrote:
> On Fri, Dec 18, 2015 at 01:59:20PM -0700, Mathieu Poirier wrote:
>> +struct auxtrace_record
>> +*auxtrace_record__init(struct perf_evlist *evlist, int *err)
>> +{
>> + struct perf_pmu *cs_etm_pmu;
>> + struct perf_evsel *evsel;
>> + bool found_etm = false;
>> +
>> + cs_etm_pmu = perf_pmu__find(CORESIGHT_ETM_PMU_NAME);
>> +
>> + if (evlist) {
>> + evlist__for_each(evlist, evsel) {
>> + if (cs_etm_pmu &&
>> + evsel->attr.type == cs_etm_pmu->type)
>> + found_etm = true;
>> + }
>> + }
>> +
>> + if (found_etm)
>> + return cs_etm_record_init(err);
>> +
>> + *err = -EINVAL;
>
> This should not set an error code when found_etm is false. Otherwise
> any attempt to uses perf record without a cs_etm event enabled errors
> out.
Yes, you're right.
Many thanks for the thorough review,
Mathieu
>
>> + return NULL;
>> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists