+2008-12-15 Mark Wielaard <mjw@redhat.com>
+
+ * tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
+ Always enable emit_vm_callback_probe_decl, don't test for
+ STP_NEED_TASK_FINDER_VMA. Don't include task_finder.c.
+
2008-12-15 Mark Wielaard <mjw@redhat.com>
* translate.cxx (dump_unwindsyms): Work around buggy
+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.
#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
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;
#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];
s.op->newline();
s.op->newline() << "/* ---- utrace probes ---- */";
- s.op->newline() << "#include \"task_finder.c\"";
s.op->newline() << "enum utrace_derived_probe_flags {";
s.op->indent(1);
// Emit a "fake" probe decl that is really a hook for to get
// our vm_callback called.
string path = it->first;
- s.op->newline() << "#ifdef STP_NEED_TASK_FINDER_VMA";
emit_vm_callback_probe_decl (s, true, path, (int64_t)0,
"__stp_tf_vm_cb");
- s.op->newline() << "#endif";
for (unsigned i = 0; i < it->second.size(); i++)
{
{
// Emit a "fake" probe decl that is really a hook for to get
// our vm_callback called.
- s.op->newline() << "#ifdef STP_NEED_TASK_FINDER_VMA";
emit_vm_callback_probe_decl (s, false, "", it->first,
"__stp_tf_vm_cb");
- s.op->newline() << "#endif";
for (unsigned i = 0; i < it->second.size(); i++)
{
s.op->newline() << "#else";
s.op->newline() << "#include \"uprobes/uprobes.h\"";
s.op->newline() << "#endif";
- s.op->newline() << "#include \"task_finder.c\"";
s.op->newline() << "#ifndef MULTIPLE_UPROBES";
s.op->newline() << "#define MULTIPLE_UPROBES 256"; // maximum possible armed uprobes per process() probe point