Messages in this thread | | | Subject | Re: [PATCH v3 09/27] perf parse-events: Create two hybrid cache events | From | "Jin, Yao" <> | Date | Mon, 12 Apr 2021 09:15:34 +0800 |
| |
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 >> >
| |