Messages in this thread | | | Date | Fri, 9 Apr 2021 15:48:04 +0200 | From | Jiri Olsa <> | Subject | Re: [PATCH v3 09/27] perf parse-events: Create two hybrid cache events |
| |
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
> + > return add_event(list, idx, &attr, config_name ? : name, &config_terms); > } > > -- > 2.17.1 >
| |