Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751517AbdHPHLR (ORCPT ); Wed, 16 Aug 2017 03:11:17 -0400 Received: from mail-dm3nam03on0072.outbound.protection.outlook.com ([104.47.41.72]:47024 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751068AbdHPHLQ (ORCPT ); Wed, 16 Aug 2017 03:11:16 -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, Robert.Richter@cavium.com, gpkulkarni@gmail.com Subject: [PATCH v5 0/4] Add support for ThunderX2 pmu events using json files Date: Wed, 16 Aug 2017 12:40:44 +0530 Message-Id: <20170816071048.26087-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: BM1PR01CA0112.INDPRD01.PROD.OUTLOOK.COM (10.174.208.28) To CO2PR07MB2567.namprd07.prod.outlook.com (10.166.201.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 586c8e68-2200-4e57-ee97-08d4e475faf1 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:zC5mPVmd2bnsKgOY8oGBw+pIhYk+VPdwbmofKIh/T8jhH60nrUZHhLqjG4YBq+cw3EyU3mmvl8okjqxL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VvDhylxaNMYNGq4Sz3Msg8zMU5EKaKh8JyI+aginA8+G120SINrl3ZdbT8e9QBwM/4sL1gNxgEhfXrENKLVn9p4RjoRU7ogXdhs4+V9RmnosqcTmxdVHWL1EMbfOXVIXkMBbKxGEWBsczqBd1l9bsZp4VoZx041YMCGPVo1wDNCJuRDsXgLyihERcai6d5OyWbZNP7Q0pNWcQpKWNqbiOrqGtf7czd9qJACo+MAGiigQA00iwIsVS/g1RP4bmdcyMDtHVPEEzLARIEWKC6ZW0;4:7B0CbBZiKss2lOXgfJ1RXpnla1NsWfBb8hp8CO9YGDwpC3HAJD9d1iGbNU/4HGPUntWiZBEWUcX6bl8MI4N1nQO2VZOUNFfKHPt5n08h/RGw0ZW4b/YJrXPsJqtzVKVNciaIZsI9Wh8VPUAL9FHECDF88OaZ9LKaTWZAsoZw7ph+1CG9S+Pl39SgPh/pvH3S56GrOrLeLco2HzjUxHUQk1lk6NfamAhX0SDVj2vHpU0TIwz+/Bg/CFmvAxA8Ev9U 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)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(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: 0401647B7F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(199003)(189002)(86362001)(36756003)(50986999)(5003940100001)(7350300001)(106356001)(105586002)(69596002)(33646002)(97736004)(53416004)(47776003)(72206003)(478600001)(42186005)(25786009)(66066001)(101416001)(6512007)(189998001)(110136004)(4326008)(53936002)(5009440100003)(50466002)(6486002)(50226002)(2906002)(1076002)(6506006)(48376002)(68736007)(6116002)(6666003)(3846002)(81166006)(81156014)(7416002)(5660300001)(8676002)(305945005)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB2567;H:mypc.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX: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:lJH2TZ7dtRAN2AtC6U/4AUy5rGKBN/2C85M52Om14?= =?us-ascii?Q?0tt1rKB0TamjrFf0HeOs2W373cv5QO6B8bdHRz/aW2BhgyYDGh9pZYOObraJ?= =?us-ascii?Q?woKlxidEuKapAX8OISJGh/9I1/1JC6af38Ofx3zhr4xNt0fav46d+cLvDUXI?= =?us-ascii?Q?guv0oC10Atp/5cg6gUOP6t5Lx/1DXW1l359j9QUxw/SyFPCNhJnColrLJaaU?= =?us-ascii?Q?oMTBNZgCVBB22tVW9UWjOUwHNTMwZlC3F2FpGBm303856rybgWS9srPudVmP?= =?us-ascii?Q?VCCGoBzZFheO32tuzJHT0D5wd3myGmQvdBgEU6MrsENofoKk+DFbRbX2WUTc?= =?us-ascii?Q?wTObEum4J3uQqmwUIEUbrL9/GsPWWkNaM0aUpk3u/xkbr+bIFT5Isxv5ZGF1?= =?us-ascii?Q?iJUafKM+3/0O0NKRnRGDujyplWAbXqMKOguBO1P/fy1xaTaZ9FAFLi8AVF4M?= =?us-ascii?Q?LIoEIyczl+7VNnhcSof+sVdArl94HYi0W8xroLZiAtFSu8Ma+U+Onr01oCel?= =?us-ascii?Q?3E2zxncd7CdW1+f/qZIjVpy0qdswIjHVvSSZTvgMFATiGFt4ieuY3vE7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dMjcRRjG9IimrGkw==;5:AkfZVJz++ki53UekJHoksZKRqHOZ/rAGIX7CXS64EjTBcNDG+sP+v0w0qqx2A8+/9KhBhOAUq/CV362KAUF5cu9D2ykSF3E7fY33EiCEf70wGWgnoHDygUrQFmbBC2bXO3Vx8WNBLTyEL5G8ZHkd3Q==;24:Dinp8lnO/W8JQToWNEy8QOyDqt3Fdzqzwms9/4YznG/fImjFAghd7CftYR84HXO2JpKgAfauiaMwVjfGfuSnYeJ8Ir9JnU0xE7Z+pnrfMw8=;7:zEM6R3dKqtFYby0kSMeW18SX344r1H9L19xpIU1/xqPAGbIrd2tFxJHfvj4E3yIpH4tODcYeNahwhl/RQDr4G2ZAzd1Wfj1KjvQhcDWrGS9MnI2rpq6Xwm5aui1SEJDjKZQdBiebHRP0ubNYJU5BQJht2NXrSKiwvC2RMHOH4bblJii9Pb2zVqYgsFxdjRWlIS7b3TMwaWpYyswgs828/C5ocRQJgqRrxQ27CEIQCbw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2017 07:11:09.9622 (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: 1624 Lines: 43 Extending json/jevent framework for parsing arm64 event files. Adding jevents for ThunderX2 implementation defined PMU events. 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 | 61 +++++++++++++++++++++ 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 | 53 +++++++++++++++--- 8 files changed, 188 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