* [PATCH] perf annotate: Remove precision for mnemonics
@ 2017-11-14 3:25 Ravi Bangoria
2017-11-14 13:04 ` Arnaldo Carvalho de Melo
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ravi Bangoria @ 2017-11-14 3:25 UTC (permalink / raw)
To: acme
Cc: peterz, mingo, alexander.shishkin, jolsa, namhyung,
treeze.taeung, linux-kernel, dstence, Ravi Bangoria
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 <dstence@us.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
---
tools/perf/util/annotate.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 54321b947de8..6462a7423beb 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -165,7 +165,7 @@ static void ins__delete(struct ins_operands *ops)
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,
@@ -230,12 +230,12 @@ static int call__scnprintf(struct ins *ins, char *bf, size_t size,
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 = {
@@ -299,7 +299,7 @@ static int jump__scnprintf(struct ins *ins, char *bf, size_t size,
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);
}
@@ -372,7 +372,7 @@ static int lock__scnprintf(struct ins *ins, char *bf, size_t size,
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);
}
@@ -448,7 +448,7 @@ static int mov__parse(struct arch *arch, struct ins_operands *ops, struct map *m
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);
}
@@ -488,7 +488,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
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);
}
@@ -500,7 +500,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 = {
@@ -990,7 +990,7 @@ void disasm_line__free(struct disasm_line *dl)
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);
}
--
2.13.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] perf annotate: Remove precision for mnemonics
2017-11-14 3:25 [PATCH] perf annotate: Remove precision for mnemonics Ravi Bangoria
@ 2017-11-14 13:04 ` Arnaldo Carvalho de Melo
2017-11-15 8:11 ` Ravi Bangoria
2017-11-18 8:32 ` [tip:perf/core] perf annotate: Do not truncate instruction names at 6 chars tip-bot for Ravi Bangoria
2017-11-29 6:31 ` tip-bot for Ravi Bangoria
2 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-14 13:04 UTC (permalink / raw)
To: Ravi Bangoria
Cc: peterz, mingo, alexander.shishkin, jolsa, namhyung,
treeze.taeung, linux-kernel, dstence
Em Tue, Nov 14, 2017 at 08:55:40AM +0530, Ravi Bangoria escreveu:
> 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
Ok, this improves the situation, as we stop truncating info, but I think
that we should look for the longest instruction name and then use that
to align the operands, will add that to my todo list if nobody does it
first :-)
Thanks, applied.
- Arnaldo
> Reported-by: Donald Stence <dstence@us.ibm.com>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> ---
> tools/perf/util/annotate.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index 54321b947de8..6462a7423beb 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -165,7 +165,7 @@ static void ins__delete(struct ins_operands *ops)
> 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,
> @@ -230,12 +230,12 @@ static int call__scnprintf(struct ins *ins, char *bf, size_t size,
> 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 = {
> @@ -299,7 +299,7 @@ static int jump__scnprintf(struct ins *ins, char *bf, size_t size,
> 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);
> }
> @@ -372,7 +372,7 @@ static int lock__scnprintf(struct ins *ins, char *bf, size_t size,
> 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);
> }
> @@ -448,7 +448,7 @@ static int mov__parse(struct arch *arch, struct ins_operands *ops, struct map *m
> 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);
> }
> @@ -488,7 +488,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
> 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);
> }
>
> @@ -500,7 +500,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 = {
> @@ -990,7 +990,7 @@ void disasm_line__free(struct disasm_line *dl)
> 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);
> }
> --
> 2.13.6
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf annotate: Remove precision for mnemonics
2017-11-14 13:04 ` Arnaldo Carvalho de Melo
@ 2017-11-15 8:11 ` Ravi Bangoria
0 siblings, 0 replies; 5+ messages in thread
From: Ravi Bangoria @ 2017-11-15 8:11 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: peterz, mingo, alexander.shishkin, jolsa, namhyung,
treeze.taeung, linux-kernel, dstence, ravi.bangoria
On 11/14/2017 06:34 PM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Nov 14, 2017 at 08:55:40AM +0530, Ravi Bangoria escreveu:
>> 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
> Ok, this improves the situation, as we stop truncating info, but I think
> that we should look for the longest instruction name and then use that
> to align the operands, will add that to my todo list if nobody does it
> first :-)
Hmm.. I could see longest one of 15 characters (f.e. AESKEYGENASSIST)
by a quick glance over list of instructions for x86 and powerpc. Need
to check for other archs.
> Thanks, applied.
Thanks,
Ravi
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:perf/core] perf annotate: Do not truncate instruction names at 6 chars
2017-11-14 3:25 [PATCH] perf annotate: Remove precision for mnemonics Ravi Bangoria
2017-11-14 13:04 ` Arnaldo Carvalho de Melo
@ 2017-11-18 8:32 ` tip-bot for Ravi Bangoria
2017-11-29 6:31 ` tip-bot for Ravi Bangoria
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Ravi Bangoria @ 2017-11-18 8:32 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, tglx, peterz, treeze.taeung, namhyung, dstence,
ravi.bangoria, acme, linux-kernel, hpa, alexander.shishkin,
jolsa
Commit-ID: 648388ae68e953b312e28eaf869fe6c01e2f70cc
Gitweb: https://git.kernel.org/tip/648388ae68e953b312e28eaf869fe6c01e2f70cc
Author: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
AuthorDate: Tue, 14 Nov 2017 08:55:40 +0530
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 16 Nov 2017 14:50:00 -0300
perf annotate: Do not truncate instruction names at 6 chars
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 <dstence@us.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Taeung Song <treeze.taeung@gmail.com>
Link: http://lkml.kernel.org/r/20171114032540.4564-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index eab4a8e..30d74da 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -165,7 +165,7 @@ static void ins__delete(struct ins_operands *ops)
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,
@@ -230,12 +230,12 @@ static int call__scnprintf(struct ins *ins, char *bf, size_t size,
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 = {
@@ -299,7 +299,7 @@ static int jump__scnprintf(struct ins *ins, char *bf, size_t size,
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);
}
@@ -372,7 +372,7 @@ static int lock__scnprintf(struct ins *ins, char *bf, size_t size,
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);
}
@@ -448,7 +448,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);
}
@@ -488,7 +488,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
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);
}
@@ -500,7 +500,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 = {
@@ -990,7 +990,7 @@ void disasm_line__free(struct disasm_line *dl)
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);
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:perf/core] perf annotate: Do not truncate instruction names at 6 chars
2017-11-14 3:25 [PATCH] perf annotate: Remove precision for mnemonics Ravi Bangoria
2017-11-14 13:04 ` Arnaldo Carvalho de Melo
2017-11-18 8:32 ` [tip:perf/core] perf annotate: Do not truncate instruction names at 6 chars tip-bot for Ravi Bangoria
@ 2017-11-29 6:31 ` tip-bot for Ravi Bangoria
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Ravi Bangoria @ 2017-11-29 6:31 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, ravi.bangoria, dstence, treeze.taeung, hpa,
alexander.shishkin, peterz, acme, namhyung, mingo, jolsa,
linux-kernel
Commit-ID: 05d0e62d9fa0f1002cf82009ef31b36174da5472
Gitweb: https://git.kernel.org/tip/05d0e62d9fa0f1002cf82009ef31b36174da5472
Author: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
AuthorDate: Tue, 14 Nov 2017 08:55:40 +0530
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 28 Nov 2017 14:22:31 -0300
perf annotate: Do not truncate instruction names at 6 chars
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 <dstence@us.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Taeung Song <treeze.taeung@gmail.com>
Link: http://lkml.kernel.org/r/20171114032540.4564-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index da1c4c4..3369c78 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -165,7 +165,7 @@ static void ins__delete(struct ins_operands *ops)
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,
@@ -230,12 +230,12 @@ static int call__scnprintf(struct ins *ins, char *bf, size_t size,
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 = {
@@ -299,7 +299,7 @@ static int jump__scnprintf(struct ins *ins, char *bf, size_t size,
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);
}
@@ -372,7 +372,7 @@ static int lock__scnprintf(struct ins *ins, char *bf, size_t size,
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);
}
@@ -448,7 +448,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);
}
@@ -488,7 +488,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
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);
}
@@ -500,7 +500,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 = {
@@ -924,7 +924,7 @@ void disasm_line__free(struct disasm_line *dl)
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);
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-29 6:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 3:25 [PATCH] perf annotate: Remove precision for mnemonics Ravi Bangoria
2017-11-14 13:04 ` Arnaldo Carvalho de Melo
2017-11-15 8:11 ` Ravi Bangoria
2017-11-18 8:32 ` [tip:perf/core] perf annotate: Do not truncate instruction names at 6 chars tip-bot for Ravi Bangoria
2017-11-29 6:31 ` tip-bot for Ravi Bangoria
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).