Received: by 10.192.165.156 with SMTP id m28csp1277375imm; Wed, 18 Apr 2018 07:11:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx49LDeHz4u1baJUz3JqwugGuhbqAg9u80cSHaIxrx8NVfPXAZ+Q+pvW5c6VudqhY7E0/OH/f X-Received: by 10.98.194.133 with SMTP id w5mr2161103pfk.6.1524060687959; Wed, 18 Apr 2018 07:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524060687; cv=none; d=google.com; s=arc-20160816; b=VxGytNItE3qjBiSpbH9an7emrjfkSaTjgKrEpYYS3h5xyY6ahPUAZKKkNMrPg/XR5k TDsgdKpKN7Vj4jKdHK+abyb+ZzI3pgf2AxrIUZp+5rXWdH+G5SkFgDeLFr+wW7oEtJcR y0YCSXWWH9/a8K0Ov3rEhsqdy3rJXZ7RconvYfqh35nxLEJIg6SV2brohBNRxP0z218K wUhX/Sg35CgfvZ1JxGb9eXvS5jIawnIJt1fhJFJt+Ghrgtd3GhbqEUq9oTtbTTH8mSkT GCaGANFEgxCKfB9Zxvuq+8BpPYlg0JKi8Su9h94UpCtj2amk1T/IiZ/b6/TWu+nHx0rB 25hA== 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=r3XzNR32dIykXG77MWmQOsAh1EF4lenipOQcO0XLKsI=; b=0fJFJFtFFco8wTVNyWvG6KPiJ5JacE+GlJuzlzXgrIPbcuWlKaKQKwwVm/bA5Dg8/A n9iKKE1d8xYDtXOhIoYayaCm7pIdyAF/4nFXKAkO1sridVc1aqhZ90C26DWGR1zUjcS6 qV2fM0e1kMQKdNR0NL6FAGgVrSbPRqvkGf9kVTpHSWpvPOiqkpIKhQyWGUXcjcKZPgcv 1cRiqFUT1O7g3CRG37rIdA4ZVqbGvbZF9WPZraFSQG7/Q0AQYGVAdxTZrmAYnE6C/P82 ZvsEJOycVbjEgFD6osRTacPGHyXFFodL6seXLw2D1m2GLMfpoEjeMJB4vIEF3i/fbW9g Fs4w== 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 m6-v6si1296253plt.54.2018.04.18.07.11.13; Wed, 18 Apr 2018 07:11:27 -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 S1752952AbeDROKE (ORCPT + 99 others); Wed, 18 Apr 2018 10:10:04 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55024 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752707AbeDROKD (ORCPT ); Wed, 18 Apr 2018 10:10:03 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3IE86Db144731 for ; Wed, 18 Apr 2018 10:10:03 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2he6hsuh6u-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 18 Apr 2018 10:10:00 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Apr 2018 15:09:57 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Apr 2018 15:09:54 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3IE9roe3211552; Wed, 18 Apr 2018 14:09:53 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 10A37AE053; Wed, 18 Apr 2018 14:59:43 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E0ACAE04D; Wed, 18 Apr 2018 14:59:42 +0100 (BST) Received: from oc3784624756.ibm.com (unknown [9.152.212.90]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 18 Apr 2018 14:59:42 +0100 (BST) Subject: Re: [PATCH v2] perf list: Add s390 support for detailed/verbose pmu event description To: Mark Rutland , acme@kernel.org Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Thomas Richter References: <20180416132314.33249-1-tmricht@linux.ibm.com> <20180416144334.zkzxyhhnlm3ia5gy@lakrids.cambridge.arm.com> From: Thomas-Mich Richter Organization: IBM LTC Date: Wed, 18 Apr 2018 16:09:53 +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: <20180416144334.zkzxyhhnlm3ia5gy@lakrids.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18041814-0008-0000-0000-000004ECB53A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041814-0009-0000-0000-00001E80C062 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-18_02:,, 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-1804180128 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/16/2018 04:43 PM, Mark Rutland wrote: > On Mon, Apr 16, 2018 at 03:23:14PM +0200, Thomas Richter wrote: >> From: Thomas Richter >> >> Perf list with flags -d and -v print a description (-d) or >> a very verbose explanation (-v) of CPU specific counter events. >> These descriptions are provided with the json files in >> directory pmu-events/arch/s390/*.json. >> >> Display of these descriptions on s390 requires the >> corresponding json files. >> >> On s390 this does not work because function is_pmu_core() >> does not detect the s390 directory name where the >> CPU specific events are listed. On x86 it is >> /sys/bus/event_source/devices/cpu >> whereas on s390 it is >> /sys/bus/event_source/devices/cpum_cf >> /sys/bus/event_source/devices/cpum_sf >> >> Fix this by adding s390 directory name testing to >> function is_pmu_core(). This is the same approach as taken for >> arm platform. > >> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c >> index 1111d5bf15ca..8675ddf558c6 100644 >> --- a/tools/perf/util/pmu.c >> +++ b/tools/perf/util/pmu.c >> @@ -562,6 +562,12 @@ static int is_pmu_core(const char *name) >> if (stat(path, &st) == 0) >> return 1; >> >> + /* Look for cpu sysfs (specific to s390) */ >> + scnprintf(path, PATH_MAX, "%s/bus/event_source/devices/%s", >> + sysfs, name); >> + if (stat(path, &st) == 0 && !strncmp(name, "cpum_", 5)) >> + return 1; >> + > > This shouldn't adversely affect ARM, so FWIW: > > Acked-by: Mark Rutland > Arnaldo, with Mark Acked-by can you please apply the patch. Thanks a lot. -- 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