aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-08-18 21:46:43 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-08-18 21:46:43 -0400
commit2abe40f1f18372b7a4b764e9d4fe783d0cee789f (patch)
tree861791533aa8e73bd4721556aee4315f5339d788
parent3e0384adb82e8d226c8cc6a976901cf67ec260d3 (diff)
trace-cmd: Show better data when reporting offsets
After a record, the offset of the CPU data is printed out for the user to see. This format is not very informative as the data just says "offset=27f000". Change this to a better format of: CPU0 data recorded at offset=0x2d5000 319488 bytes in size CPU1 data recorded at offset=0x323000 258048 bytes in size CPU2 data recorded at offset=0x362000 454656 bytes in size CPU3 data recorded at offset=0x3d1000 90112 bytes in size Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-output.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/trace-output.c b/trace-output.c
index e2aa1bb..2755113 100644
--- a/trace-output.c
+++ b/trace-output.c
@@ -991,8 +991,8 @@ int tracecmd_append_cpu_data(struct tracecmd_output *handle,
991 } 991 }
992 992
993 for (i = 0; i < cpus; i++) { 993 for (i = 0; i < cpus; i++) {
994 fprintf(stderr, "offset=%llx\n", 994 fprintf(stderr, "CPU%d data recorded at offset=0x%llx\n",
995 (unsigned long long) offsets[i]); 995 i, (unsigned long long) offsets[i]);
996 offset = lseek64(handle->fd, offsets[i], SEEK_SET); 996 offset = lseek64(handle->fd, offsets[i], SEEK_SET);
997 if (offset == (off64_t)-1) { 997 if (offset == (off64_t)-1) {
998 warning("could not seek to %lld\n", offsets[i]); 998 warning("could not seek to %lld\n", offsets[i]);
@@ -1005,6 +1005,7 @@ int tracecmd_append_cpu_data(struct tracecmd_output *handle,
1005 check_size, sizes[i]); 1005 check_size, sizes[i]);
1006 goto out_free; 1006 goto out_free;
1007 } 1007 }
1008 fprintf(stderr, " %ld bytes in size\n", check_size);
1008 } 1009 }
1009 1010
1010 free(offsets); 1011 free(offsets);