From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04455C352AA for ; Tue, 1 Oct 2019 11:13:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCB6C21A4A for ; Tue, 1 Oct 2019 11:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569928420; bh=lKxdte0NYpX5W9Wna7yuPM376NsAFh+bLGcJeFhmmSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cww4SUBySlJYzmY1K5/vD78YxtfF6v3WCdviSZP1SHYykwQdZvHpkpocAJI3oc4gD VC1BrP7DbnJWIa42/7wOgv3YxN2P2mytplvPkz1tf0/pvWdVswJgC+ImNbCZ7s6wDG 19i5b9MMLPq5cEGNJYCQIUJ71+pdQYbDuUYOkCDo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731941AbfJALNj (ORCPT ); Tue, 1 Oct 2019 07:13:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:35578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731194AbfJALNi (ORCPT ); Tue, 1 Oct 2019 07:13:38 -0400 Received: from quaco.ghostprotocols.net (177.206.223.101.dynamic.adsl.gvt.net.br [177.206.223.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8A1A621D82; Tue, 1 Oct 2019 11:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569928417; bh=lKxdte0NYpX5W9Wna7yuPM376NsAFh+bLGcJeFhmmSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nGu5YPCridwIhLzp8zSNCB8cCFmmg0DFmfu7YrZwT7m0JSgfDe6a++oomsbIyg7L+ mqq05Cwj7qoi/PHdPcTuxSaKqmObqezefRJtK/xwB9pmtA28IfGaXRAT6eXVi0wL// ZglaTOaHxzonSr6lQEEkhOyPhWKTzhUiC5b2G6qA= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Andi Kleen , Arnaldo Carvalho de Melo Subject: [PATCH 16/24] perf jevents: Fix period for Intel fixed counters Date: Tue, 1 Oct 2019 08:12:08 -0300 Message-Id: <20191001111216.7208-17-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001111216.7208-1-acme@kernel.org> References: <20191001111216.7208-1-acme@kernel.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 Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20190927233546.11533-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 9e37287da924..e2837260ca4d 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -450,12 +450,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