diff options
author | hunt <hunt> | 2006-09-18 16:44:19 +0000 |
---|---|---|
committer | hunt <hunt> | 2006-09-18 16:44:19 +0000 |
commit | ddcd4a1d43f7b3bc6edb5c431d4fd29bc72fa471 (patch) | |
tree | d67048aa0034d2a83100af4cbcfb5f0fe75acde0 /runtime/runtime.h | |
parent | e92bf44b99785ad743d8657038e7c7b8fd05c5ba (diff) | |
download | systemtap-steved-ddcd4a1d43f7b3bc6edb5c431d4fd29bc72fa471.tar.gz systemtap-steved-ddcd4a1d43f7b3bc6edb5c431d4fd29bc72fa471.tar.xz systemtap-steved-ddcd4a1d43f7b3bc6edb5c431d4fd29bc72fa471.zip |
2006-09-18 Martin Hunt <hunt@redhat.com>
* print.c (_stp_print_flush): Rewrite so one version works for
relayfs or procfs. Use proper per-cpu functions.
(_stp_reserve_bytes): New function. Reserve bytes in the output buffer.
(_stp_print_binary): New function. Write a variable number of
64-bit values directly into the output buffer.
* string.c (_stp_sprintf): Rewrite using new per-cpu buffers.
(_stp_vsprintf): Ditto.
(_stp_string_cat_cstr): Ditto.
(_stp_string_cat_char): Ditto.
* runtime.h: Set defaults for MAXTRYLOCK and TRYLOCKDELAY to make
runtime tests in bench2 happy.
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index 84c79f79..dec664d5 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -63,6 +63,14 @@ static struct #define _stp_seq_inc() (atomic_inc_return(&_stp_seq.seq)) #endif /* RELAYFS */ +/* TEST_MODE is always defined by systemtap */ +#ifdef TEST_MODE +#define SYSTEMTAP 1 +#else +#define MAXTRYLOCK 1000 +#define TRYLOCKDELAY 100 +#endif + #include "print.c" #include "string.c" #include "arith.c" @@ -81,10 +89,6 @@ static const char * (*_stp_kallsyms_lookup)(unsigned long addr, unsigned long *offset, char **modname, char *namebuf); -/* TEST_MODE is always defined by systemtap */ -#ifdef TEST_MODE -#define SYSTEMTAP 1 -#endif #ifdef SYSTEMTAP /* This implementation is used if stap_[num_]symbols are available. */ @@ -161,7 +165,7 @@ int init_module (void) _stp_kallsyms_lookup = (const char * (*)(unsigned long,unsigned long *,unsigned long *,char **,char *)) kallsyms_lookup_name("kallsyms_lookup"); #endif - + return _stp_transport_init(); } |