Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4104719ybn; Fri, 27 Sep 2019 16:40:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNkzoPwkB+5I3vroUgI9w9kYk/BEhdYJHRgf+C7mSbx55QGrSoq9a3qhdoz/ul4/uv9Fby X-Received: by 2002:aa7:d1d3:: with SMTP id g19mr7339749edp.150.1569627618319; Fri, 27 Sep 2019 16:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569627618; cv=none; d=google.com; s=arc-20160816; b=A+Z3scD2VWXKRqmTKAb0JXPNAC4L7UB4wpudtzJRJmVHJd9CXl0SpWdO/ZlDQ0WnPn IEHF9j1YwDrzuR4bV95mjDt4+ifxp1PMAPdUz8jbm0YZU6KLJydFJLg0k9KDBgSRf+0i AEohosnYZ5QV5joiHruyjZfTwkq/3aQjH09ECtqDRGkJW6S/EnOA0ZsTKM0Bs8/6/VPa 1bP/RG6euz44ek0xw4N6Y0UaId2PaxVllq88J33nrE4FxrCUCRKOl4bFwKqOUFmY7NcP PxE401aC9V9yHb0X4xCEi39LA1eGIIZ+F7zr67sUChY1b7DF9xk2yknAkQ1fRcvvf8vu hfeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VOBqEFv1BGviHRh5Sx10sK9IssyI6P4LKVZIDpSYqEk=; b=0aKAVueKF7K44RhvuRClyoTzAYTQDjMJwe47nQf4jWZdytDlS9yUyWATd7R+UcLPG4 MpM+MVpdVWHtjK4qxzufLCfpehWN3sg4L4ujPDpp8mB/e2AzNVFzFJMQ5y9n95KCBCeY Oysfy7IE58G46NMApxNm3XBxtTA4xSjJfWhkq9fDLmAakDZdXAxNlK+3s9WPPq2gLl39 iHg5hp6C4wCmTo9jUaakUYwE8hySKQ5o43f6oWxXCgv1z8+uix1k1Wgc/LvxlGfcYUnU VWc9nwLuTH7G0nOZlO/IORQ3/oW8JDBIeaDTN4TKliRulI7R4jLpw7EYyY0pJM8l7tDw KKaw== ARC-Authentication-Results: i=1; mx.google.com; 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 rn4si3495243ejb.251.2019.09.27.16.39.53; Fri, 27 Sep 2019 16:40:18 -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; 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 S1726408AbfI0Xfv (ORCPT + 99 others); Fri, 27 Sep 2019 19:35:51 -0400 Received: from mga09.intel.com ([134.134.136.24]:17015 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfI0Xfu (ORCPT ); Fri, 27 Sep 2019 19:35:50 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 16:35:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,557,1559545200"; d="scan'208";a="273983171" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga001.jf.intel.com with ESMTP; 27 Sep 2019 16:35:50 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 031D5300322; Fri, 27 Sep 2019 16:35:50 -0700 (PDT) From: Andi Kleen To: acme@kernel.org Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH 2/3] perf jevents: Fix period for Intel fixed counters Date: Fri, 27 Sep 2019 16:35:45 -0700 Message-Id: <20190927233546.11533-2-andi@firstfloor.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190927233546.11533-1-andi@firstfloor.org> References: <20190927233546.11533-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen The Intel fixed counters use a special table to override the JSON information. During this override the period information from the JSON file got dropped, which results in inst_retired.any and similar running with frequency mode instead of a period. Just specify the expected period in the table. Signed-off-by: Andi Kleen --- tools/perf/pmu-events/jevents.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index d413761621b0..fa85e33762f7 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -449,12 +449,12 @@ static struct fixed { const char *name; const char *event; } fixed[] = { - { "inst_retired.any", "event=0xc0" }, - { "inst_retired.any_p", "event=0xc0" }, - { "cpu_clk_unhalted.ref", "event=0x0,umask=0x03" }, - { "cpu_clk_unhalted.thread", "event=0x3c" }, - { "cpu_clk_unhalted.core", "event=0x3c" }, - { "cpu_clk_unhalted.thread_any", "event=0x3c,any=1" }, + { "inst_retired.any", "event=0xc0,period=2000003" }, + { "inst_retired.any_p", "event=0xc0,period=2000003" }, + { "cpu_clk_unhalted.ref", "event=0x0,umask=0x03,period=2000003" }, + { "cpu_clk_unhalted.thread", "event=0x3c,period=2000003" }, + { "cpu_clk_unhalted.core", "event=0x3c,period=2000003" }, + { "cpu_clk_unhalted.thread_any", "event=0x3c,any=1,period=2000003" }, { NULL, NULL}, }; -- 2.21.0