Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934230AbdGTF60 (ORCPT ); Thu, 20 Jul 2017 01:58:26 -0400 Received: from mail-bn3nam01on0063.outbound.protection.outlook.com ([104.47.33.63]:62272 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934081AbdGTF4y (ORCPT ); Thu, 20 Jul 2017 01:56:54 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cavium.com; From: Ganapatrao Kulkarni To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Will.Deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, acme@kernel.org, alexander.shishkin@linux.intel.com, peterz@infradead.org, mingo@redhat.com, jnair@caviumnetworks.com, zhangshaokun@hisilicon.com, Robert.Richter@cavium.com, gpkulkarni@gmail.com Subject: [PATCH v4 1/4] perf utils: passing pmu as a parameter to function get_cpuid_str Date: Thu, 20 Jul 2017 11:26:05 +0530 Message-Id: <20170720055608.5333-2-ganapatrao.kulkarni@cavium.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170720055608.5333-1-ganapatrao.kulkarni@cavium.com> References: <20170720055608.5333-1-ganapatrao.kulkarni@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0044.INDPRD01.PROD.OUTLOOK.COM (10.174.214.30) To CY1PR07MB2571.namprd07.prod.outlook.com (10.167.16.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ce0cd553-a852-48a4-70e8-08d4cf341e99 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR: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O6be+iNBlavxCAYi1Qx03KVyLRfDHbi4nu5h+/gCGR5n54Z2xaTjHpqW8ktv+hJnBeyHp+1dzzSAtZnIWKX43DS+SdvydJ4hUzQbaaEzods0D2SD8hVfeB7/e/kIg5EoGojRZ9DTYqEYHVqXADUhymDy/dktpssQg6MX0YjZdVqVpmQD2Vv7LT4RwPFmDjxsBp8LVVn+ySCSoVn5aaabnCXpXg19iGMyYppO4Tzo8ptSh+a1LVM9wA+XmSW681ApHGfiy3PLVYgH5WV499MFbWs9Q8FwhsBLEkEBVe7GHz47eBevkTSJfRcFDsPQ0T/LdiwJ7y2u32KRVoZyUY51iwVOjRCX2tJthKTFwGm05WVACnK9DrdZ2ypgg8j11XHBw= X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2571;20:PPcdjbEo8YTVSkNOWijBDFyLMrgJ641+CM5bru3yq8TzuUPbz+Qn+b3l1h10XW8KEx37MhviRvW33xUqV97ezLDd56UC72cnW64mNoaPFuyIRioWLOoLr7ehBqekZt1WDbc/h1v5BglftAlRR+xKL+gcNGXKNw+AriugQyLEBA7iR/sCzWXzIE4V7ttByV4YAZi/c+LydsQQr6vxlCeK3ugjIxFBlO52MUxjlx+3I9SlFX9IPnLAe6dNWA9NXuPEYiY/+rUf7X3gFRHGE08dUbHSFAQrCvWXyTnv6B67BwBhYYUhH4g7UWmtVujxtv5x51ib1eg8kKpz40i3XHSDtnU0oM1SvxxFWFYfbUe320iWAMPyiRLm93O4C0sS4N5Jq0HgrozSDxc5GJpkYAs8LS3slpQJ9QIyLwxG7xPIBOzQIimTwtPDfo1pqJfhU+cI+GEfB6fxBbBVC2PO7nb4u8hx7NvY9elrHL6/+9OqVJszfV74Qklkp2HXQrcKDczN X-Exchange-Antispam-Report-Test: UriScan:(236129657087228); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR07MB2571;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR07MB2571; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2571;4:rb2TCKnGL51aWGBE1csiuAQ9QAQLivpnxepA3S86Yt?= =?us-ascii?Q?Zi54Fs0HUQ8WXRj/LrogrPk206SrBqisvfXg3J2AOEG7RE6o3x2VEH0vUnJ1?= =?us-ascii?Q?BRuUxdL7+kVziaMSPppWva+IFOK2JqONYofcrTb2xU8iWA/BRC5IX/IAasNU?= =?us-ascii?Q?ujsUbjCL/yz+Nw6ytraqr94c4z0k1wf4j8ItUSf9VKIUpzVTX/cGx+aCDQ1T?= =?us-ascii?Q?eVeMftdgEnP73t/pBih/355pm737howYPYMAqVuQ5c2y5puE68akWXJ8Dj7R?= =?us-ascii?Q?y4xSj9rH7mLLZtdcZsSLCXZYqHxQJgiayGirW+nuhHdbnogYo/4V+iQ4M17U?= =?us-ascii?Q?c3PeRIC3uS+A9c3xowNXb2Jy9ZJbGZk1kAz/0XJ69epR+fqse/7pG6OpKomi?= =?us-ascii?Q?xAkRnNPylxxNQrbeKGOoo5e1xRuSvlQs3SsTmzS7nRokyN6Yp6+KVsjeODqy?= =?us-ascii?Q?j1gZJa9iteIoDPsD0KzGIgFGucCBMwfafjidG7qW3R8dV9wg31T+AZhKEYfP?= =?us-ascii?Q?NOciyPqQf6V3Wi/tPB8JLp26y0O1bZymzxJ+G9XLiKKCa9hn1WlIw+7TpvPU?= =?us-ascii?Q?qL9z6SD5T7SO+7K9ibTlNi276nS5jBim4r7vUd/kKDhi2y0JCtcnBFp92avy?= =?us-ascii?Q?IVqAyvBfsKn4X+M0KEX+mXEkSFalbwL0UM2TmTdpL6fJvxiCNihPX+NSyAu/?= =?us-ascii?Q?cyFxk/JBNW5f3ezs/b2H0PY+NKB4Nr4HKG/6tQ0AbLmKmgaRpqCqGeT85Sem?= =?us-ascii?Q?kqrwkHNBhE3paVgh5vLKXu+YghQ4uyCky/8IcAi1CfHseH1O3pppAYWYPKgW?= =?us-ascii?Q?S49xym4OyoWU5fZ602W7YXuv5B8vwh9M7NPcPFCjHILhuy3mtNCtIdwZNAiC?= =?us-ascii?Q?K/AnAR0Ca7lOkg7J11TxOflXhbKfdq7VSq1aSJNfH9o6Eu2fTqjIpeppwF1w?= =?us-ascii?Q?mhNfqUz33HNWtJ3nejdjZwA770gCOcmFsbg7vRuaz88zbe1dUGs8PzExTqHp?= =?us-ascii?Q?asNTzhmlPNsh0CMSkCewlX8GkqbAQUThyBh7zu8BtV5pSSIj9j4zJVifHs0K?= =?us-ascii?Q?5h7gCrE4qWvuqa/ida4RiNXyA3HnGJ7zIszc1kfwWopMbUo6mEcKvi7z+skK?= =?us-ascii?Q?DiihC7UPRqtioE+UGek9ZeG9hxkK1KxHSI96ryLaEngQanEYj9naEwOmONFW?= =?us-ascii?Q?6QipThysVO/ObGveTp9uk9ntG+zqWkDx6poGuCibQ44LdFxdce7hlZ2g=3D?= =?us-ascii?Q?=3D?= X-Forefront-PRVS: 0374433C81 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7370300001)(4630300001)(6009001)(39450400003)(39840400002)(39860400002)(39400400002)(39410400002)(39850400002)(8676002)(53416004)(478600001)(72206003)(189998001)(7736002)(4326008)(50466002)(53936002)(48376002)(305945005)(6506006)(2906002)(5003940100001)(6666003)(6486002)(76176999)(50986999)(66066001)(5009440100003)(50226002)(25786009)(1076002)(110136004)(2950100002)(81166006)(38730400002)(47776003)(42186005)(36756003)(6512007)(86362001)(3846002)(7416002)(33646002)(7350300001)(5660300001)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2571;H:mypc.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2571;23:CA3mHQlS4/i8r2obH8hfz7xX6jDPopfDKVNglqicV?= =?us-ascii?Q?4fya6GClYOt+gWplszbbgOr4f9IVaVu3UWp7x+i3OSbBLvYD/Hrnl32W19nO?= =?us-ascii?Q?Mfy1+rjE3Qg4vAZggnJc/pou7f311rRPrY2wojVtBR4TPyTlgHLN1IQgj7r8?= =?us-ascii?Q?ulWs0UowewmkvkDNH9nH4aszOgPJoQG94kjhzRQUspLM8AxJtDWtMw2E99Bm?= =?us-ascii?Q?6aOjjtljLpdNT8iuZl2JhAii5t27kJTM7df00h15tZGr7DBEVgqDbb8ByH84?= =?us-ascii?Q?VL/dPUDMFTwxmHTz2z6NYOx4huOjAsf/UPRZBN8zRiKZBO28IrvOcUU8d3lq?= =?us-ascii?Q?KcWWtvqjy17VTebU2nuYL7wQKQ6Oyg1zgDjTG/uA43164BVtjYUbGS1S4rcq?= =?us-ascii?Q?4Vq0oru6WrCkGTurW7j4bDzRtyy6/dqKJdAaQNFg8hlvmk1a9MfXV9NB+QBT?= =?us-ascii?Q?Bp+aGl7EOy8HJ34WLoztxVltsKkGXdMZcmxytDinPzOyoRhYmUl43oB2E3nn?= =?us-ascii?Q?/UeGkhkwE7icPAeyi6pFb7MeIHOygDFJvSPzn93WN0Qb9xLWdk31zjECr8mA?= =?us-ascii?Q?gFTngjO5SVcLud3J+mW6d355RBjV1q+ByRan4UUyLx2M26dQd3YdLDX9d405?= =?us-ascii?Q?Fro2jj4OKCQd2biMNp992SmSfN7990HH7z5qJVznagwI0mcbyQW9HCAH8nTo?= =?us-ascii?Q?00PtduSzn3z1bdmybNxMx6hzaYeX7S37aAaW22RWS99aMdRva1BFq4bgQ4EV?= =?us-ascii?Q?WaJ97n31+SSrwZ52C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iNJPVi8w/0vXRHOXMY2P315qslS5k4/TeRB51f+rMxB/3lr7soIMY6hpfJWdU9gqFOEKWYc+MJVVlsyJ/G/DY4+sDrtPT9YGza0ERDGaZ3sr3Pi/M4JUZlzKB7HYZRTpTpOYAiNfTFxi1OaOjXJyKip+M= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2017 05:56:48.3453 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2571 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3253 Lines: 105 cpuid string will not be same on all CPUs on heterogeneous platforms like ARM's big.LITTLE, adding provision(using pmu->cpus) to find cpuid string from associated CPUs of PMU CORE device. Signed-off-by: Ganapatrao Kulkarni --- tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/header.c | 2 +- tools/perf/util/header.h | 3 ++- tools/perf/util/pmu.c | 9 +++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c index 9aaa6f5..2953681 100644 --- a/tools/perf/arch/powerpc/util/header.c +++ b/tools/perf/arch/powerpc/util/header.c @@ -34,7 +34,7 @@ get_cpuid(char *buffer, size_t sz) } char * -get_cpuid_str(void) +get_cpuid_str(struct perf_pmu *pmu __maybe_unused) { char *bufp; diff --git a/tools/perf/arch/x86/util/header.c b/tools/perf/arch/x86/util/header.c index a74a48d..d52bc27 100644 --- a/tools/perf/arch/x86/util/header.c +++ b/tools/perf/arch/x86/util/header.c @@ -65,7 +65,7 @@ get_cpuid(char *buffer, size_t sz) } char * -get_cpuid_str(void) +get_cpuid_str(struct perf_pmu *pmu __maybe_unused) { char *buf = malloc(128); diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index d30109b..05e5758 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h @@ -8,6 +8,7 @@ #include #include "event.h" #include "env.h" +#include "pmu.h" enum { HEADER_RESERVED = 0, /* always cleared */ @@ -151,5 +152,5 @@ int write_padded(int fd, const void *bf, size_t count, size_t count_aligned); */ int get_cpuid(char *buffer, size_t sz); -char *get_cpuid_str(void); +char *get_cpuid_str(struct perf_pmu *pmu __maybe_unused); #endif /* __PERF_HEADER_H */ diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index ac16a9d..aefdbd1 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -511,7 +511,7 @@ static struct cpu_map *pmu_cpumask(const char *name) * Each architecture should provide a more precise id string that * can be use to match the architecture's "mapfile". */ -char * __weak get_cpuid_str(void) +char * __weak get_cpuid_str(struct perf_pmu *pmu __maybe_unused) { return NULL; } @@ -521,7 +521,8 @@ char * __weak get_cpuid_str(void) * to the current running CPU. Then, add all PMU events from that table * as aliases. */ -static void pmu_add_cpu_aliases(struct list_head *head, const char *name) +static void pmu_add_cpu_aliases(struct list_head *head, const char *name, + struct perf_pmu *pmu) { int i; struct pmu_events_map *map; @@ -533,7 +534,7 @@ static void pmu_add_cpu_aliases(struct list_head *head, const char *name) if (cpuid) cpuid = strdup(cpuid); if (!cpuid) - cpuid = get_cpuid_str(); + cpuid = get_cpuid_str(pmu); if (!cpuid) return; @@ -610,12 +611,12 @@ static struct perf_pmu *pmu_lookup(const char *name) if (pmu_aliases(name, &aliases)) return NULL; - pmu_add_cpu_aliases(&aliases, name); pmu = zalloc(sizeof(*pmu)); if (!pmu) return NULL; pmu->cpus = pmu_cpumask(name); + pmu_add_cpu_aliases(&aliases, name, pmu); INIT_LIST_HEAD(&pmu->format); INIT_LIST_HEAD(&pmu->aliases); -- 2.9.4