Received: by 10.192.165.148 with SMTP id m20csp316707imm; Fri, 20 Apr 2018 07:15:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx48MyuP+mqiWJyIPAuuv5sDXUAPtnoTccF9NLjWlmP0QSs2ZQil5iUvA81Y33Gl05tgJ92s7 X-Received: by 10.98.207.67 with SMTP id b64mr1860081pfg.248.1524233743525; Fri, 20 Apr 2018 07:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524233743; cv=none; d=google.com; s=arc-20160816; b=d1O1SWyRPF4dFl3RSEEG+TOwpxgjHXSlCtUgaG94B3OryW2hGDfxWJuYGICk4mjZy1 OcFsEMEmeDOxDfMaM0YcTIyPIYpdCF7wWAXWfsgb4jhHgoTu/NiPAp7bYeVYUdgu2iUL 0slzbkSq04JBrdMtzqj5JKJJQQTrA89OoEUUxPzqU+eGi1Kz4BAe3KkyVNL785qfwVlE J/2EwPKUwrluoCOltlKM8LGsD/D4eJL1nHFc7v0lxDmboqXOFjB/XhmUVWcHXdjR8OzD RZdzj7SHLQFxy+BlxBmUFokzN0CdHHsOloTiFY34x2mVcX7JdRDmWeD6aJCrmOT8QMJe +Cxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=MgNeT2PKmWhwnOdyNeEtOgpPPJFrdfXjz0jsyUpsTic=; b=pc28pdDdDuUF8JCosih2rfc0JwBKnsBiobcefl8F3e/1KQimKHe8WolDciJy4tX3UH d0y3KK5+7C+WjQKGFvJPH8IRE+9nFZlt/RFDTD/LYM9VvdTno23FbLaHYNpq2AZjv/wk jtiV0Sf0c75h99TezQfVadzKPLDXVNjIJ9UcL+D/RSluMgBoHmtYJ/8ULklD0Jj7mDAv bpGJNvsuMJ2lQkf7ipXMISNmnSZIZP9oPdrPJrCsYkInmGknjVt3JScSqIQXmSbGG1z+ U3x9GBYzkrpAo0cozMP8j95QHKijlDdkcqMnn46+pIA66EGCwhPKFHK1CsShrES0ZO4U MH8Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si5016762pge.5.2018.04.20.07.15.28; Fri, 20 Apr 2018 07:15:43 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755246AbeDTONo (ORCPT + 99 others); Fri, 20 Apr 2018 10:13:44 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49480 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755000AbeDTONn (ORCPT ); Fri, 20 Apr 2018 10:13:43 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3KE4bVn040174 for ; Fri, 20 Apr 2018 10:13:42 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hffw5pdw5-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 20 Apr 2018 10:13:41 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Apr 2018 15:13:39 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 20 Apr 2018 15:13:36 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3KEDaor56361196; Fri, 20 Apr 2018 14:13:36 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0999D52041; Fri, 20 Apr 2018 14:04:21 +0100 (BST) Received: from lynx.boeblingen.de.ibm.com (unknown [9.152.212.24]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id EC7BF52047; Fri, 20 Apr 2018 14:04:20 +0100 (BST) Received: from brueckh by lynx.boeblingen.de.ibm.com with local (Exim 4.90_1) (envelope-from ) id 1f9Wn9-0000fn-N8; Fri, 20 Apr 2018 16:13:35 +0200 Date: Fri, 20 Apr 2018 16:13:35 +0200 From: Hendrik Brueckner To: John Garry Cc: Thomas-Mich Richter , brueckner@linux.vnet.ibm.com, tmricht@linux.vnet.ibm.com, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Linuxarm , linux-kernel@vger.kernel.org, Will Deacon Subject: Re: s390 perf events JSONs query References: <68e84967-ca29-0b86-027a-76307e003a55@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18042014-0020-0000-0000-000004141E78 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042014-0021-0000-0000-000042A8721A Message-Id: <20180420141335.GA32698@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-20_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804200142 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On Fri, Apr 20, 2018 at 02:53:27PM +0100, John Garry wrote: > On 20/04/2018 14:25, Thomas-Mich Richter wrote: > >On 04/20/2018 12:51 PM, John Garry wrote: > >>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. It is really the right way and the coolest feature to go when the JSONs need to be created manually. For s390, I started manually with adding descriptions for the libpfm4 library. Then, the events sysfs came up and that was the point in time when I created a common database for the counters in the s390-tools package. Meanwhile, s390-tools, libpfm4, kernel, and Thomas recently added perf JSONs as possible outputs formats. > >@Hendrik, > >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? I would consider this a low-priority given the fact that have to overwrite to the counter number (for the model-dependent counters) as well. Many thanks! Kind regards, Hendrik