summaryrefslogtreecommitdiffstats
path: root/runtime/sym.h
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-07-04 16:59:48 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-07-04 16:59:48 -0400
commit1b94bf6d310cf41041d0a6c24be85a892d443708 (patch)
tree458edfc3cee3e295e70ae3a61e358a87237dd01c /runtime/sym.h
parent3c02e16c39aa0fd5b291faf610d9d71023392a2e (diff)
downloadsystemtap-steved-1b94bf6d310cf41041d0a6c24be85a892d443708.tar.gz
systemtap-steved-1b94bf6d310cf41041d0a6c24be85a892d443708.tar.xz
systemtap-steved-1b94bf6d310cf41041d0a6c24be85a892d443708.zip
emit all symbol tables at compile time; don't do any module munging; new unwinder still disabled
Diffstat (limited to 'runtime/sym.h')
-rw-r--r--runtime/sym.h55
1 files changed, 12 insertions, 43 deletions
diff --git a/runtime/sym.h b/runtime/sym.h
index 0bb64c13..c7caacae 100644
--- a/runtime/sym.h
+++ b/runtime/sym.h
@@ -17,12 +17,6 @@ struct _stp_symbol {
const char *symbol;
};
-DEFINE_RWLOCK(_stp_module_lock);
-#define STP_RLOCK_MODULES read_lock_irqsave(&_stp_module_lock, flags)
-#define STP_WLOCK_MODULES write_lock_irqsave(&_stp_module_lock, flags)
-#define STP_RUNLOCK_MODULES read_unlock_irqrestore(&_stp_module_lock, flags)
-#define STP_WUNLOCK_MODULES write_unlock_irqrestore(&_stp_module_lock, flags)
-
struct _stp_module {
/* the module name, or "" for kernel */
char name[STP_MODULE_NAME_LEN];
@@ -31,59 +25,34 @@ struct _stp_module {
/* trust this because as of 2.6.19, there are not yet */
/* any notifier hooks that will tell us when a module */
/* is unloading. */
- unsigned long module;
-
- /* the start of the module's text and data sections */
- unsigned long text;
- unsigned long data;
-
- uint32_t text_size;
-
- /* how many symbols this module has that we are interested in */
- uint32_t num_symbols;
-
- /* how many sections this module has */
- uint32_t num_sections;
-
- /* how the data below was allocated */
- /* 0 = kmalloc, 1 = vmalloc */
- struct {
- unsigned symbols :1;
- unsigned symbol_data :1;
- unsigned unwind_data :1;
- unsigned unwind_hdr :1;
- } allocated;
+ unsigned long module; /* XXX: why not struct module * ? */
struct _stp_symbol *sections;
-
- /* an array of num_symbols _stp_symbol structs */
- struct _stp_symbol *symbols; /* ordered by address */
-
- /* where we stash our copy of the strtab */
- void *symbol_data;
-
+ unsigned num_sections;
+ struct _stp_symbol *symbols; /* ordered by address */
+ unsigned num_symbols;
+
/* the stack unwind data for this module */
void *unwind_data;
void *unwind_hdr;
uint32_t unwind_data_len;
uint32_t unwind_hdr_len;
uint32_t unwind_is_ehframe; /* unwind data comes from .eh_frame */
- rwlock_t lock; /* lock while unwinding is happening */
-
};
-#ifndef STP_MAX_MODULES
-#define STP_MAX_MODULES 256
-#endif
-/* the alphabetical array of modules */
-struct _stp_module *_stp_modules[STP_MAX_MODULES];
+/* Defined by translator-generated stap-symbols.h. */
+struct _stp_module *_stp_modules [];
+int _stp_num_modules;
+
+#if 0
/* the array of modules ordered by addresses */
struct _stp_module *_stp_modules_by_addr[STP_MAX_MODULES];
+#endif
/* the number of modules in the arrays */
-int _stp_num_modules = 0;
+
static unsigned long _stp_kretprobe_trampoline = 0;
unsigned long _stp_module_relocate (const char *module, const char *section, unsigned long offset);