On Tue, Jul 07, 2020 at 05:53:10PM +0530, Kajol Jain wrote:

SNIP

>                       }
>  
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index 93fe72a9dc0b..3cafbb320d68 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -306,7 +306,7 @@ static bool perf_pmu_merge_alias(struct perf_pmu_alias 
> *newalias,
>  static int __perf_pmu__new_alias(struct list_head *list, char *dir, char 
> *name,
>                                char *desc, char *val,
>                                char *long_desc, char *topic,
> -                              char *unit, char *perpkg,
> +                              char *unit, char *aggr_mode,
>                                char *metric_expr,
>                                char *metric_name,
>                                char *deprecated)
> @@ -378,7 +378,7 @@ static int __perf_pmu__new_alias(struct list_head *list, 
> char *dir, char *name,
>                       return -1;
>               snprintf(alias->unit, sizeof(alias->unit), "%s", unit);
>       }
> -     alias->per_pkg = perpkg && sscanf(perpkg, "%d", &num) == 1 && num == 1;
> +     alias->per_pkg = aggr_mode && sscanf(aggr_mode, "%d", &num) == 1 && num 
> == 1;

should you rather use 'num == PerPkg' instead 'num == 1' ?

jirka

Reply via email to