[PATCH v13 03/14] perf, tools: Use pmu_events_map table to create event aliases

Jiri Olsa jolsa at redhat.com
Wed Jun 3 20:31:30 AEST 2015


On Tue, Jun 02, 2015 at 10:12:03AM -0700, Sukadev Bhattiprolu wrote:

SNIP

> @@ -225,26 +221,47 @@ static int perf_pmu__new_alias(struct list_head *list, char *dir, char *name, FI
>  	alias->unit[0] = '\0';
>  	alias->per_pkg = false;
>  
> -	ret = parse_events_terms(&alias->terms, buf);
> +	ret = parse_events_terms(&alias->terms, val);
>  	if (ret) {
> +		pr_err("Cannot parse alias %s: %d\n", val, ret);
>  		free(alias);
>  		return ret;
>  	}
>  
>  	alias->name = strdup(name);
> +	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);
> +	}
> +
>  	/*
> -	 * load unit name and scale if available
> +	 * TODO: pickup description from Andi's patchset
>  	 */
> -	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);
> +	//alias->desc = desc ? strdpu(desc) : NULL;

please remove the TODO line and above commented code,
it is addressed later in this patchset

jirka


More information about the Linuxppc-dev mailing list