From 3df148cb571a6bd4b2b725b7e7e3b419a5dd73b5 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 12 Oct 2012 17:16:07 -0700 Subject: [PATCH] PR14172: Fix the include order so vma tracking works In commit 529c7eae, by moving the sym.c include, I broke the order between #define HAVE_TASK_FINDER and the #ifdef in vma.c. Reported-by: Yichun Zhang --- runtime/linux/runtime.h | 2 +- runtime/linux/task_finder.c | 1 + runtime/linux/task_finder2.c | 1 + runtime/task_finder_vma.c | 5 +++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h index 783f1992e..e167be6e4 100644 --- a/runtime/linux/runtime.h +++ b/runtime/linux/runtime.h @@ -163,13 +163,13 @@ void *kallsyms_task_work_cancel; #include "copy.c" #include "regs.c" #include "regs-ia64.c" -#include "sym.c" #if (defined(CONFIG_UTRACE) || defined(STAPCONF_UTRACE_VIA_TRACEPOINTS)) #define HAVE_TASK_FINDER #include "task_finder.c" #endif +#include "sym.c" #ifdef STP_PERFMON #include "perf.c" #endif diff --git a/runtime/linux/task_finder.c b/runtime/linux/task_finder.c index d718e80c6..e2e575a02 100644 --- a/runtime/linux/task_finder.c +++ b/runtime/linux/task_finder.c @@ -26,6 +26,7 @@ #include "syscall.h" #include "utrace_compatibility.h" #include "task_finder_map.c" +#include "task_finder_vma.c" static LIST_HEAD(__stp_task_finder_list); diff --git a/runtime/linux/task_finder2.c b/runtime/linux/task_finder2.c index 5cee195b3..27ba2d22a 100644 --- a/runtime/linux/task_finder2.c +++ b/runtime/linux/task_finder2.c @@ -11,6 +11,7 @@ #endif #include "syscall.h" #include "task_finder_map.c" +#include "task_finder_vma.c" static LIST_HEAD(__stp_task_finder_list); diff --git a/runtime/task_finder_vma.c b/runtime/task_finder_vma.c index 1c1bfbcee..fa212ac5a 100644 --- a/runtime/task_finder_vma.c +++ b/runtime/task_finder_vma.c @@ -1,3 +1,6 @@ +#ifndef TASK_FINDER_VMA_C +#define TASK_FINDER_VMA_C + #include #include #include @@ -389,3 +392,5 @@ stap_find_exe_file(struct mm_struct* mm) return mm->exe_file; #endif } + +#endif /* TASK_FINDER_VMA_C */ -- 2.43.5