diff options
author | Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> | 2012-10-02 04:27:10 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-10-31 16:45:25 -0400 |
commit | f43c738bfa8608424610e4fc1aef4d4644e2ce11 (patch) | |
tree | a27c9971bc2eeeb012dc349762066a4c61cf10c9 /kernel/trace | |
parent | 6f4156723c084bfc0c0f72205c541fafb8ad3ded (diff) |
tracing: Change tracer's integer flags to bool
print_max and use_max_tr in struct tracer are "int" variables and
used like flags. This is wasteful, so change the type to "bool".
Link: http://lkml.kernel.org/r/20121002082710.9807.86393.stgit@falsita
Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.h | 4 | ||||
-rw-r--r-- | kernel/trace/trace_irqsoff.c | 12 | ||||
-rw-r--r-- | kernel/trace/trace_sched_wakeup.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index c15f528c1af4..c56a233c006e 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -285,8 +285,8 @@ struct tracer { | |||
285 | int (*set_flag)(u32 old_flags, u32 bit, int set); | 285 | int (*set_flag)(u32 old_flags, u32 bit, int set); |
286 | struct tracer *next; | 286 | struct tracer *next; |
287 | struct tracer_flags *flags; | 287 | struct tracer_flags *flags; |
288 | int print_max; | 288 | bool print_max; |
289 | int use_max_tr; | 289 | bool use_max_tr; |
290 | }; | 290 | }; |
291 | 291 | ||
292 | 292 | ||
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index 11edebda4548..5ffce7b0f33c 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c | |||
@@ -604,7 +604,7 @@ static struct tracer irqsoff_tracer __read_mostly = | |||
604 | .reset = irqsoff_tracer_reset, | 604 | .reset = irqsoff_tracer_reset, |
605 | .start = irqsoff_tracer_start, | 605 | .start = irqsoff_tracer_start, |
606 | .stop = irqsoff_tracer_stop, | 606 | .stop = irqsoff_tracer_stop, |
607 | .print_max = 1, | 607 | .print_max = true, |
608 | .print_header = irqsoff_print_header, | 608 | .print_header = irqsoff_print_header, |
609 | .print_line = irqsoff_print_line, | 609 | .print_line = irqsoff_print_line, |
610 | .flags = &tracer_flags, | 610 | .flags = &tracer_flags, |
@@ -614,7 +614,7 @@ static struct tracer irqsoff_tracer __read_mostly = | |||
614 | #endif | 614 | #endif |
615 | .open = irqsoff_trace_open, | 615 | .open = irqsoff_trace_open, |
616 | .close = irqsoff_trace_close, | 616 | .close = irqsoff_trace_close, |
617 | .use_max_tr = 1, | 617 | .use_max_tr = true, |
618 | }; | 618 | }; |
619 | # define register_irqsoff(trace) register_tracer(&trace) | 619 | # define register_irqsoff(trace) register_tracer(&trace) |
620 | #else | 620 | #else |
@@ -637,7 +637,7 @@ static struct tracer preemptoff_tracer __read_mostly = | |||
637 | .reset = irqsoff_tracer_reset, | 637 | .reset = irqsoff_tracer_reset, |
638 | .start = irqsoff_tracer_start, | 638 | .start = irqsoff_tracer_start, |
639 | .stop = irqsoff_tracer_stop, | 639 | .stop = irqsoff_tracer_stop, |
640 | .print_max = 1, | 640 | .print_max = true, |
641 | .print_header = irqsoff_print_header, | 641 | .print_header = irqsoff_print_header, |
642 | .print_line = irqsoff_print_line, | 642 | .print_line = irqsoff_print_line, |
643 | .flags = &tracer_flags, | 643 | .flags = &tracer_flags, |
@@ -647,7 +647,7 @@ static struct tracer preemptoff_tracer __read_mostly = | |||
647 | #endif | 647 | #endif |
648 | .open = irqsoff_trace_open, | 648 | .open = irqsoff_trace_open, |
649 | .close = irqsoff_trace_close, | 649 | .close = irqsoff_trace_close, |
650 | .use_max_tr = 1, | 650 | .use_max_tr = true, |
651 | }; | 651 | }; |
652 | # define register_preemptoff(trace) register_tracer(&trace) | 652 | # define register_preemptoff(trace) register_tracer(&trace) |
653 | #else | 653 | #else |
@@ -672,7 +672,7 @@ static struct tracer preemptirqsoff_tracer __read_mostly = | |||
672 | .reset = irqsoff_tracer_reset, | 672 | .reset = irqsoff_tracer_reset, |
673 | .start = irqsoff_tracer_start, | 673 | .start = irqsoff_tracer_start, |
674 | .stop = irqsoff_tracer_stop, | 674 | .stop = irqsoff_tracer_stop, |
675 | .print_max = 1, | 675 | .print_max = true, |
676 | .print_header = irqsoff_print_header, | 676 | .print_header = irqsoff_print_header, |
677 | .print_line = irqsoff_print_line, | 677 | .print_line = irqsoff_print_line, |
678 | .flags = &tracer_flags, | 678 | .flags = &tracer_flags, |
@@ -682,7 +682,7 @@ static struct tracer preemptirqsoff_tracer __read_mostly = | |||
682 | #endif | 682 | #endif |
683 | .open = irqsoff_trace_open, | 683 | .open = irqsoff_trace_open, |
684 | .close = irqsoff_trace_close, | 684 | .close = irqsoff_trace_close, |
685 | .use_max_tr = 1, | 685 | .use_max_tr = true, |
686 | }; | 686 | }; |
687 | 687 | ||
688 | # define register_preemptirqsoff(trace) register_tracer(&trace) | 688 | # define register_preemptirqsoff(trace) register_tracer(&trace) |
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c index 2f6af7833694..bc64fc137554 100644 --- a/kernel/trace/trace_sched_wakeup.c +++ b/kernel/trace/trace_sched_wakeup.c | |||
@@ -589,7 +589,7 @@ static struct tracer wakeup_tracer __read_mostly = | |||
589 | .reset = wakeup_tracer_reset, | 589 | .reset = wakeup_tracer_reset, |
590 | .start = wakeup_tracer_start, | 590 | .start = wakeup_tracer_start, |
591 | .stop = wakeup_tracer_stop, | 591 | .stop = wakeup_tracer_stop, |
592 | .print_max = 1, | 592 | .print_max = true, |
593 | .print_header = wakeup_print_header, | 593 | .print_header = wakeup_print_header, |
594 | .print_line = wakeup_print_line, | 594 | .print_line = wakeup_print_line, |
595 | .flags = &tracer_flags, | 595 | .flags = &tracer_flags, |
@@ -599,7 +599,7 @@ static struct tracer wakeup_tracer __read_mostly = | |||
599 | #endif | 599 | #endif |
600 | .open = wakeup_trace_open, | 600 | .open = wakeup_trace_open, |
601 | .close = wakeup_trace_close, | 601 | .close = wakeup_trace_close, |
602 | .use_max_tr = 1, | 602 | .use_max_tr = true, |
603 | }; | 603 | }; |
604 | 604 | ||
605 | static struct tracer wakeup_rt_tracer __read_mostly = | 605 | static struct tracer wakeup_rt_tracer __read_mostly = |
@@ -610,7 +610,7 @@ static struct tracer wakeup_rt_tracer __read_mostly = | |||
610 | .start = wakeup_tracer_start, | 610 | .start = wakeup_tracer_start, |
611 | .stop = wakeup_tracer_stop, | 611 | .stop = wakeup_tracer_stop, |
612 | .wait_pipe = poll_wait_pipe, | 612 | .wait_pipe = poll_wait_pipe, |
613 | .print_max = 1, | 613 | .print_max = true, |
614 | .print_header = wakeup_print_header, | 614 | .print_header = wakeup_print_header, |
615 | .print_line = wakeup_print_line, | 615 | .print_line = wakeup_print_line, |
616 | .flags = &tracer_flags, | 616 | .flags = &tracer_flags, |
@@ -620,7 +620,7 @@ static struct tracer wakeup_rt_tracer __read_mostly = | |||
620 | #endif | 620 | #endif |
621 | .open = wakeup_trace_open, | 621 | .open = wakeup_trace_open, |
622 | .close = wakeup_trace_close, | 622 | .close = wakeup_trace_close, |
623 | .use_max_tr = 1, | 623 | .use_max_tr = true, |
624 | }; | 624 | }; |
625 | 625 | ||
626 | __init static int init_wakeup_tracer(void) | 626 | __init static int init_wakeup_tracer(void) |