lkml.org 
[lkml]   [2021]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
>

\
 
 \ /
  Last update: 2021-04-09 15:48    [W:0.167 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site