Received: by 10.223.164.221 with SMTP id h29csp1041366wrb; Mon, 16 Oct 2017 17:34:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA4P017RLunMzIkO4NEziwKqznd9o9RTVp06bDLwlty8jUmqJTKMy0E920jqG5YbuxgpXB8 X-Received: by 10.84.242.74 with SMTP id c10mr10742266pll.141.1508200496766; Mon, 16 Oct 2017 17:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508200496; cv=none; d=google.com; s=arc-20160816; b=c8ZDfbRSRPWk0Lf4TtAdQ8r9+AmX2B9ehGYaGON5A4KrelTvj8PzRc+P3H5t7K2hTo g8+UQpxCOuS2AasBGRcqIHgCO2+Yz7c2wYGIN+V7acjbIvh/E7vERZjrZV8BvoBdHrus 9N213MsvJfyDQVZYlnYlxX6cwA+4NrPPnrHmtOQvWT8cqE+vpMQWCbhBrkTzk7/1ewTK q/2e7q7gv2TptYKTvDBLyYOBUOaoMAhTnirbeFlPOVaQ9+AtzKovtKJujFevZHHSIhd7 KNzcOb0bkI6VdhEZYStbjBvYmI3NoQ5QSB3mbqNKbCTwaEJmnb7mnI82zvvA0+5Bepvy gDtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=IGptfEWpSMpkW+mbXLvX6Mxmibo4eypG+zmwBA+v970=; b=SDRYtFU+c45xHLeBmgsEcwhKEzcJA24s1AOFOfwx+GMmCfzhEcdbQwYvuXM2DjPWtA cKFP2NPRQMJ8UxvBGDajfc/LO6G1Fc0qXQC5R1zEk0TGqGrqSSr2Ah/o0ik0TLb25HvZ vAmsUF7/yQblODnZmZuLkRjvrq0B8XO9hhVokDrv1W+gslLPTLta+XMNOjBCpngYCkbX cW5g0QTpPPDPmEbO0seoyOibGS7Z6gRvVtgHK9KVpw6gnVbPo1GQx13qaDzShtWLepct qW1Zs4+Mo/JGPTQ1fT/wvA28NgkTS6Ja9XHPL+p8MS4xBRR3MHpy1GiSn41YxIO9QzwW nMGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=gwFf5IBf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si4618805pgo.542.2017.10.16.17.34.42; Mon, 16 Oct 2017 17:34:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=gwFf5IBf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756664AbdJPScy (ORCPT + 99 others); Mon, 16 Oct 2017 14:32:54 -0400 Received: from mail-sn1nam01on0087.outbound.protection.outlook.com ([104.47.32.87]:34880 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754101AbdJPScw (ORCPT ); Mon, 16 Oct 2017 14:32:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=IGptfEWpSMpkW+mbXLvX6Mxmibo4eypG+zmwBA+v970=; b=gwFf5IBfhhgFryqb4sN4ccJZuGOY77EEcn/ECG/I8i/AjWc2aD77XhxG3iCsVZxmH9jKgwMyFEi/XJOzdMU7vwN/z5qyBIfxlOk5Dmyvq08uURIhpyFj9APu7ma0a1n/0aUSTZ8NhXAjNyKUpZs384huN+pyXIwY5+Ijjm4jXHI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ganapatrao.Kulkarni@cavium.com; Received: from mypc.caveonetworks.com (111.93.218.67) by CY1PR07MB2570.namprd07.prod.outlook.com (10.167.16.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 16 Oct 2017 18:32:46 +0000 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 v9 0/5] Add support for ThunderX2 pmu events using json files Date: Tue, 17 Oct 2017 00:02:17 +0530 Message-Id: <20171016183222.25750-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: DM5PR2201CA0043.namprd22.prod.outlook.com (10.174.180.160) To CY1PR07MB2570.namprd07.prod.outlook.com (10.167.16.25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3b56a5d-6954-4ddd-0e2a-08d514c44ea6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075);SRVR:CY1PR07MB2570; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2570;3:1/YNJmyarHjURLBeI2QMHVRbrzCciv+GacI/7zy+hW76Yf+hpyAg3c7Xf8wByQNq8+0ad6yhhqXgf8hO3R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W6TdK6mWwJx7PEuj9p+SITETWzbS5DYM6XLbBM5NlYegCC37K3aGMuPs+O03cvKmRt279LZmIRHkgR1z4AM83SGtbyFMJaTeAg+iSUSHYvBgNNAm0a5Pp7p62//6lmJHaSn39GTDmn+uw6aMpWp1HnjWNQewFni5SUOAQCLT7CxTV+psM54w2PRWZQI8H9j3vLF4E3KSq7ufzgeAZ/WvhRPc2sO2iGzs7HrN+x4MhGf7C9aToAHoC5HaZ3w8LpMPJlbn4xW6;4:uTaDeoAY975Vrk5fPLsarw8z/54+JR8OE93uzL8jLQegLADfjxr8Wrjqd+Jsu8NxjmuyykcZ9r4EXdW92qY/5oSnwXTFrKMttrygQRb8BIWNF4dxpwfux02D/pvYEN95prrvoT1/vhQuSRgh+8sPAfpvZdcQpL3BcjYw8taF7U088Y/1ij64p65cObQZqhRGttE+uozOuv45fEoyJ7ANt5NUNlBADX8q1Xfe21xmr2XX1fs04xCqvIv3d+I9+7stY+nkbldZn6XQb7qXPbhDsTXZeViQ+H/ca90OhGcLhbo= X-Exchange-Antispam-Report-Test: UriScan:(84791874153150); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR07MB2570;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR07MB2570; X-Forefront-PRVS: 0462918D61 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(5660300001)(86362001)(33646002)(7416002)(25786009)(2906002)(36756003)(7736002)(16526018)(305945005)(81156014)(81166006)(316002)(69596002)(48376002)(50466002)(97736004)(16586007)(8676002)(6116002)(53416004)(966005)(5009440100003)(50226002)(8936002)(101416001)(3846002)(50986999)(1076002)(106356001)(72206003)(105586002)(478600001)(5003940100001)(6512007)(189998001)(39060400002)(6666003)(6506006)(68736007)(53936002)(4326008)(6486002)(6306002)(47776003)(66066001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2570;H:mypc.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2570;23:QJPEnBXxm18jU2f2/LbxNYr98yr/FB1vmVeAkEE8+?= =?us-ascii?Q?B1ytK5I94ChaAHOtCpENQoqrMnlffOv94SBPUjxdVcdrAb/MVubxUkhNl3Wp?= =?us-ascii?Q?Xm/GBCDeNZcIKua0ObU1m000A2puvvOpyaivu06yzejTlE9/8eSu7jW9yqRK?= =?us-ascii?Q?gE1ICqPaDyyMK64aUxeWeS1/osl3f579x8l6XY37RwMP50Wmq0bnlSfQEE7l?= =?us-ascii?Q?qzltU2hdoA6YHXkfey7uiHd9DMkKRGQINHM1xbca/pQDmjsCAcFY03r3LTCc?= =?us-ascii?Q?qfelk0tWR/XoFidaL3xlEdTeDPn4eEaRm9MesSOFlGb7qB35Ld07xHDIsX4n?= =?us-ascii?Q?C7BSIG1h0LdfeRo4bNdVVnw7Y40JExt9RF5Ybufqvki8nHItPFmggBYmC9A3?= =?us-ascii?Q?MT4CslgY6qCo0ccWh2HAufTX8/53YZl6psajezeWMS95So1kckuWXeUJIiH7?= =?us-ascii?Q?Vy5Oeu4pFZ1/RC1+yGgHy99qy7HFcTxIRY0m2zAe2CWgD6QFxqoN5jCHPRMj?= =?us-ascii?Q?v1vUoJ0drDUE1S+3dKacH5T51aA3le9rbPvAW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+gvKEsOTtMwIGAwzMJqRkj5jaG80wHWxhg5HREUlXz0YnCrBMUE6bX4G575043PnK62sttahbxzZjnVzpLg/a1/A==;5:Yi4oTsun3k4vLhCtWQctbxz/lYc6E9jrcFDQyeXGU5B8oi14mkuCYYWTVUsVvDYypGt8+bdEzAvF56U5orOpH4ntMbuD2i+n9iKr/b5D6RWyeopWtn8KndnSOmbq7B4ki0iMOlMKAeXiy0SVwdLiAaNFaMO75vlSANoFc4j/Gvg=;24:oG+qMC16s1stmUezZ+US3J+UvRSTcAN+KIPL+bDf22dwvHRSJPuT5DQ3OLPjvR/GkccBBKwBFr1SKPoqnXlWqhewiTRDIIW9oH4+fqmxNyM=;7:BHf4t6NE2uDeK7n5SwShENRDd3m2A5rJSunUXNJG+MCGFHjEm9BcgHVcCoZ2V+20a0zh8iJQIDOUTtRia9h4/8ZuBWNnxDKUf8nBxUf/wWMBuNQW8DjZuaYDShpAMHIVF2tEj02cJro2ZnXmQcvvMLfzQUVgbmce7bZxob0fhQknVe71UKNWVZ5oQMCvAuIGz6HOMXi7xrrc8JT8Gh9pTymuAem0UWKskZBMpeOwBEg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2017 18:32:46.4381 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2570 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Extending json/jevent framework for parsing arm64 event files. Adding jevents for ThunderX2 implementation defined PMU events. v9: - Rebased to [3] and resolved conficts in PATCH 1/5 and reworked PATCH 3/5. - Added PATCH 5 to fix segmentation fault in perf_pmu__find_map [3] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=perf/core v8: - Rename thunderx2 directory to cavium v7: - Addressed some more comments from Will Deacon. 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 (5): perf utils: passing pmu as a parameter to function get_cpuid_str perf tools arm64: Add support for get_cpuid_str function. perf utils: use pmu->is_uncore to detect PMU CORE/UNCORE devices perf vendor events arm64: Add ThunderX2 implementation defined pmu core events perf utils: add check for valid cpuid in function perf_pmu__find_map tools/perf/arch/arm64/util/Build | 1 + tools/perf/arch/arm64/util/header.c | 65 ++++++++++++++++++++++ tools/perf/arch/powerpc/util/header.c | 2 +- tools/perf/arch/x86/util/header.c | 2 +- .../arch/arm64/cavium/thunderx2-imp-def.json | 62 +++++++++++++++++++++ tools/perf/pmu-events/arch/arm64/mapfile.csv | 15 +++++ tools/perf/util/header.h | 3 +- tools/perf/util/metricgroup.c | 4 +- tools/perf/util/pmu.c | 39 ++++++++----- tools/perf/util/pmu.h | 2 +- 10 files changed, 174 insertions(+), 21 deletions(-) create mode 100644 tools/perf/arch/arm64/util/header.c create mode 100644 tools/perf/pmu-events/arch/arm64/cavium/thunderx2-imp-def.json create mode 100644 tools/perf/pmu-events/arch/arm64/mapfile.csv -- 2.9.4 From 1624567492584634144@xxx Mon Feb 04 19:24:52 +0000 2019 X-GM-THRID: 1585904185306072742 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2019-02