Re: [PATCH 1/9] perf, tools: Dont stop PMU parsing on alias parse error

From: Jiri Olsa
Date: Tue Aug 11 2015 - 09:07:47 EST


On Fri, Aug 07, 2015 at 06:06:17PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> When an error happens during alias parsing currently the complete
> parsing of all attributes of the PMU is stopped. This is breaks
> old perf on a newer kernel that may have not-yet-know
> alias attributes (such as .scale or .per-pkg).

hum, both .scale and .per-pgk are skip from term parsing via:

/*
* skip info files parsed in perf_pmu__new_alias()
*/
if (pmu_alias_info_file(name))
continue;

and loaded without any error report:

static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
char *desc __maybe_unused, char *val)
SNIP
if (dir) {
/*
* load unit name and scale if available
*/
perf_pmu__parse_unit(alias, dir, name);
perf_pmu__parse_scale(alias, dir, name);
perf_pmu__parse_per_pkg(alias, dir, name);
perf_pmu__parse_snapshot(alias, dir, name);
}

list_add_tail(&alias->list, list);

return 0;
}

Which attribute parsing is failing for you?

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/