aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-03-25 22:07:09 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-03-25 22:07:09 -0400
commitb8981da8e693107bb9142f7629dab8f1253529d5 (patch)
tree014b217e08a3a272f7735fde8d0042794c1bdf13
parent2bcbd70566311bba78b1d9347e82096207f14412 (diff)
trace-cmd: Add raw output format to trace-cmd report
Add '-r' option that prints the events by their field content and ignores the print format of the event. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-read.c9
-rw-r--r--trace-usage.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/trace-read.c b/trace-read.c
index 7518128..80173f9 100644
--- a/trace-read.c
+++ b/trace-read.c
@@ -558,6 +558,7 @@ void trace_report (int argc, char **argv)
558 int latency_format = 0; 558 int latency_format = 0;
559 int show_events = 0; 559 int show_events = 0;
560 int print_events = 0; 560 int print_events = 0;
561 int raw = 0;
561 int neg = 0; 562 int neg = 0;
562 int c; 563 int c;
563 564
@@ -576,7 +577,7 @@ void trace_report (int argc, char **argv)
576 {NULL, 0, NULL, 0} 577 {NULL, 0, NULL, 0}
577 }; 578 };
578 579
579 c = getopt_long (argc-1, argv+1, "+hi:fepPNLlEwF:Vvq", 580 c = getopt_long (argc-1, argv+1, "+hi:feprPNLlEwF:Vvq",
580 long_options, &option_index); 581 long_options, &option_index);
581 if (c == -1) 582 if (c == -1)
582 break; 583 break;
@@ -611,6 +612,9 @@ void trace_report (int argc, char **argv)
611 case 'E': 612 case 'E':
612 show_events = 1; 613 show_events = 1;
613 break; 614 break;
615 case 'r':
616 raw = 1;
617 break;
614 case 'w': 618 case 'w':
615 show_wakeup = 1; 619 show_wakeup = 1;
616 break; 620 break;
@@ -669,6 +673,9 @@ void trace_report (int argc, char **argv)
669 673
670 pevent = tracecmd_get_pevent(handle); 674 pevent = tracecmd_get_pevent(handle);
671 675
676 if (raw)
677 pevent->print_raw = 1;
678
672 if (show_endian) { 679 if (show_endian) {
673 printf("file is %s endian and host is %s endian\n", 680 printf("file is %s endian and host is %s endian\n",
674 pevent_is_file_bigendian(pevent) ? "big" : "little", 681 pevent_is_file_bigendian(pevent) ? "big" : "little",
diff --git a/trace-usage.c b/trace-usage.c
index 520005b..39d2ecd 100644
--- a/trace-usage.c
+++ b/trace-usage.c
@@ -67,7 +67,8 @@ static struct usage_help usage_help[] = {
67 { 67 {
68 "report", 68 "report",
69 "read out the trace stored in a trace.dat file", 69 "read out the trace stored in a trace.dat file",
70 " %s report [-i file] [--cpu cpu] [-e][-f][-l][-P][-L][-N][-E][-F filter][-v][-V]\n" 70 " %s report [-i file] [--cpu cpu] [-e][-f][-l][-P][-L][-N][-r][-E]\\\n"
71 " [-F filter][-v][-V]\n"
71 " -i input file [default trace.dat]\n" 72 " -i input file [default trace.dat]\n"
72 " -e show file endianess\n" 73 " -e show file endianess\n"
73 " -f show function list\n" 74 " -f show function list\n"
@@ -76,6 +77,7 @@ static struct usage_help usage_help[] = {
76 " -N do not load any plugins\n" 77 " -N do not load any plugins\n"
77 " -E show event files stored\n" 78 " -E show event files stored\n"
78 " -F filter to filter output on\n" 79 " -F filter to filter output on\n"
80 " -r raw format: ignore print format and only show field data\n"
79 " -v will negate all -F after it (Not show matches)\n" 81 " -v will negate all -F after it (Not show matches)\n"
80 " -V verbose (shows plugins being loaded)\n" 82 " -V verbose (shows plugins being loaded)\n"
81 " -w show wakeup latencies\n" 83 " -w show wakeup latencies\n"