Received: by 10.192.165.148 with SMTP id m20csp262622imm; Fri, 20 Apr 2018 06:27:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/nRYIWgK2LAdrDf3XOcLbt+l0kNZNJ4jxg3WGh0VNbNulSqXqsg9ruiq/4nVegjDu3iDui X-Received: by 10.101.102.198 with SMTP id c6mr7397831pgw.127.1524230850106; Fri, 20 Apr 2018 06:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524230850; cv=none; d=google.com; s=arc-20160816; b=kml9sB5JWQjueRZjS2CJRF0piEO5hhL9n4kv85FLNFtH57fSDbCdshR1EUlSn/+YqM 5UaW2cGpUKfmPSJruUbWmg5+AsRMIW8E/QvVwavDoH7xjVa8nKW3ehCAGzPjpDd2fsId NBI684I2A9rjlrHWlhrh8QY+gn7YfIN5N4cL4Eow9FIBA3KiK/AbA02tEilgg6XsbsZk L4yisdW0nr+3Qdo+atF8FCA00dfBqDYbDv4FZVfkHaaTZCbdAL09NUdcU/gif8mFnIUd gS+Z3XfwcrSqhk7SX1FfjxoKyuGyPNYFatYb/RvwlmGQZctjO1UnqSUf91+rslnMWkob LRiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :organization:from:references:cc:to:subject :arc-authentication-results; bh=RFgR4cGn50JspxlzM4NYQvrwh4WLakx3yVCIuQJWxnk=; b=WA14XlqjdUZWvzxe/NOEZYGIN4H5qWv6gGgPBVQ6btU9bCEHevcR061J1lw/LMaTd6 J16WiUFlN12fbdSTeyAA6VwcStpvcDmmIngLmVCGrQsDIZWnEx6cWpmsZqY6SZ7lgBt2 8m+s0XoQ5lQU4UwSS/lFDxzwF8UBWnxS28GYghk7Q9BZeIhxX+TF1b54lafXHYxJu1NU 5sqzacrmHog5Pke4nA3Bc6O9UH9/i6YX9goZULpjSPxSW4aci3nbydCYB9uouHYGqT5T czlc08s9Gbqe3v/Bz47owi16JSDhgl6gbzM/ZbrOwwLDOM9sn+700nwhWDebKIfMhKFq 5d8Q== 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 y10si4867475pgc.588.2018.04.20.06.27.15; Fri, 20 Apr 2018 06:27:30 -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 S1754887AbeDTN0H (ORCPT + 99 others); Fri, 20 Apr 2018 09:26:07 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41084 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754762AbeDTN0F (ORCPT ); Fri, 20 Apr 2018 09:26:05 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3KDPoQq000994 for ; Fri, 20 Apr 2018 09:26:05 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hfgcp2gsu-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 20 Apr 2018 09:26:02 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Apr 2018 14:25:10 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 20 Apr 2018 14:25:06 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3KDP5sv9503018; Fri, 20 Apr 2018 13:25:06 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFD8CA404D; Fri, 20 Apr 2018 14:17:10 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73D3CA4053; Fri, 20 Apr 2018 14:17:10 +0100 (BST) Received: from oc3784624756.ibm.com (unknown [9.152.212.164]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 20 Apr 2018 14:17:10 +0100 (BST) Subject: Re: s390 perf events JSONs query To: John Garry , brueckner@linux.vnet.ibm.com, tmricht@linux.vnet.ibm.com Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Linuxarm , linux-kernel@vger.kernel.org, Will Deacon References: <68e84967-ca29-0b86-027a-76307e003a55@huawei.com> From: Thomas-Mich Richter Organization: IBM LTC Date: Fri, 20 Apr 2018 15:25:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <68e84967-ca29-0b86-027a-76307e003a55@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18042013-0008-0000-0000-000004ED7B05 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042013-0009-0000-0000-00001E819318 Message-Id: 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=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804200135 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. 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. @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? -- Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany -- Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294