Received: by 10.223.185.116 with SMTP id b49csp1044080wrg; Fri, 23 Feb 2018 10:54:27 -0800 (PST) X-Google-Smtp-Source: AH8x226Sva1C5sHnYd+n2001e+pHcSh7c8Pq0gqYHOKcU8LZCO7rpgPEeAU1MWudpxjKIJg+L4Vl X-Received: by 10.98.192.74 with SMTP id x71mr2654764pff.21.1519412067204; Fri, 23 Feb 2018 10:54:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519412067; cv=none; d=google.com; s=arc-20160816; b=Fcmlc2nDy1EcZQvBlblTwWub/DeAmKVi+PL1lNOL1vwr9Q+xtAREpZQmvGliNQpa8o 6a9fojV9PLB2cfTgo5Ilo2YztqcBfD1SyREpNNztdSEziHBI6W1AjwevXODkOfDV14ow uuj1Yp1PHhrjlvoKcMhhILZWM1DHFGXD8bSVtKO+38jlfCESprJQ0A8aHho9yk73Ok5A M75Yk7yjAM7IxJLc92LYKI0ZyRjAu4FMBHc5gX29DKJCWSn6BXRpTUeqei36+NJ54bRb IciReG+yfY6tyrwnkMRZj6ftCPxOZytJaKR0HWrFTGSq9TyBVdXb6UTy4ILf71WImAU5 Ap5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=oOUQdi4O2v5EfnNvNkiKcqI2qdf/fGJtqoE/aBjE0WE=; b=P8/4RktWAsESSSO8qpdr1qs8HeeWrenBXvZ+2GIPXH6hkmOpMYz5mkUt9aJomptL3U cedCg6QatJu5KSIxPMC/vCWuZMDYR40sp5KWRKU27tT+PY3OWN/a+0PWWrjerwZPXWyg 6ixknCFIcBMf86dPSqHBsdouxVpDSdGqV2zPXfTDDfZJRW9sMqaKmqER0x2sKzzWIxu9 FAaC5qWifUShGoaRB7I5H2OL5kFdJKiNDTjbzg4JK7ggCsEQQ6qqkm4KFJTNLCUGJFqK LP5xnYfLhJmGyBs188qtBMwrfq/MFjUMS6ZYFuhlK6VQFcaIOD9YXUqMPwBeIfwLxmTM LbiA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18si1841866pgn.103.2018.02.23.10.54.13; Fri, 23 Feb 2018 10:54:27 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935146AbeBWSwa (ORCPT + 99 others); Fri, 23 Feb 2018 13:52:30 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:46912 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935132AbeBWSw0 (ORCPT ); Fri, 23 Feb 2018 13:52:26 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E9A00F7D; Fri, 23 Feb 2018 18:52:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Donald Stence , Ravi Bangoria , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Taeung Song , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.14 070/159] perf annotate: Do not truncate instruction names at 6 chars Date: Fri, 23 Feb 2018 19:26:18 +0100 Message-Id: <20180223170752.113033421@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ravi Bangoria [ Upstream commit 05d0e62d9fa0f1002cf82009ef31b36174da5472 ] There are many instructions, esp on PowerPC, whose mnemonics are longer than 6 characters. Using precision limit causes truncation of such mnemonics. Fix this by removing precision limit. Note that, 'width' is still 6, so alignment won't get affected for length <= 6. Before: li r11,-1 xscvdp vs1,vs1 add. r10,r10,r11 After: li r11,-1 xscvdpsxds vs1,vs1 add. r10,r10,r11 Reported-by: Donald Stence Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/20171114032540.4564-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/annotate.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -166,7 +166,7 @@ static void ins__delete(struct ins_opera static int ins__raw_scnprintf(struct ins *ins, char *bf, size_t size, struct ins_operands *ops) { - return scnprintf(bf, size, "%-6.6s %s", ins->name, ops->raw); + return scnprintf(bf, size, "%-6s %s", ins->name, ops->raw); } int ins__scnprintf(struct ins *ins, char *bf, size_t size, @@ -231,12 +231,12 @@ static int call__scnprintf(struct ins *i struct ins_operands *ops) { if (ops->target.name) - return scnprintf(bf, size, "%-6.6s %s", ins->name, ops->target.name); + return scnprintf(bf, size, "%-6s %s", ins->name, ops->target.name); if (ops->target.addr == 0) return ins__raw_scnprintf(ins, bf, size, ops); - return scnprintf(bf, size, "%-6.6s *%" PRIx64, ins->name, ops->target.addr); + return scnprintf(bf, size, "%-6s *%" PRIx64, ins->name, ops->target.addr); } static struct ins_ops call_ops = { @@ -300,7 +300,7 @@ static int jump__scnprintf(struct ins *i c++; } - return scnprintf(bf, size, "%-6.6s %.*s%" PRIx64, + return scnprintf(bf, size, "%-6s %.*s%" PRIx64, ins->name, c ? c - ops->raw : 0, ops->raw, ops->target.offset); } @@ -373,7 +373,7 @@ static int lock__scnprintf(struct ins *i if (ops->locked.ins.ops == NULL) return ins__raw_scnprintf(ins, bf, size, ops); - printed = scnprintf(bf, size, "%-6.6s ", ins->name); + printed = scnprintf(bf, size, "%-6s ", ins->name); return printed + ins__scnprintf(&ops->locked.ins, bf + printed, size - printed, ops->locked.ops); } @@ -449,7 +449,7 @@ out_free_source: static int mov__scnprintf(struct ins *ins, char *bf, size_t size, struct ins_operands *ops) { - return scnprintf(bf, size, "%-6.6s %s,%s", ins->name, + return scnprintf(bf, size, "%-6s %s,%s", ins->name, ops->source.name ?: ops->source.raw, ops->target.name ?: ops->target.raw); } @@ -489,7 +489,7 @@ static int dec__parse(struct arch *arch static int dec__scnprintf(struct ins *ins, char *bf, size_t size, struct ins_operands *ops) { - return scnprintf(bf, size, "%-6.6s %s", ins->name, + return scnprintf(bf, size, "%-6s %s", ins->name, ops->target.name ?: ops->target.raw); } @@ -501,7 +501,7 @@ static struct ins_ops dec_ops = { static int nop__scnprintf(struct ins *ins __maybe_unused, char *bf, size_t size, struct ins_operands *ops __maybe_unused) { - return scnprintf(bf, size, "%-6.6s", "nop"); + return scnprintf(bf, size, "%-6s", "nop"); } static struct ins_ops nop_ops = { @@ -925,7 +925,7 @@ void disasm_line__free(struct disasm_lin int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw) { if (raw || !dl->ins.ops) - return scnprintf(bf, size, "%-6.6s %s", dl->ins.name, dl->ops.raw); + return scnprintf(bf, size, "%-6s %s", dl->ins.name, dl->ops.raw); return ins__scnprintf(&dl->ins, bf, size, &dl->ops); }