Patchwork trace: improve info trace output

login
register
mail settings
Submitter Blue Swirl
Date Oct. 17, 2010, 8:05 a.m.
Message ID <AANLkTimpoaH_h1g5YXVcPuf80ukPKca0t4HUmo4AwrMh@mail.gmail.com>
Download mbox | patch
Permalink /patch/68067/
State New
Headers show

Comments

Blue Swirl - Oct. 17, 2010, 8:05 a.m.
Use PRI*64 to print full 64 bit data even on ILP32 hosts.

Print also sixth tracepoint parameter.

Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 simpletrace.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Stefan Hajnoczi - Oct. 18, 2010, 10:27 a.m.
On Sun, Oct 17, 2010 at 08:05:45AM +0000, Blue Swirl wrote:
> Use PRI*64 to print full 64 bit data even on ILP32 hosts.
> 
> Print also sixth tracepoint parameter.
> 
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
>  simpletrace.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Blue Swirl - Oct. 20, 2010, 4:48 p.m.
Thanks for the Ack, applied.

On Mon, Oct 18, 2010 at 10:27 AM, Stefan Hajnoczi
<stefanha@linux.vnet.ibm.com> wrote:
> On Sun, Oct 17, 2010 at 08:05:45AM +0000, Blue Swirl wrote:
>> Use PRI*64 to print full 64 bit data even on ILP32 hosts.
>>
>> Print also sixth tracepoint parameter.
>>
>> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>> ---
>>  simpletrace.c |    6 ++++--
>>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
>

Patch

diff --git a/simpletrace.c b/simpletrace.c
index deb1e07..b488d51 100644
--- a/simpletrace.c
+++ b/simpletrace.c
@@ -214,9 +214,11 @@  void st_print_trace(FILE *stream, int
(*stream_printf)(FILE *stream, const char
     unsigned int i;

     for (i = 0; i < trace_idx; i++) {
-        stream_printf(stream, "Event %lu : %lx %lx %lx %lx %lx\n",
+        stream_printf(stream, "Event %" PRIu64 " : %" PRIx64 " %" PRIx64
+                      " %" PRIx64 " %" PRIx64 " %" PRIx64 " %" PRIx64 "\n",
                       trace_buf[i].event, trace_buf[i].x1, trace_buf[i].x2,
-                      trace_buf[i].x3, trace_buf[i].x4, trace_buf[i].x5);
+                      trace_buf[i].x3, trace_buf[i].x4, trace_buf[i].x5,
+                      trace_buf[i].x6);
     }
 }