From 117bcbe45ff448c0913007d31cfa2be78caeb4ba Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 8 Apr 2009 13:14:24 -0500 Subject: Added '#ifdef STP_NEED_VMA_TRACKER' around code that needs it. 2009-04-08 David Smith * runtime/sym.c: Added '#ifdef STP_NEED_VMA_TRACKER' around code that needs it. --- runtime/sym.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/sym.c') diff --git a/runtime/sym.c b/runtime/sym.c index 835e1b46..7b918428 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -30,6 +30,7 @@ static void _stp_sym_init(void) } } +#ifdef STP_NEED_VMA_TRACKER /* Callback that needs to be registered (in tapsets.cxx for emit_module_init) for every user task path or pid for which we might need symbols or unwind info. */ @@ -76,6 +77,7 @@ static int _stp_tf_munmap_cb(struct stap_task_finder_target *tgt, stap_remove_vma_map_info(tsk->group_leader, addr, addr + length, 0); return 0; } +#endif /* XXX: this needs to be address-space-specific. */ static unsigned long _stp_module_relocate(const char *module, const char *section, unsigned long offset) @@ -128,7 +130,6 @@ static unsigned long _stp_module_relocate(const char *module, const char *sectio return 0; } - /* Return module owner and, if sec != NULL, fills in closest section of the address if found, return NULL otherwise. XXX: needs to be address-space-specific. */ -- cgit From 9b11ea1ccc742f6a594be6a9777e618bdcbfebed Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 8 Apr 2009 19:27:42 +0200 Subject: Fix DEBUG_TASK_FINDER_VMA compilation. * runtime/sym.c (_stp_tf_mmap_cb): We get passed vm_flags, not flags. --- runtime/sym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/sym.c') diff --git a/runtime/sym.c b/runtime/sym.c index 7b918428..8de01bc8 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -48,7 +48,7 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt, #ifdef DEBUG_TASK_FINDER_VMA _stp_dbug(__FUNCTION__, __LINE__, "mmap_cb: tsk %d:%d path %s, addr 0x%08lx, length 0x%08lx, offset 0x%lx, flags 0x%lx\n", - tsk->pid, tsk->tgid, path, addr, length, offset, flags); + tsk->pid, tsk->tgid, path, addr, length, offset, vm_flags); #endif if (path != NULL) { for (i = 0; i < _stp_num_modules; i++) { -- cgit From 8c39e6ee099a479b3f8e25bad1272085369970a9 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 8 Apr 2009 23:35:21 +0200 Subject: Make sure code using the vma tracker compiles again. * runtime/runtime.h: Include task_finder.c. * runtime/sym.c: Always define task_finder callbacks for usage in tapsets. * runtime/task_finder.c: Define dummy stap_task_finder_target when ! defined(CONFIG_UTRACE). * tapsets.cxx: Never include task_finder.c directly. --- runtime/sym.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'runtime/sym.c') diff --git a/runtime/sym.c b/runtime/sym.c index 8de01bc8..a2cdd0ff 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -30,7 +30,6 @@ static void _stp_sym_init(void) } } -#ifdef STP_NEED_VMA_TRACKER /* Callback that needs to be registered (in tapsets.cxx for emit_module_init) for every user task path or pid for which we might need symbols or unwind info. */ @@ -77,7 +76,6 @@ static int _stp_tf_munmap_cb(struct stap_task_finder_target *tgt, stap_remove_vma_map_info(tsk->group_leader, addr, addr + length, 0); return 0; } -#endif /* XXX: this needs to be address-space-specific. */ static unsigned long _stp_module_relocate(const char *module, const char *section, unsigned long offset) -- cgit