History

tracing: Fix power tracer header

Before patch: # tracer: power # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | [ 676.875865889] CSTATE: Going to C1 on cpu 0 for 0.005911463 [ 676.882938805] CSTATE: Going to C1 on cpu 0 for 0.104796532 ... After patch: # tracer: power # # TIMESTAMP STATE EVENT # | | | [ 676.875865889] CSTATE: Going to C1 on cpu 0 for 0.005911463 [ 676.882938805] CSTATE: Going to C1 on cpu 0 for 0.104796532 ... v2: Use seq_puts instead of seq_printf

Zhaolei committed 17 years ago

Commit a3d03ec1 parent 80a04d31 file · +7 −0Browse files

Showing the changes to kernel/trace (1 of 1 file). Show all

Unified · Split

kernel/trace/trace_power.c+7−0
@@ -186,6 +186,12 @@ static enum print_line_t power_print_line(struct trace_iterator *iter) · 185 unmodified lines
186 return TRACE_TYPE_UNHANDLED;186 return TRACE_TYPE_UNHANDLED;
187}187}
188 188
189static void power_print_header(struct seq_file *s)
190{
191 seq_puts(s, "# TIMESTAMP STATE EVENT\n");
192 seq_puts(s, "# | | |\n");
193}
194
189static struct tracer power_tracer __read_mostly =195static struct tracer power_tracer __read_mostly =
190{196{
191 .name = "power",197 .name = "power",
@@ -194,6 +200,7 @@ static struct tracer power_tracer __read_mostly = · 2 unmodified lines
194 .stop = stop_power_trace,200 .stop = stop_power_trace,
195 .reset = power_trace_reset,201 .reset = power_trace_reset,
196 .print_line = power_print_line,202 .print_line = power_print_line,
203 .print_header = power_print_header,
197};204};
198 205
199static int init_power_trace(void)206static int init_power_trace(void)