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
186186 return TRACE_TYPE_UNHANDLED;
187187 }
188188
189+static void power_print_header(struct seq_file *s)
190+{
191+ seq_puts(s, "# TIMESTAMP STATE EVENT\n");
192+ seq_puts(s, "# | | |\n");
193+}
194+
189195 static struct tracer power_tracer __read_mostly =
190196 {
191197 .name = "power",
@@ -194,6 +200,7 @@ static struct tracer power_tracer __read_mostly = · 2 unmodified lines
194200 .stop = stop_power_trace,
195201 .reset = power_trace_reset,
196202 .print_line = power_print_line,
203+ .print_header = power_print_header,
197204 };
198205
199206 static int init_power_trace(void)