Re: [PATCH 01/10] perf, tools: Factor out scale conversion code
From: Jiri Olsa
Date: Wed Nov 23 2016 - 04:47:32 EST
On Fri, Nov 18, 2016 at 04:36:11PM -0800, Andi Kleen wrote:
SNIP
> @@ -261,6 +267,12 @@ static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
> alias->long_desc = long_desc ? strdup(long_desc) :
> desc ? strdup(desc) : NULL;
> alias->topic = topic ? strdup(topic) : NULL;
> + if (unit) {
> + if (convert_scale(unit, &unit, &alias->scale) < 0)
> + return -1;
> + snprintf(alias->unit, sizeof(alias->unit), "%s", unit);
> + }
> + alias->str = strdup(val);
CC util/pmu.o
util/pmu.c: In function â__perf_pmu__new_aliasâ:
util/pmu.c:277:7: error: âstruct perf_pmu_aliasâ has no member named âstrâ
alias->str = strdup(val);
jirka