Received: by 10.223.176.5 with SMTP id f5csp2005448wra; Thu, 8 Feb 2018 07:02:13 -0800 (PST) X-Google-Smtp-Source: AH8x224+HrWZD8GmOPbxjwSTFzBq7cEYt/4hvrAW000ZhUU1byRhCm7SeAaNUQ9z78M0fFW655TH X-Received: by 2002:a17:902:61:: with SMTP id 88-v6mr933900pla.428.1518102132888; Thu, 08 Feb 2018 07:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518102132; cv=none; d=google.com; s=arc-20160816; b=d07baEBMHkCFuYbWeBl59vzYZnh++UK+YnExmsllXYs/WGPGruU0GVFrtCwxDjVrKk 45TyXsL/BT9PhIvw5dDD5OkiSbr01IKRokV9iIl0VPbpec1O2ZEIdpBBeQwKOUEML9uz ZgtC1CnHojX+g0HiyHRDDim+AlOrzkMAqoFp2HRQNXyZHbp4xMJrHnxi7G2IPIWHiW4y njuPLO3OEZvwiD9TcRn4M7r4gY/vM2KXWq/v0yXTPDPG0jLk+8Bs/2elLXjZObSnPK/N m/lj0s2pSeZhSyEHvQ9I9Haof6OTQQz33SmKbALLOuf1zHC62h1xagplGY5k/gmdRa4p gfJw== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=e1xHXOecRKx3tdmG3bPCX6BvlCa6I9dwwGjSCOTSE7M=; b=QpqfENVSzPgErFCHYd/mg1vPb3PjOOGfy73xvMUIyaNRsGjpxUT1T/dVLspEYZ/tvW zpGhcIkxkYTyNrxODiltrsZmF5SnNmFkkcFlQmOthWL6nuS7fajH4zkMGifZeVrLKR5h nba4QXCXEPXziPJ2TBhAmo8bVTpdrsCF9mqQOvRREULNfxgk14w1jTskQddvkxKUdUDW V94n3dgFttbZIe/NUE6kyy071JWtrCCPSurO4fxwFRy2C/UBSeUDRPAiekAUoFQY0JIh P8mbL6RTOJt5SdaUuUa+pnjEmpkeQduyIUgXgK83jw1WRXzqioUGN8mxLV1SqHWHBFQa 1Iig== 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 w5si26382pgs.259.2018.02.08.07.01.44; Thu, 08 Feb 2018 07:02:12 -0800 (PST) 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 S1752173AbeBHPAW (ORCPT + 99 others); Thu, 8 Feb 2018 10:00:22 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5212 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750961AbeBHPAU (ORCPT ); Thu, 8 Feb 2018 10:00:20 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4B65CEE19B2C0; Thu, 8 Feb 2018 23:00:02 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.361.1; Thu, 8 Feb 2018 22:59:52 +0800 Subject: Re: [PATCH 5/9] perf utils: add support for arch standard events To: Jiri Olsa References: <1517939104-230881-1-git-send-email-john.garry@huawei.com> <1517939104-230881-6-git-send-email-john.garry@huawei.com> <20180208135549.GK10234@krava> CC: , , , , , , , , , , , , From: John Garry Message-ID: Date: Thu, 8 Feb 2018 14:59:44 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20180208135549.GK10234@krava> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2018 13:55, Jiri Olsa wrote: > On Wed, Feb 07, 2018 at 01:45:00AM +0800, John Garry wrote: >> For some architectures (like arm), there are architecture- >> defined events. Sometimes these events may be "recommended" >> according to the architecture standard, in that the >> implementer is free ignore the "recommendation" and create >> its custom event. >> >> This patch adds support for parsing standard events from >> arch-defined JSONs, and fixing up vendor events when they >> have implemented these events as standard. >> >> Support is also ensured that the vendor may implement their >> own custom events. >> >> A new step is added to the pmu events parsing to fix up the >> vendor events with the arch-standard events. >> >> The arch-defined JSONs must be placed in the arch root >> folder for preprocessing prior to tree JSON processing. >> >> In the vendor JSON, to specify that the arch event is >> supported, the keyword "ArchStdEvent" should be used, >> like this: >> [ >> { >> "ArchStdEvent": "0x41", >> "BriefDescription": "L1D cache access, write" >> }, >> ] >> >> No other JSON objects are strictly required. However, >> for other objects added, these take precedence over >> architecture defined standard events, thus supporting >> separate events which have the same event code. >> >> Signed-off-by: John Garry >> --- >> tools/perf/pmu-events/Build | 1 + >> tools/perf/pmu-events/README | 6 ++ >> tools/perf/pmu-events/jevents.c | 185 +++++++++++++++++++++++++++++++++++++--- >> 3 files changed, 182 insertions(+), 10 deletions(-) >> >> diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build >> index 999a4e8..f9e8466 100644 >> --- a/tools/perf/pmu-events/Build >> +++ b/tools/perf/pmu-events/Build >> @@ -1,5 +1,6 @@ >> hostprogs := jevents >> >> +CHOSTFLAGS = -I$(srctree)/tools/include > > Ithink this could be just CHOSTFLAGS_jevents.o = -I$(srctree)/tools/include Fine, it could be argued to keep as is, but not a big deal > it's just for the list.h right? > Right, for linux/list.h John > jirka > > . >