diff options
author | Stan Cox <scox@redhat.com> | 2009-02-18 18:00:42 -0500 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2009-02-18 18:00:42 -0500 |
commit | 59b2ec52534f90cf22a741cfb482b36f9dcb6a78 (patch) | |
tree | f0329c6e254038b5cd0a967dd662c477a9c30772 /includes/sys/sdt.h | |
parent | 37d42f2a8792be9c25a71b2ad6b4c55252a1b204 (diff) | |
download | systemtap-steved-59b2ec52534f90cf22a741cfb482b36f9dcb6a78.tar.gz systemtap-steved-59b2ec52534f90cf22a741cfb482b36f9dcb6a78.tar.xz systemtap-steved-59b2ec52534f90cf22a741cfb482b36f9dcb6a78.zip |
Always emit .probes section; use .label method as a backup strategy
Diffstat (limited to 'includes/sys/sdt.h')
-rw-r--r-- | includes/sys/sdt.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h index 2eb47990..d68fed6c 100644 --- a/includes/sys/sdt.h +++ b/includes/sys/sdt.h @@ -6,6 +6,9 @@ // Public License (GPL); either version 2, or (at your option) any // later version. +#ifndef _SYS_SDT_H +#define _SYS_SDT_H 1 + #include <string.h> #if _LP64 @@ -18,8 +21,6 @@ #define STAP_SENTINEL 0x31425250 -// g++ 4.3.2 doesn't emit DW_TAG_label -#ifdef __cplusplus #define STAP_PROBE_STRUCT(probe,argc) \ struct _probe_ ## probe \ { \ @@ -31,20 +32,10 @@ static char probe ## _ ## probe_name [strlen(#probe)+1] \ __attribute__ ((section (".probes"))) \ = #probe; \ static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {STAP_SENTINEL,(size_t)& probe ## _ ## probe_name[0],argc}; -#else -#define STAP_PROBE_STRUCT(probe,argc) -#endif -#ifdef __cplusplus #define STAP_LABEL_REF(probe) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ goto STAP_LABEL(probe,__LINE__); -#else -#define STAP_LABEL_REF(probe) \ - volatile static int sentinel_ ## probe = 0; \ - if (__builtin_expect(sentinel_ ## probe < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__); -#endif #define STAP_CONCAT(a,b) a ## b #define STAP_LABEL(p,n) \ @@ -178,3 +169,5 @@ STAP_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) STAP_PROBE8(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) #define DTRACE_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) \ STAP_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) + +#endif /* sys/sdt.h */ |