From d2f4d7286629da6e9f1b844beefb141a4d3ef2c3 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 10 Dec 2008 20:39:45 +0100 Subject: PR6866: First pass at translating addresses to symbol names through vma. --- runtime/runtime.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 3b3e117d..055d3f27 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -86,6 +86,24 @@ static struct #include "io.c" #include "arith.c" #include "copy.c" + +/* Lifted task_finder, internal details used in sym.c - XXX */ +struct __stp_tf_vma_entry { + struct hlist_node hlist; + + pid_t pid; + unsigned long addr; + unsigned long vm_start; + unsigned long vm_end; + unsigned long vm_pgoff; + // Is that enough? Should we store a dcookie for vm_file? + + // Module that this vma entry is mapped from, if any. + struct _stp_module *module; +}; +static struct __stp_tf_vma_entry * +__stp_tf_get_vma_entry_addr(struct task_struct *, unsigned long); + #include "sym.c" #ifdef STP_PERFMON #include "perf.c" -- cgit From 204038b16193de78eeb333fde0cce6081d9d1fcd Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 15 Dec 2008 17:51:49 +0100 Subject: Always include task_finder.c and enable emit_vm_callback_probe_decl. --- runtime/runtime.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 055d3f27..3ca43dc4 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -87,22 +87,7 @@ static struct #include "arith.c" #include "copy.c" -/* Lifted task_finder, internal details used in sym.c - XXX */ -struct __stp_tf_vma_entry { - struct hlist_node hlist; - - pid_t pid; - unsigned long addr; - unsigned long vm_start; - unsigned long vm_end; - unsigned long vm_pgoff; - // Is that enough? Should we store a dcookie for vm_file? - - // Module that this vma entry is mapped from, if any. - struct _stp_module *module; -}; -static struct __stp_tf_vma_entry * -__stp_tf_get_vma_entry_addr(struct task_struct *, unsigned long); +#include "task_finder.c" #include "sym.c" #ifdef STP_PERFMON -- cgit From 093421c6ba933754aa52cf6399aae5b8f86d86d9 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Thu, 2 Apr 2009 17:41:20 -0400 Subject: Reorder includes so regs.c and regs-ia64.c included before task_finder.c. --- runtime/runtime.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 822562a2..0a656b78 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -86,6 +86,8 @@ static struct #include "io.c" #include "arith.c" #include "copy.c" +#include "regs.c" +#include "regs-ia64.c" #include "task_finder.c" -- cgit From 55c0f2bfefb04915622dd3688bba59da1addaec8 Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 8 Apr 2009 12:41:55 -0500 Subject: Only includes task_finder.c when needed. 2009-04-08 David Smith * tapsets.cxx (itrace_derived_probe_group::emit_module_decls): Added inclusion of task_finder.c back. Unconditionally including it when not needed causes all systemtap scripts to fail on kernels with no utrace support. (utrace_derived_probe_group::emit_module_decls): Ditto. (uprobe_derived_probe_group::emit_module_decls): Ditto. * runtime/runtime.h: Removed unconditional inclusion of task_finder.c. --- runtime/runtime.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 0a656b78..70fe4dce 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -89,8 +89,6 @@ static struct #include "regs.c" #include "regs-ia64.c" -#include "task_finder.c" - #include "sym.c" #ifdef STP_PERFMON #include "perf.c" -- 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/runtime.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 70fe4dce..0a656b78 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -89,6 +89,8 @@ static struct #include "regs.c" #include "regs-ia64.c" +#include "task_finder.c" + #include "sym.c" #ifdef STP_PERFMON #include "perf.c" -- cgit From a6f6008cf0034b8580f67851f742dd0ada0d683c Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 11 Apr 2009 13:08:06 +0200 Subject: Prefer dwarf unwinder on i386 and x86_64. * runtime/runtime.h: Move up and enable check for STP_USE_DWARF_UNWINDER. --- runtime/runtime.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 0a656b78..f333756e 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -66,6 +66,11 @@ static struct #define MAXTRACE 20 #endif +/* dwarf unwinder only tested so far on i386 and x86_64. */ +#if (defined(__i386__) || defined(__x86_64__)) +#define STP_USE_DWARF_UNWINDER +#endif + #ifdef CONFIG_FRAME_POINTER /* Just because frame pointers are available does not mean we can trust them. */ #ifndef STP_USE_DWARF_UNWINDER @@ -73,13 +78,6 @@ static struct #endif #endif -/* dwarf unwinder only tested so far on i386 and x86_64, - but globally disabled for now */ -#if 0 -// !defined(STP_USE_FRAME_BUFFER) && (defined(__i386__) || defined(__x86_64__)) -#define STP_USE_DWARF_UNWINDER -#endif - #include "alloc.c" #include "print.c" #include "string.c" -- cgit From f38b2e7385b3395dc589af5bde137971adf84f27 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 12 Apr 2009 23:46:48 +0200 Subject: Don't redefine STP_USE_DWARF_UNWINDER. * runtime/runtime.h: STP_USE_DWARF_UNWINDER don't redefine. --- runtime/runtime.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index f333756e..c2e927cc 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -68,8 +68,10 @@ static struct /* dwarf unwinder only tested so far on i386 and x86_64. */ #if (defined(__i386__) || defined(__x86_64__)) +#ifndef STP_USE_DWARF_UNWINDER #define STP_USE_DWARF_UNWINDER #endif +#endif #ifdef CONFIG_FRAME_POINTER /* Just because frame pointers are available does not mean we can trust them. */ -- cgit