[tip:perf/core] perf script: Add newline after uregs output

2018-11-21 Thread tip-bot for Milian Wolff
Commit-ID:  b07d16f7e9e4cf2562f61b5f68a4b0831fe5ef14
Gitweb: https://git.kernel.org/tip/b07d16f7e9e4cf2562f61b5f68a4b0831fe5ef14
Author: Milian Wolff 
AuthorDate: Wed, 7 Nov 2018 10:37:05 +0100
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Wed, 21 Nov 2018 12:00:31 -0300

perf script: Add newline after uregs output

This change makes it much easier to easily distinguish between
consecutive samples by keeping the empty line between them, like we see
when we do not enable uregs output.

Before:

  cpp-inlining 28298 [-01] 54837.342780:3068085 cycles:pp:
  77c96709 __hypot_finite+0xa9 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x0BX:0x40f56cf6CX:0x294a3ae7...
  cpp-inlining 28298 [-01] 54837.344493:2881929 cycles:pp:
  77c96696 __hypot_finite+0x36 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x40d440c7BX:0x40d440c7CX:0x4d45e5da...

After:

  cpp-inlining 28298 [-01] 54837.342780:3068085 cycles:pp:
  77c96709 __hypot_finite+0xa9 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x0BX:0x40f56cf6CX:0x294a3ae7...

  cpp-inlining 28298 [-01] 54837.344493:2881929 cycles:pp:
  77c96696 __hypot_finite+0x36 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x40d440c7BX:0x40d440c7CX:0x4d45e5da...

Signed-off-by: Milian Wolff 
Cc: Jiri Olsa 
Link: http://lkml.kernel.org/r/20181107093705.16346-1-milian.wo...@kdab.com
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/builtin-script.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index b5bc85bd0bbe..daf73832743e 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -603,6 +603,8 @@ static int perf_sample__fprintf_uregs(struct perf_sample 
*sample,
printed += fprintf(fp, "%5s:0x%"PRIx64" ", perf_reg_name(r), 
val);
}
 
+   fprintf(fp, "\n");
+
return printed;
 }
 


[tip:perf/core] perf script: Add newline after uregs output

2018-11-21 Thread tip-bot for Milian Wolff
Commit-ID:  b07d16f7e9e4cf2562f61b5f68a4b0831fe5ef14
Gitweb: https://git.kernel.org/tip/b07d16f7e9e4cf2562f61b5f68a4b0831fe5ef14
Author: Milian Wolff 
AuthorDate: Wed, 7 Nov 2018 10:37:05 +0100
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Wed, 21 Nov 2018 12:00:31 -0300

perf script: Add newline after uregs output

This change makes it much easier to easily distinguish between
consecutive samples by keeping the empty line between them, like we see
when we do not enable uregs output.

Before:

  cpp-inlining 28298 [-01] 54837.342780:3068085 cycles:pp:
  77c96709 __hypot_finite+0xa9 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x0BX:0x40f56cf6CX:0x294a3ae7...
  cpp-inlining 28298 [-01] 54837.344493:2881929 cycles:pp:
  77c96696 __hypot_finite+0x36 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x40d440c7BX:0x40d440c7CX:0x4d45e5da...

After:

  cpp-inlining 28298 [-01] 54837.342780:3068085 cycles:pp:
  77c96709 __hypot_finite+0xa9 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x0BX:0x40f56cf6CX:0x294a3ae7...

  cpp-inlining 28298 [-01] 54837.344493:2881929 cycles:pp:
  77c96696 __hypot_finite+0x36 (/usr/lib/libm-2.28.so)
  ...
   ABI:2AX:0x40d440c7BX:0x40d440c7CX:0x4d45e5da...

Signed-off-by: Milian Wolff 
Cc: Jiri Olsa 
Link: http://lkml.kernel.org/r/20181107093705.16346-1-milian.wo...@kdab.com
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/builtin-script.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index b5bc85bd0bbe..daf73832743e 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -603,6 +603,8 @@ static int perf_sample__fprintf_uregs(struct perf_sample 
*sample,
printed += fprintf(fp, "%5s:0x%"PRIx64" ", perf_reg_name(r), 
val);
}
 
+   fprintf(fp, "\n");
+
return printed;
 }