]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tracing: Change tracer's integer flags to bool
authorHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Tue, 2 Oct 2012 08:27:10 +0000 (17:27 +0900)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 31 Oct 2012 20:45:25 +0000 (16:45 -0400)
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>
kernel/trace/trace.h
kernel/trace/trace_irqsoff.c
kernel/trace/trace_sched_wakeup.c

index c15f528c1af4e4ee44b308bddf1bb4b83195d4c2..c56a233c006e107edc69ecf8418441b80a054401 100644 (file)
@@ -285,8 +285,8 @@ struct tracer {
        int                     (*set_flag)(u32 old_flags, u32 bit, int set);
        struct tracer           *next;
        struct tracer_flags     *flags;
-       int                     print_max;
-       int                     use_max_tr;
+       bool                    print_max;
+       bool                    use_max_tr;
 };
 
 
index 11edebda454842e33bc87f1b3072f0a06cdf9c15..5ffce7b0f33c71d5fae15d8ead377aded9d0fd88 100644 (file)
@@ -604,7 +604,7 @@ static struct tracer irqsoff_tracer __read_mostly =
        .reset          = irqsoff_tracer_reset,
        .start          = irqsoff_tracer_start,
        .stop           = irqsoff_tracer_stop,
-       .print_max      = 1,
+       .print_max      = true,
        .print_header   = irqsoff_print_header,
        .print_line     = irqsoff_print_line,
        .flags          = &tracer_flags,
@@ -614,7 +614,7 @@ static struct tracer irqsoff_tracer __read_mostly =
 #endif
        .open           = irqsoff_trace_open,
        .close          = irqsoff_trace_close,
-       .use_max_tr     = 1,
+       .use_max_tr     = true,
 };
 # define register_irqsoff(trace) register_tracer(&trace)
 #else
@@ -637,7 +637,7 @@ static struct tracer preemptoff_tracer __read_mostly =
        .reset          = irqsoff_tracer_reset,
        .start          = irqsoff_tracer_start,
        .stop           = irqsoff_tracer_stop,
-       .print_max      = 1,
+       .print_max      = true,
        .print_header   = irqsoff_print_header,
        .print_line     = irqsoff_print_line,
        .flags          = &tracer_flags,
@@ -647,7 +647,7 @@ static struct tracer preemptoff_tracer __read_mostly =
 #endif
        .open           = irqsoff_trace_open,
        .close          = irqsoff_trace_close,
-       .use_max_tr     = 1,
+       .use_max_tr     = true,
 };
 # define register_preemptoff(trace) register_tracer(&trace)
 #else
@@ -672,7 +672,7 @@ static struct tracer preemptirqsoff_tracer __read_mostly =
        .reset          = irqsoff_tracer_reset,
        .start          = irqsoff_tracer_start,
        .stop           = irqsoff_tracer_stop,
-       .print_max      = 1,
+       .print_max      = true,
        .print_header   = irqsoff_print_header,
        .print_line     = irqsoff_print_line,
        .flags          = &tracer_flags,
@@ -682,7 +682,7 @@ static struct tracer preemptirqsoff_tracer __read_mostly =
 #endif
        .open           = irqsoff_trace_open,
        .close          = irqsoff_trace_close,
-       .use_max_tr     = 1,
+       .use_max_tr     = true,
 };
 
 # define register_preemptirqsoff(trace) register_tracer(&trace)
index 2f6af7833694c0fe31195a5d8f8e5c82a71a138b..bc64fc1375542415bb258f635226b76e056f1909 100644 (file)
@@ -589,7 +589,7 @@ static struct tracer wakeup_tracer __read_mostly =
        .reset          = wakeup_tracer_reset,
        .start          = wakeup_tracer_start,
        .stop           = wakeup_tracer_stop,
-       .print_max      = 1,
+       .print_max      = true,
        .print_header   = wakeup_print_header,
        .print_line     = wakeup_print_line,
        .flags          = &tracer_flags,
@@ -599,7 +599,7 @@ static struct tracer wakeup_tracer __read_mostly =
 #endif
        .open           = wakeup_trace_open,
        .close          = wakeup_trace_close,
-       .use_max_tr     = 1,
+       .use_max_tr     = true,
 };
 
 static struct tracer wakeup_rt_tracer __read_mostly =
@@ -610,7 +610,7 @@ static struct tracer wakeup_rt_tracer __read_mostly =
        .start          = wakeup_tracer_start,
        .stop           = wakeup_tracer_stop,
        .wait_pipe      = poll_wait_pipe,
-       .print_max      = 1,
+       .print_max      = true,
        .print_header   = wakeup_print_header,
        .print_line     = wakeup_print_line,
        .flags          = &tracer_flags,
@@ -620,7 +620,7 @@ static struct tracer wakeup_rt_tracer __read_mostly =
 #endif
        .open           = wakeup_trace_open,
        .close          = wakeup_trace_close,
-       .use_max_tr     = 1,
+       .use_max_tr     = true,
 };
 
 __init static int init_wakeup_tracer(void)