Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ftrace: handle archs that do not support irqs_disabled_flags

+20 -10
+3
Documentation/ftrace.txt
··· 291 291 CPU#: The CPU which the process was running on. 292 292 293 293 irqs-off: 'd' interrupts are disabled. '.' otherwise. 294 + Note: If the architecture does not support a way to 295 + read the irq flags variable, an 'X' will always 296 + be printed here. 294 297 295 298 need-resched: 'N' task need_resched is set, '.' otherwise. 296 299
+6 -1
kernel/trace/trace.c
··· 656 656 entry->preempt_count = pc & 0xff; 657 657 entry->pid = (tsk) ? tsk->pid : 0; 658 658 entry->flags = 659 + #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT 659 660 (irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) | 661 + #else 662 + TRACE_FLAG_IRQS_NOSUPPORT | 663 + #endif 660 664 ((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) | 661 665 ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | 662 666 (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0); ··· 1248 1244 trace_seq_printf(s, "%8.8s-%-5d ", comm, entry->pid); 1249 1245 trace_seq_printf(s, "%3d", cpu); 1250 1246 trace_seq_printf(s, "%c%c", 1251 - (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : '.', 1247 + (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : 1248 + (entry->flags & TRACE_FLAG_IRQS_NOSUPPORT) ? 'X' : '.', 1252 1249 ((entry->flags & TRACE_FLAG_NEED_RESCHED) ? 'N' : '.')); 1253 1250 1254 1251 hardirq = entry->flags & TRACE_FLAG_HARDIRQ;
+11 -9
kernel/trace/trace.h
··· 120 120 /* 121 121 * trace_flag_type is an enumeration that holds different 122 122 * states when a trace occurs. These are: 123 - * IRQS_OFF - interrupts were disabled 124 - * NEED_RESCED - reschedule is requested 125 - * HARDIRQ - inside an interrupt handler 126 - * SOFTIRQ - inside a softirq handler 127 - * CONT - multiple entries hold the trace item 123 + * IRQS_OFF - interrupts were disabled 124 + * IRQS_NOSUPPORT - arch does not support irqs_disabled_flags 125 + * NEED_RESCED - reschedule is requested 126 + * HARDIRQ - inside an interrupt handler 127 + * SOFTIRQ - inside a softirq handler 128 + * CONT - multiple entries hold the trace item 128 129 */ 129 130 enum trace_flag_type { 130 131 TRACE_FLAG_IRQS_OFF = 0x01, 131 - TRACE_FLAG_NEED_RESCHED = 0x02, 132 - TRACE_FLAG_HARDIRQ = 0x04, 133 - TRACE_FLAG_SOFTIRQ = 0x08, 134 - TRACE_FLAG_CONT = 0x10, 132 + TRACE_FLAG_IRQS_NOSUPPORT = 0x02, 133 + TRACE_FLAG_NEED_RESCHED = 0x04, 134 + TRACE_FLAG_HARDIRQ = 0x08, 135 + TRACE_FLAG_SOFTIRQ = 0x10, 136 + TRACE_FLAG_CONT = 0x20, 135 137 }; 136 138 137 139 #define TRACE_BUF_SIZE 1024