diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/ChangeLog | 7 | ||||
-rw-r--r-- | runtime/runtime.h | 17 | ||||
-rw-r--r-- | runtime/sym.c | 4 | ||||
-rw-r--r-- | runtime/task_finder_vma.c | 14 |
4 files changed, 25 insertions, 17 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index d83ac12c..b9a2a058 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,10 @@ +2008-12-15 Mark Wielaard <mjw@redhat.com> + + * runtime.h: Just include task_finder.c instead of defining parts + of it here. + * sym.c (_stp_mod_sec_lookup): Add dbug_sym statements. + * task_finder_vma.c: Define __stp_tf_vma_entry here. + 2008-12-10 Mark Wielaard <mjw@redhat.com> * runtime.h: Define __stp_tf_vma_entry here. 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 diff --git a/runtime/sym.c b/runtime/sym.c index 9b295f58..82eef17d 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -92,7 +92,9 @@ static struct _stp_module *_stp_mod_sec_lookup(unsigned long addr, if (entry != NULL && entry->module != NULL) { m = entry->module; - *sec = & m->sections[0]; // XXX check actual section and relocate + *sec = &m->sections[0]; // XXX check actual section and relocate + dbug_sym(1, "found section %s in module %s at 0x%lx\n", + m->sections[0].name, m->name, entry->vm_start); if (strcmp(".dynamic", m->sections[0].name) == 0) m->sections[0].addr = entry->vm_start; // cheat... return m; diff --git a/runtime/task_finder_vma.c b/runtime/task_finder_vma.c index b65d9ea4..87a32fe5 100644 --- a/runtime/task_finder_vma.c +++ b/runtime/task_finder_vma.c @@ -16,6 +16,20 @@ static DEFINE_MUTEX(__stp_tf_vma_mutex); #define TASK_FINDER_VMA_ENTRY_ITEMS 100 #endif +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_vma_free_list_items[TASK_FINDER_VMA_ENTRY_ITEMS]; |