Re: [PATCH v2] tracing/function-graph-tracer: prevent from hrtimerinterrupt infinite loop

From: Ingo Molnar
Date: Sun Dec 21 2008 - 05:01:17 EST



btw., a graph-tracer buglet i noticed:

3) | perf_counter_task_tick() {
3) | perf_counter_task_sched_out() {
3) | /* c:ffff88049b184000, u:0: 0000000020ca1ab0 + 0000000000000000 = 0000000020ca1ab0
*/
3) | /* sched-out counter ffff88049b184000, state: 0
*/
3) 5.024 us | }
3) | perf_counter_task_sched_in() {
3) | /* c:ffff88049b184000, u:0: 0000000020ca1ab0 + 0000000000000000 = 0000000020ca1ab0
*/
3) | /* sched-in counter ffff88049b184000, state: 1
*/
3) 2.605 us | }
3) 9.714 us | }
3) | perf_counter_task_tick() {

the bug is that the '*/' comment closing text is printed in the next line
- that's not a linewrap, it happened like this in the trace.

The reason is that the ftrace_printk did:

ftrace_printk("c:%p, u:%d: %016Lx + %016Lx = %016Lx\n",

the closing \n is pretty natural - especially for kernel hackers who might
just turn printk()s into ftrace_printk(), to embedd printouts in function
traces. So it would be nice if ftrace skipped over \n's when printing them
out as embedded C comments.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/