Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5237093ybl; Tue, 27 Aug 2019 01:19:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEz0daeGFYdMW8cqsJNUg+qZlPCZ935ZxX+2bzY3FoQOkx1X3RNS2RNC56rNWpNXKH5nuQ X-Received: by 2002:aa7:98da:: with SMTP id e26mr24767260pfm.34.1566893942514; Tue, 27 Aug 2019 01:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566893942; cv=none; d=google.com; s=arc-20160816; b=D/buql9hLQKWifyXbfFHMO5JGzBjiamNWNRfz3/nK/Ogkc+WIIo1oVhqf0Ijds4JrZ TAgzbideN6nT+2mcQHXxVag2kGNsoloSf3m3gmiSD5wBNV2wJXKGtt32GNb9hrHkORcW VCQMBIvHkxKzCAHGv6N6VoQ3SeRhNcXWsQNwZ+Vfu6egiCxk2V9GFayfZczI1wAbZYNE O1gRdhqASKQhhKniuyExa3+wzMS9bljKpdhzb9+GbcSSzAmiOnQnyI+s1X8I+ELuVPG8 aJhtNjlYY7kOy5hZCvVHMVO3xzTS0SGkn0DjAPGCmSXSuH1sob2yRXF2U0Jhoo24KP6/ aEnQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CfFZphwQCLZLF34fTIiSWNzz89Y9gNh21aU6Foblwkw=; b=musHo2AvI/mnz18DNYD6Jb9LwaLb7Zs4aunAFpoQfwZxfonUBCg73xi0ZTdPi/31eh kEbhj8RSmzlU47m7QCdiw3b6fWqknHpEbqWbwdQpi0yFCfh7hn0tbJEjHIAgAsgjtnsd lt3ldyOnF98l8tZxT7hDFgnJ59xcQbCtXGaTnMl1obgzUT6+sI2gBrXi0sz9e68YLebJ vUI3wQ/qJaIaXsy44SHP8AIyXGsw45m5Ei5wGf7mFc3WyG0xJuzOCNZrw995PO+ABgrT LN+j4ZcMN2yj3Lmk3ZQM5blqV3iSbgu0J0fVG+cxEsIQ3ac9ssRsMjNSYND3mPJ6RGod AJig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aJFvSLR0; 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 e3si5880254pfn.178.2019.08.27.01.18.47; Tue, 27 Aug 2019 01:19:02 -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=@kernel.org header.s=default header.b=aJFvSLR0; 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 S1729824AbfH0IRJ (ORCPT + 99 others); Tue, 27 Aug 2019 04:17:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:44450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729611AbfH0Hw6 (ORCPT ); Tue, 27 Aug 2019 03:52:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 C906721881; Tue, 27 Aug 2019 07:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892377; bh=bMgII+BcVpCBidRBgxQO/AC3Mx3ozJ83MGtmLzdsyGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aJFvSLR0XfP2BbBgpqcrySliDdjdy4ZwrvbyruAdMd4HUZwGtS2D70pz1o6mL2PQz ikJ0pNpLsPmTxXXtB/HrR8la8FE/hYYRvnoAwdqZ2Eb6qcAEjy7s3wM7I/bwolNvTg E+B4qL3KiWMX+FNqMUKZwNRxK9CzyJakrpHMyuSc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jin Yao , Alexander Shishkin , Andi Kleen , Jin Yao , Jiri Olsa , Kan Liang , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.14 34/62] perf pmu-events: Fix missing "cpu_clk_unhalted.core" event Date: Tue, 27 Aug 2019 09:50:39 +0200 Message-Id: <20190827072702.701715776@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072659.803647352@linuxfoundation.org> References: <20190827072659.803647352@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 8e6e5bea2e34c61291d00cb3f47560341aa84bc3 ] The events defined in pmu-events JSON are parsed and added into perf tool. For fixed counters, we handle the encodings between JSON and perf by using a static array fixed[]. But the fixed[] has missed an important event "cpu_clk_unhalted.core". For example, on the Tremont platform, [root@localhost ~]# perf stat -e cpu_clk_unhalted.core -a event syntax error: 'cpu_clk_unhalted.core' \___ parser error With this patch, the event cpu_clk_unhalted.core can be parsed. [root@localhost perf]# ./perf stat -e cpu_clk_unhalted.core -a -vvv ------------------------------------------------------------ perf_event_attr: type 4 size 112 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ ... Signed-off-by: Jin Yao Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190729072755.2166-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/pmu-events/jevents.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index d51dc9ca8861a..94a7cabe9b824 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -346,6 +346,7 @@ static struct fixed { { "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" }, { NULL, NULL}, }; -- 2.20.1