浏览代码

tracing/function-graph-tracer: add a new .irqentry.text section

Impact: let the function-graph-tracer be aware of the irq entrypoints

Add a new .irqentry.text section to store the irq entrypoints functions
inside the same section. This way, the tracer will be able to signal
an interrupts triggering on output by recognizing these entrypoints.

Also, make this section recordable for dynamic tracing.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Frederic Weisbecker 16 年之前
父节点
当前提交
a0343e8231
共有 3 个文件被更改,包括 12 次插入0 次删除
  1. 1 0
      arch/x86/kernel/vmlinux_64.lds.S
  2. 10 0
      include/asm-generic/vmlinux.lds.h
  3. 1 0
      scripts/recordmcount.pl

+ 1 - 0
arch/x86/kernel/vmlinux_64.lds.S

@@ -35,6 +35,7 @@ SECTIONS
 	SCHED_TEXT
 	SCHED_TEXT
 	LOCK_TEXT
 	LOCK_TEXT
 	KPROBES_TEXT
 	KPROBES_TEXT
+	IRQENTRY_TEXT
 	*(.fixup)
 	*(.fixup)
 	*(.gnu.warning)
 	*(.gnu.warning)
 	_etext = .;		/* End of text section */
 	_etext = .;		/* End of text section */

+ 10 - 0
include/asm-generic/vmlinux.lds.h

@@ -288,6 +288,16 @@
 		*(.kprobes.text)					\
 		*(.kprobes.text)					\
 		VMLINUX_SYMBOL(__kprobes_text_end) = .;
 		VMLINUX_SYMBOL(__kprobes_text_end) = .;
 
 
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+#define IRQENTRY_TEXT							\
+		ALIGN_FUNCTION();					\
+		VMLINUX_SYMBOL(__irqentry_text_start) = .;		\
+		*(.irqentry.text)					\
+		VMLINUX_SYMBOL(__irqentry_text_end) = .;
+#else
+#define IRQENTRY_TEXT
+#endif
+
 /* Section used for early init (in .S files) */
 /* Section used for early init (in .S files) */
 #define HEAD_TEXT  *(.head.text)
 #define HEAD_TEXT  *(.head.text)
 
 

+ 1 - 0
scripts/recordmcount.pl

@@ -114,6 +114,7 @@ my %text_sections = (
      ".text" => 1,
      ".text" => 1,
      ".sched.text" => 1,
      ".sched.text" => 1,
      ".spinlock.text" => 1,
      ".spinlock.text" => 1,
+     ".irqentry.text" => 1,
 );
 );
 
 
 $objdump = "objdump" if ((length $objdump) == 0);
 $objdump = "objdump" if ((length $objdump) == 0);