Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754233AbbFCKb7 (ORCPT ); Wed, 3 Jun 2015 06:31:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36051 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754153AbbFCKbg (ORCPT ); Wed, 3 Jun 2015 06:31:36 -0400 Date: Wed, 3 Jun 2015 12:31:30 +0200 From: Jiri Olsa To: Sukadev Bhattiprolu Cc: mingo@redhat.com, ak@linux.intel.com, Michael Ellerman , Arnaldo Carvalho de Melo , namhyung@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v13 03/14] perf, tools: Use pmu_events_map table to create event aliases Message-ID: <20150603103129.GG1828@krava.redhat.com> References: <1433265135-20426-1-git-send-email-sukadev@linux.vnet.ibm.com> <1433265135-20426-4-git-send-email-sukadev@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433265135-20426-4-git-send-email-sukadev@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1453 Lines: 46 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/