[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00b56b3c-c88d-8340-e8b7-703f6023bf03@linux.intel.com>
Date: Mon, 12 Apr 2021 09:15:34 +0800
From: "Jin, Yao" <yao.jin@...ux.intel.com>
To: Jiri Olsa <jolsa@...hat.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 v3 09/27] perf parse-events: Create two hybrid cache
events
Hi Jiri,
On 4/9/2021 9:48 PM, Jiri Olsa wrote:
> On Mon, Mar 29, 2021 at 03:00:28PM +0800, Jin Yao wrote:
>
> SNIP
>
>> index 1bbd0ba92ba7..3692fa3c964a 100644
>> --- a/tools/perf/util/parse-events.c
>> +++ b/tools/perf/util/parse-events.c
>> @@ -458,6 +458,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,
>> int cache_type = -1, cache_op = -1, cache_result = -1;
>> char *op_result[2] = { op_result1, op_result2 };
>> int i, n;
>> + bool hybrid;
>>
>> /*
>> * No fallback - if we cannot get a clear cache type
>> @@ -517,6 +518,13 @@ int parse_events_add_cache(struct list_head *list, int *idx,
>> if (get_config_terms(head_config, &config_terms))
>> return -ENOMEM;
>> }
>> +
>> + i = parse_events__add_cache_hybrid(list, idx, &attr,
>> + config_name ? : name, &config_terms,
>> + &hybrid);
>> + if (hybrid)
>> + return i;
>
> please define 'ret' for the return value, i is confusing
>
> thanks,
> jirka
>
Previously I wanted to save a 'ret' variable, but yes it's confusing. I will define 'ret' in next
version.
Thanks
Jin Yao
>> +
>> return add_event(list, idx, &attr, config_name ? : name, &config_terms);
>> }
>>
>> --
>> 2.17.1
>>
>
Powered by blists - more mailing lists