Skip to contentSkip to conversation

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

PATCH New Frederic Weisbecker 1 participant 1 message Dec 9, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Impact: Let the function-graph-tracer 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.

---
 arch/x86/kernel/vmlinux_64.lds.S  |    1 +
 include/asm-generic/vmlinux.lds.h |   10 ++++++++++
 scripts/recordmcount.pl           |    1 +
 3 files changed, 12 insertions(+), 0 deletions(-)
arch/x86/kernel/vmlinux_64.lds.S +1 -0
index 46e0544..1a614c0 100644
@@ -35,6 +35,7 @@ SECTIONS
 	SCHED_TEXT
 	LOCK_TEXT
 	KPROBES_TEXT
+	IRQENTRY_TEXT
 	*(.fixup)
 	*(.gnu.warning)
 	_etext = .;		/* End of text section */
include/asm-generic/vmlinux.lds.h +10 -0
index 30536c3..acb72d8 100644
@@ -288,6 +288,16 @@
 		*(.kprobes.text)					\
 		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) */
 #define HEAD_TEXT  *(.head.text)
 
scripts/recordmcount.pl +1 -0
index 0b1dc9f..fe83141 100755
@@ -114,6 +114,7 @@ my %text_sections = (
      ".text" => 1,
      ".sched.text" => 1,
      ".spinlock.text" => 1,
+     ".irqentry.text" => 1,
 );
 
 $objdump = "objdump" if ((length $objdump) == 0);
Signature · 1 line
1.6.0.4