Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp965546ybm; Tue, 21 May 2019 06:40:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRJzwmf6spCmMOrAlGu2ULJBvO7BcU88UclU1Dn6ulsUP8RsE0CDaukwFwzywpmMi96R9f X-Received: by 2002:a62:38d3:: with SMTP id f202mr42104633pfa.41.1558446014608; Tue, 21 May 2019 06:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558446014; cv=none; d=google.com; s=arc-20160816; b=KxKZiaRr8axwLtGwPp01k1BF3giNPG7zsSSc16y6v2OzoKQs5y71odYPPGES05w24J gH53a6z4nz50fd4COJ9sBDS0KHdQHjZFbMoAQRQa1DkLjZEbcKFv5DBt/A6kPzWJv5Xn 8WPSKsUNaV21c8ooOS09/EmlIuyltnTRWgbGiCkNPxzlPWg4uFAUuuM7KPJPuPpcJqO1 4Q2bHmHam6DiMFuk2/8fF64wkXPDbR7Oqw54pE3WBtfdkJebpFPfixK73tij0axqr4Gn PvUaQZB5Va07FIEuDWl5ai/LPcHqHltKxkCgfK7yPCmjTirT2NADx7lwt/zhzLM6tWXn Y0og== 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; bh=CLVTb9mSwSJhS6hbj+es1ao5iOcko+Md8XdBRlpEXEg=; b=vJL9ZAoFaswlO+Nju2TLgGW5mLMacqg3HKjU947qv6hF5tS2yC9PFu7MuMzV+eoNI9 054rB/GxNg9xsyao6KlosW84MR7KtNcVKVAzDa+yiB26zD/sbLpIaZD3p6y+/H5Nop9g 4qv0svVYnAi82IRXTBxUGhUubmzQ318ZwGHo0wYufswXF9q2fUDO1vLPhCZN5q01CGXl FZnT/gaTPqt5zr71gdZhIn4AiUND+HnWidhjA8r0PnbqeZJfA33g1VLoXtsa29GiRm/K LbUr1hUR7ZqQD80LpOovns8U3qSWQhcK4QDtKhv+6KPYCENKdFErBaB7Fwegrd1SMYw4 xzVQ== 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 k33si20804795pld.415.2019.05.21.06.39.59; Tue, 21 May 2019 06:40:14 -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 S1728298AbfEUNhq (ORCPT + 99 others); Tue, 21 May 2019 09:37:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41098 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727969AbfEUNhq (ORCPT ); Tue, 21 May 2019 09:37:46 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4LDbe0M047783 for ; Tue, 21 May 2019 09:37:45 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2smhua9mrq-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 21 May 2019 09:37:44 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 May 2019 14:36:43 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 21 May 2019 14:36:39 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4LDacpc63176788 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2019 13:36:38 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E54FA405B; Tue, 21 May 2019 13:36:38 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C9D7A4057; Tue, 21 May 2019 13:36:38 +0000 (GMT) Received: from lynx.boeblingen.de.ibm.com (unknown [9.152.224.87]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 21 May 2019 13:36:38 +0000 (GMT) Received: from brueckh by lynx.boeblingen.de.ibm.com with local (Exim 4.90_1) (envelope-from ) id 1hT4wY-0007j1-2b; Tue, 21 May 2019 15:36:38 +0200 Date: Tue, 21 May 2019 15:36:38 +0200 From: Hendrik Brueckner To: Thomas Richter Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Subject: Re: [PATCH] pert/report: Support s390 diag event display on x86 References: <20190520144242.53207-1-tmricht@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190520144242.53207-1-tmricht@linux.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19052113-4275-0000-0000-0000033714DA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19052113-4276-0000-0000-00003846A9BC Message-Id: <20190521133638.GB10877@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-21_03:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905210087 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 20, 2019 at 04:42:42PM +0200, Thomas Richter wrote: > Perf report fails to display s390 specific event numbered bd000 > on an x86 platform. For example on s390 this works without error: > > [root@m35lp76 perf]# uname -m > s390x > [root@m35lp76 perf]# ./perf record -e rbd000 -- find / >/dev/null > [ perf record: Woken up 3 times to write data ] > [ perf record: Captured and wrote 0.549 MB perf.data ] > [root@m35lp76 perf]# ./perf report -D --stdio > /dev/null > [root@m35lp76 perf]# > > Transfering this perf.data file to an x86 platform and executing > the same report command produces: > > [root@f29 perf]# uname -m > x86_64 > [root@f29 perf]# ./perf report -i ~/perf.data.m35lp76 --stdio > interpreting bpf_prog_info from systems with endianity is not yet supported > interpreting btf from systems with endianity is not yet supported > 0x8c890 [0x8]: failed to process type: 68 > Error: > failed to process sample > > Event bd000 generates auxiliary data which is stored in big endian > format in the perf data file. > This error is caused by missing endianess handling on the x86 platform > when the data is displayed. Fix this by handling s390 auxiliary event > data depending on the local platform endianness. > > Output after on x86: > > [root@f29 perf]# ./perf report -D -i ~/perf.data.m35lp76 --stdio > /dev/null > interpreting bpf_prog_info from systems with endianity is not yet supported > interpreting btf from systems with endianity is not yet supported > [root@f29 perf]# > > Signed-off-by: Thomas Richter > --- > tools/perf/util/s390-cpumsf.c | 95 ++++++++++++++++++++++++++++------- > 1 file changed, 77 insertions(+), 18 deletions(-) > Looks sane to me. Thanks, Thomas. Reviewed-by: Hendrik Brueckner