Received: by 10.223.185.116 with SMTP id b49csp6194137wrg; Wed, 28 Feb 2018 05:34:58 -0800 (PST) X-Google-Smtp-Source: AH8x224rJpSJGZt8AdjKMWfafqvErjkXgX56irhsIYWyhMGUpqu7R9npoVQgkTVyh2BSVlji7UUZ X-Received: by 10.101.96.43 with SMTP id p11mr13460839pgu.430.1519824898482; Wed, 28 Feb 2018 05:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519824898; cv=none; d=google.com; s=arc-20160816; b=eI+iAPh8S2qgw4yMCHcq2sAcuVNEA/oUIJr/Z6cwGMKQfOX1zh7jtDwHV2W7QeahDt 7HXcalKkqdmfks4Wn/XCY6xW5BW0SPfie/jOA19RQxU+Ge2YCH2Wb7y9t8Cif8post1Z 671OObfWhqgRj1xadzymQS9l82gxxa0Mrqm/PvJpEU7r6pwr97lJ4Xe4hKcDCF8OsHC2 4H0d3EBZGXuEaY5KWZCss/lIUT/51Zmy/IPynhjRnHNYnTxximphEeqgRIT2Hzxy6weT 5Gb4MDUb+W5m0AFq/wlIjfANiBvS5t34iA0cFecYk9gG4El1D2uUqiSUZTB1IF0sSuuf FlEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=K4E9BWuvhIanaRJJdI5TiQ8NHP/eB+djWO/zrgXBgTo=; b=cr/B91GtdmUc3ZOXO44/OgQYLQYnQsDCAjpws9HpPm3Xv2vXJ7LY7BI8S+kSehnSYM ntiiUjvgUGjOm/mxQGytZxVfoAvpIse91YDabF20qkiOHP1f8aMIZat9FJfBmRFUf3A6 99fxtd4EFOFaAtZ6oPVxF5oSZB1gScmcGepnVCQhgyDl+g/e/skzkJKGnz8gH+rZzt+8 L/vFqMf/ftaHLdM35eSgyENiqzZERrvlCFnkxz/AdHlX8vhwGWrtTTxiLq0aWzuonr3F Xcs+Sy/zQk/4CDhjJYSikU13QrpSz12mu0jwos01NipuhYOx+MF4jMNj63sVjwXDfNPq Ktvw== 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 r4si1005010pgs.323.2018.02.28.05.34.41; Wed, 28 Feb 2018 05:34:58 -0800 (PST) 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 S932177AbeB1Ndt (ORCPT + 99 others); Wed, 28 Feb 2018 08:33:49 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45500 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752638AbeB1Ndd (ORCPT ); Wed, 28 Feb 2018 08:33:33 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1SDVZHd052062 for ; Wed, 28 Feb 2018 08:33:33 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gdvf5tfpj-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 28 Feb 2018 08:33:33 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Feb 2018 13:33:30 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 28 Feb 2018 13:33:28 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1SDXRj453936354; Wed, 28 Feb 2018 13:33:27 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 245DB52045; Wed, 28 Feb 2018 12:25:13 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id CCD8352047; Wed, 28 Feb 2018 12:25:12 +0000 (GMT) From: Thomas Richter To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Thomas Richter Subject: [PATCH 2/2] perf annotate: Fix s390 target function disassembly Date: Wed, 28 Feb 2018 14:33:09 +0100 X-Mailer: git-send-email 2.13.5 In-Reply-To: <20180228133309.15758-1-tmricht@linux.vnet.ibm.com> References: <20180228133309.15758-1-tmricht@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18022813-0020-0000-0000-000003FCDF3A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022813-0021-0000-0000-000042910958 Message-Id: <20180228133309.15758-2-tmricht@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-28_07:,, 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-1802280163 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Perf annotate displays function call assembler instructions with a right arrow. Hitting enter on this line/instruction causes the browser to disassemble this target function and show it on the screen. On s390 this results in an error message 'symbol not found'. The function call assembly line parsing does not handle the s390 bras and brasl instructions. Function call__parse expects the target as first operand: callq e9140 <__fxstat> S390 has a register number as first operand: brasl %r14,41d60 Therefore the target addresses on s390 are always zero which is an invalid address. Fix this by skipping the first operand on s390. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner --- tools/perf/util/annotate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 28b233c3dcbe..5a90aa88076d 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -188,7 +188,13 @@ static int call__parse(struct arch *arch, struct ins_operands *ops, struct map * { char *endptr, *tok, *name; - ops->target.addr = strtoull(ops->raw, &endptr, 16); + if (!strcmp(arch->name, "s390")) { + ops->target.addr = 0; + tok = strchr(ops->raw, ','); + if (tok) + ops->target.addr = strtoull(tok + 1, &endptr, 16); + } else + ops->target.addr = strtoull(ops->raw, &endptr, 16); name = strchr(endptr, '<'); if (name == NULL) -- 2.14.3