Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706AbdHXMEh (ORCPT ); Thu, 24 Aug 2017 08:04:37 -0400 Received: from mail-by2nam03on0089.outbound.protection.outlook.com ([104.47.42.89]:51520 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751270AbdHXMEg (ORCPT ); Thu, 24 Aug 2017 08:04:36 -0400 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, Jonathan.Cameron@huawei.com, Robert.Richter@cavium.com, gklkml16@gmail.com Subject: [PATCH v6 0/4] Add support for ThunderX2 pmu events using json files Date: Thu, 24 Aug 2017 17:33:45 +0530 Message-Id: <20170824120349.2323-1-ganapatrao.kulkarni@cavium.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0095.INDPRD01.PROD.OUTLOOK.COM (10.174.208.11) To CO2PR07MB2567.namprd07.prod.outlook.com (10.166.201.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e37954b7-c9d8-4717-59fc-08d4eae84869 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CO2PR07MB2567; X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB2567;3:9iPrLcfDIBZwvbxHLVvGalaIq1AhGRCX/9LDmd5i27f2KbdNq3x6Dut6J/BDqq+Lque74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X+DQUHxAxXHVILYijqNXnnUkTcUfwbOH56fO/STOXL6Quvwn55wkN+gUij80s/HQx06FyHtnc3dGqCUKJl1M+IlsGFQW7bt1YnAj+fMqiR3hrZdfOXLDm7gjM3Wj3Vggfvrw57gpTzObo1P4ZU2WXITmukzD3EGLyUf7t980vJ5dvBfnZwocBfF6VvUB+FcJXIFHoVsz2c9lc4sHdO31eFhd3RRYq7aMQoF2NbM0yg10yCPtCa5eMThb66vPVcezByuyPdzWut9EbTSmLUyh2bh2Mg;4:5eptcE+0phDQ6CLTOiVMJEL4b4j//tLCycB6K3ThmxY3OSvr1cT9OxP6UnLhaiO4sTxTwDfLNzsgAxagpUJgS4bR4SfQ6N3KDHWtw5rX7RtzPGHj6redqwr0aIh/lLAWIGgXfdVqskHGhZ7JXfOBo+0A2CyHTWuPgjzrvgBw+kp4ILOKmFarERXEB3SyViMWrb1EX9I3migpsO0hgjR7Sz07lSLGgftwqIZkH6MLNEdtEYX+k/1dPB/fq1NRzSpp X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6041248)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CO2PR07MB2567;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CO2PR07MB2567; X-Forefront-PRVS: 04097B7F7F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7370300001)(4630300001)(6009001)(189002)(199003)(97736004)(25786009)(105586002)(42186005)(189998001)(110136004)(6512007)(106356001)(2906002)(68736007)(6306002)(4326008)(33646002)(53936002)(5660300001)(6116002)(3846002)(6506006)(50986999)(47776003)(48376002)(7350300001)(5003940100001)(86362001)(7736002)(305945005)(50226002)(66066001)(6666003)(8676002)(72206003)(81166006)(966005)(1076002)(7416002)(81156014)(50466002)(36756003)(101416001)(6486002)(5009440100003)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB2567;H:mypc.cavium.com.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ganapatrao.Kulkarni@cavium.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO2PR07MB2567;23:ENuZhNLWtFzp/qgy18kuyLHnSOJq9Pnz4O9hWmi1I?= =?us-ascii?Q?Qd0Uu4Ydu5PozXGMKpqndADRX5j323pRjJAo6daDB6QuxnOFUyqvOWK1gu5h?= =?us-ascii?Q?yogOGKi1B3Ahfq78+deHo9iC0IoaDShetlvqwmmqbg2tWuh05yVbxRuChv1p?= =?us-ascii?Q?q0OvjMeHSkx39cvNqxx79f6el7UXxdi+7wBtustqAKCNALpZ3tVDZIbFGJqf?= =?us-ascii?Q?ZOJYhNU5YCS30kdxaWw2L1kR4I7Qz7ZHFHQnW9v/P4JO4iwEfi9IP/h4bRl/?= =?us-ascii?Q?KgLeebjGL7akocrUmqaVXcGk9DexLxNDqX4M+r0NYP4iMMAgQuqkibkMUq+N?= =?us-ascii?Q?4X0gpHoDG87omOsZjy8VfFoG0MDfX49KATtHW4aT63eniXFPrDyHnKgGGs5p?= =?us-ascii?Q?SH+pzw8TU268TY+1SUwr3i/SB1IhQaJDGIMtlWHVww4IFgLoU9cwyNH7zMX7?= =?us-ascii?Q?YBGIl0JRmR+AiPjcYrf/RZYq6lTigEoiZOdBrtpb6Ps0O774sarb8O1y5rq6?= =?us-ascii?Q?q6BYAqXtEfXuBW0SJZxDbMJKr6b7rkWYO5QsypEMzV7FIVvw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RLyna3khH3Ob2rQQ==;5:Op2BkxEF4uCn8waJz8jQK3JkZy7TobbWMFoRDINTdS+viuZFZtQ6VvwYRXIlgBBlR7SJWbsb7utUQHzwAPEgchNauHh2VqoZdZg9KoBKg9tJtZ9lf3OI01Rgd68TxWVKA+wRT95KhNZCdTmr68ZMyJKDIvpWLpGvEEKe5eHyyCk=;24:pVwlzqwC3n9A9XSXfweW/aug5vPrMF+AFt9ab4mONxtmj12A6xpFq2aMgmeuMe2n0wcCotw0IKivZY2D3kWLDbyHzMCU83PQmgZLANmMLK0=;7:7muDLmz1HxDU2i2KkNJYgzmhRl8gL2aXFTX7bIO/NGpO5T4J2BK6Z1WM914f4OVjfxoSGVLeLamRt8HApKIaKk7EV5U0k3GkTulbWUyWgNVVaLjf+JS4AhOgcKO/uSkDmbr8YDScwcHWwGM5lPiXTrSHY0XlKXQhmTirqkQ+4VaXQn6yyEKjavxJvvMWGtTovltCKF2jTLHnw5vFB+BPnUIQXOo59E7MKH6MabtSd34= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2017 12:04:29.2227 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2567 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1753 Lines: 48 Extending json/jevent framework for parsing arm64 event files. Adding jevents for ThunderX2 implementation defined PMU events. v6 : Addressed comments [1] [2] [1] https://patchwork.kernel.org/patch/9903099/ [2] https://patchwork.kernel.org/patch/9853899/ v5: - Addressed comments from Arnaldo. - Rebased to 4.13-rc5 v4: - Rebased to 4.13-rc1 v3: - Addressed comments from Will Deacon and Jayachandran C. - Rebased to 4.12-rc1 v2: - Updated as per Mark Rutland's suggestions. - Added provision for get_cpuid_str to get cpu id string from associated cpus of pmu core device. v1: Initial patchset. Ganapatrao Kulkarni (4): perf utils: passing pmu as a parameter to function get_cpuid_str perf tools arm64: Add support for get_cpuid_str function. perf utils: Add helper function is_pmu_core to detect PMU CORE devices perf vendor events arm64: Add ThunderX2 implementation defined pmu core events tools/perf/arch/arm64/util/Build | 1 + tools/perf/arch/arm64/util/header.c | 60 +++++++++++++++++++++ tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/header.c | 2 +- tools/perf/pmu-events/arch/arm64/mapfile.csv | 15 ++++++ .../arm64/thunderx2/implementation-defined.json | 62 ++++++++++++++++++++++ tools/perf/util/header.h | 3 +- tools/perf/util/pmu.c | 48 ++++++++++++++--- 8 files changed, 182 insertions(+), 11 deletions(-) create mode 100644 tools/perf/arch/arm64/util/header.c create mode 100644 tools/perf/pmu-events/arch/arm64/mapfile.csv create mode 100644 tools/perf/pmu-events/arch/arm64/thunderx2/implementation-defined.json -- 2.9.4