Received: by 10.192.165.148 with SMTP id m20csp293051imm; Fri, 20 Apr 2018 06:56:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx48kki9PCYjS7/F5ocuHqqghB+gJakQo9FMbiK7K/xmFqylUjLWo5sPFDYZBdcvnzBN973lO X-Received: by 10.98.8.12 with SMTP id c12mr9912083pfd.77.1524232611650; Fri, 20 Apr 2018 06:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524232611; cv=none; d=google.com; s=arc-20160816; b=etPjnX0ObMTegEvIDWrDytomgeuj12WqtTdQUAsLSe48l4LJwFpvOt9ctsUnMehuTP MB24oexHpjnMxhe4TXqm5ecL+I+T8hWDF5yjdEhVGcZyuFLSQ8R+EfaPo0Vmy58V5AsP fZp/7R6H7WCPaPTm3xX125DdKLNsVGzdF1ZAyjbCnHORPTwyIw4VeFtPAJmYQXDLzzeo 8ArSvj6qC0sD3FctHB5xhKTIpqHcFJ768hWmwYcudPVJoskperljT+z1vNjb+kJZOKBl XOBYBVuFuDqiuxyqJCtsDoniv5WAXIHaU4ob5RBosg5O1PGU+gk2RYFX7m1ADR4lD5dT V+FQ== 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=MarhzuITDkNIOgBo9pQCg+mL5YvwoHnqvCpBX7gQPcw=; b=0idLYYkb55pdRm8zLnCZO0DjYPZ9xs40NrJbkiTlnyCYkl4L9CFWWQDfnJDA+ICVzv 4gQ77BrSlNTlMGxqFCqYkeM7b3fRMruIpkQ2rE1HETG93PHYSXd3o0SAcdT4sfOelTzh HTqgSJTlrMHCC0wtGQrDXWdwXqkJjz/3Bnp/X9uCe+nllCj4hghaa9CgNWul6sUpeqHe Uh5uFEnntqGgwfG4UeaCyDDS5EbajUIGMLpVxgoIPehHUqkIXIvlwZ+HOGFww4ckyJm1 yE1WuKhHaZ9QHMWDeffSHudZXmR1qVQ5HiT/KmBHaSwPO5qkS8T8YHiZLb1mW6zs/dnq /2TQ== 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 e3si4785311pgr.400.2018.04.20.06.56.36; Fri, 20 Apr 2018 06:56:51 -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 S1755194AbeDTNxq (ORCPT + 99 others); Fri, 20 Apr 2018 09:53:46 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:60754 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754872AbeDTNxo (ORCPT ); Fri, 20 Apr 2018 09:53:44 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A7806D6467CB6; Fri, 20 Apr 2018 21:53:39 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.361.1; Fri, 20 Apr 2018 21:53:34 +0800 Subject: Re: s390 perf events JSONs query To: Thomas-Mich Richter , , References: <68e84967-ca29-0b86-027a-76307e003a55@huawei.com> CC: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , "Namhyung Kim" , Linuxarm , , Will Deacon From: John Garry Message-ID: Date: Fri, 20 Apr 2018 14:53:27 +0100 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: Content-Type: text/plain; charset="utf-8"; 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 20/04/2018 14:25, Thomas-Mich Richter wrote: > On 04/20/2018 12:51 PM, John Garry wrote: >> Hi Hendrik, Thomas, >> >> I noticed that in 4.17-rc1 support was included for s390 perf pmu-events. I also notice that the JSONs contain many common (identical actually) events between different chips for this arch. >> >> Support was added for factoring out common arch events in https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/tools/perf/pmu-events?h=next-20180420&id=e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac >> >> ARM64 chips use this feature. I am not familiar with the s390 arch, but do you think you could also use this feature? >> >> Thanks, >> John >> > > I have just played with this feature. I was caught off by this error message: > > [root@s35lp76 pmu-events]# ./jevents s390 arch /tmp/xxx 100000 > d 0 4096 s390 arch/s390 > d 1 4096 cf_z14 arch/s390/cf_z14 > f 2 1338 basic.json arch/s390/cf_z14/basic.json > .... > jevents: Ignoring file arch/s390/archevent.json <---- confusing error message Let me check if this can be silenced. > > jevents: Processing mapfile arch/s390/mapfile.csv > [root@s35lp76 pmu-events]# > > I started debugging, until I realized this file is still processed..... > (Just a side remark). > > Anyway the features is nice, but it does not save anything in the resulting > pmu-events.c file, correct? The events defined in the common archevent.json > files are just copied into the structures of a specific machine. > Yes, the resulting derived pmu-events.c should be the same. In fact, if there was naming inconsistencies in JSONs previously, they should now be gone. > The feature saves time and space when you create the machine specific json > files because it allows you to refer to a common event by name. Cool! > > On s390 we do not create the json files manually, but have some scripts to > create them based on s390 type/model hardware specific input files. Right, I would say that this is mostly useful when the JSONs are created manually, which was the case in the ARM world, but not x86. I didn't know about s390. > > @Hendirk, > we could rework our internal tool chain to emit the new "ArchStdEvent" > keyword for common events, but in the end we do not save anything in the > resulting pmu-events.c file. And it requires considerable rework to > support it. > Given that, I would put it very low priority on your todo list, comments? > Cheers, John