Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423835AbdD1Eyb (ORCPT ); Fri, 28 Apr 2017 00:54:31 -0400 Received: from mail-by2nam01on0089.outbound.protection.outlook.com ([104.47.34.89]:23458 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1164503AbdD1EyS (ORCPT ); Fri, 28 Apr 2017 00:54:18 -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, gpkulkarni@gmail.com Subject: [PATCH v2 0/4] Add support for ThunderX2 pmu events using json files Date: Fri, 28 Apr 2017 10:23:43 +0530 Message-Id: <1493355227-31492-1-git-send-email-ganapatrao.kulkarni@cavium.com> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0068.INDPRD01.PROD.OUTLOOK.COM (10.164.116.168) To BN3PR0701MB1686.namprd07.prod.outlook.com (10.163.39.152) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a31641f-d3d9-49f5-3f8e-08d48df29d9f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BN3PR0701MB1686; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1686;3:u2+O7KVqPTMGIHN8/l31Ih3sgwntxAKGsU8TEX3GNDJ9jhxtQIaIg5TZpaTx83Yq++R5VgI0abUJ8VHBUJd0aSA8w04AKzZVrovaP14jvx5ID83Gcihk3HlrXSBRpwayBYAGSE6UANY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z4rLdFMyanM8srbe/fGrURPvZZ2SSECVdvPf/WprwmQhze8mkFPS450PGF8FnqT7IyyyUfP4T/wagsn5pWJ5uAgxHKMRhcb92qCkDxOJBdesxFJVQBuZVukYKwwLi6yfras7B2T5JR8XC9WSYZXdzUDp5wEs7SRTUi/VkjmyGNlgFm8mZA6gk3eMBxcyZ0Dgr4jZLjEJHxaaBJa7Ww0LuCYtC/kJKB8GlGmi7ZJiKjceSWwe2Gp9gh0KfQMM88ZJGX+K5FE6GBV2gdqdyh80MKF4SktueDrVsuwdFxEv3RKjgRstaboBH2Xr0fxF4C7XKtfKcd9pzSrsp+IYZjfUz2LoAwVdj+l30fdFbMXoxZtccamtEYQWRnJLGoNE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(20161123558100)(6072148);SRVR:BN3PR0701MB1686;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1686; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1686;4:5jdNj9AgtEiN37KNirtJjoDYhCD+txaVwr+fHYW7egk7PSAtmzscMFyrHr4vJSIYxX+Um9xhCDisxHO/4tjQjmL9Chqfjl6I31m864Cm3jPTVOe/wU0ZbbYjO5xBXppRq2vVcgu9vo7ltKiYrRElNovVkrCIKW/vPhw+1gNk8IhlHj9rBE+mx/wa1vsvaEyOTcuYikSwYo/kA5Pg9TmkDCNOpLl2NkgezEH8WUe0TMm6xJHaECXo+RytuX33mMOQd779dJuHfNgZ3XnRCYnvbe73coKFZLJ5VqnPi35BuSLcTREXc4NkFhduEjJ2lTliOv3UPtA0L/DFqApfy1sgGR8T3p1IQiS85WXFrBRABHn9+xzbMYFPXkkgxv8XfyaZl8kfOjP+O+Mnq2d7gh6pZQ+Y2MEiE//8bp3U1QtrWY8Z/TszjeKxC93Vp31r69CrTbDyDAmKmhlEq5KbMjRtYcKHqYZHikVVFVDOp+bZR7MhN/nQtnfQMr+2uOVxKGCZZQmfDOw0k26MBByBd/4DM4GB2B9cXaM27XTdg4MM4lPl9qUBtiwpbQmauN/EJgabKDFwqg0wG3WPBwodzyIn3Pb0velVpk1oTvFipIfrffenQDAqOEeh2/PIcoL4Tnezwp3uTtY5Ty/HavuIjuexhHNnYYAO+WnOJIgc42p0MKUGpxlva4aDCxwtV1MGZe/jZP9s1flQbqcfxhPMwMg6gB0TcGBioEMZ7TuHLne3HnTKm9LmefiRPLSx03o6W8RlhU6BRjmw731zYAAJDOnmt6hvFM2NwOx+2XJ6/5cx6k0= X-Forefront-PRVS: 029174C036 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39840400002)(39400400002)(39450400003)(39410400002)(50466002)(3846002)(86362001)(6486002)(36756003)(5009440100003)(48376002)(6512007)(4720700003)(7416002)(6116002)(5660300001)(50986999)(6506006)(53416004)(25786009)(42186005)(5003940100001)(38730400002)(110136004)(50226002)(305945005)(6666003)(7736002)(33646002)(4326008)(8676002)(66066001)(47776003)(189998001)(2906002)(53936002)(81166006);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0701MB1686;H:mypc.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0701MB1686;23:9pObEIqadDgi3ZfZVKeM4f1RpcW537qMvMoimfH?= =?us-ascii?Q?LTmdFddH09a0lE9HneanLyITtnr39AV+RuFtDgDRnUGmLW6GZE2xdFLnpm61?= =?us-ascii?Q?zX59WvTRz7rRwXCUUUy0pdkEugrOP8PAFqHgbQlRI8v8iFIh38TRE3BggiSC?= =?us-ascii?Q?rO/KDYWECvB47M8r5QnW3nV8J8p7YxF+wqWfSjuv/lliYUUGs3e+kF6T5xCP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hzwDNqE0ajJF9ZTh1aNaA0i9yth3WVFisZe3pQzwZmK2eroF9jaH+/z14hjNoIHFJGjb9XAuMY+4BGLij2Q2GkLP2ttWXgSiYLgztiVdXeiv9FvwN403hTNHJKxMRAMkTTk5CxOJTvvYkNqQMxASNaJCdkf58FfaSFVrGEAKaadJJUatuSTC+P9YpsULdKIQNwUF1BoteCi+sNMkgcvqnobdawq7ciAQ0tzx3avzNpXQiXaD6S300OQVsfu33WQRELCHZUCJXdwZKSe12LrK6lGMXRqj3A2SXOjIS6F0997MTdGPPlMKwziYfZVmDC3YMARciLht63AxzjTWGE9143AcQfhXPhc1jHoM6G1uHCyKrOKReh7KOGiqdHTUfd1YJelyfXf+1LmdkS1bfpuoI2t09+na2cFR9NBKt/vgnAaRe5twekzIyiPWggNI2aMAEtH+o/StSnm/H5pwRKVqfNQeDc+ySg48+MIsVy3p6KrcCBsy/+kIxg==;5:WUykyh/OQWAwQsvZvLPPCvPl3sAKnc3MeDyM7DJpnuAivB/sKG/Dew1Hq1DJJwqol+cFEHSXBVVxXOcBQGabGs9wUGbCUEznDEhtrCpY5Hy863VeobPsIebdo/FvrFPaaHIj4AgAgrDx/POPPtyDKw==;24:555O6Mu818qtYho/L84dJR8w+XY97OOo6V2fugmbG2mWC3A25H0jSMjrzLmychKr5c4Tte91HVxsPa/8BVNtGziP7ujEaVvl8JquMZ1nzSM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1686;7:nBjKFVvyIkpkRXabCrpnsdzlsHJe4wYk3gbfR9pyzggXailX8CjgLXflEqzSA/jkdWsyZ1N+Ql+NVnpQ+wkvNvhaPsyJbzW3rliYFfrTnGcHSamUFo85tQMXYEj2bgz12LBPimhkIMgFJrWO1QMWVX0w1A5nB5RjUC24w+j1BOPsVspVzmxoRY3O/N7jLIrJIaZ1+3hGlDPkwAU29TPBNtx4Vf6PFuYdgkDQAG1Gsu+SbrtFAQSEUQelaFGj2mAquhl0LaCHI7mrFF/Dt7CfhMlyldB3yU4U5tWTg1s12+9YBtzAwUH+X310IzV6Aj/ixGAcAs60KLEa3szufmbNaw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2017 04:54:09.8080 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1686 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1433 Lines: 32 Extending json/jevent framework for parsing arm64 event files. Adding jevents for ThunderX2 implementation defined PMU events. 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 implementation defined pmu core events of ThunderX2 tools/perf/arch/arm64/util/Build | 1 + tools/perf/arch/arm64/util/header.c | 41 ++++++++++++++ tools/perf/arch/powerpc/util/header.c | 3 +- tools/perf/arch/x86/util/header.c | 4 +- tools/perf/pmu-events/arch/arm64/mapfile.csv | 14 +++++ .../arm64/thunderx2/implementation-defined.json | 62 ++++++++++++++++++++++ tools/perf/util/header.h | 3 +- tools/perf/util/pmu.c | 54 ++++++++++++++++--- 8 files changed, 171 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 -- 1.8.1.4