diff options
author | ddomingo <ddomingo@redhat.com> | 2009-01-28 06:51:47 +1000 |
---|---|---|
committer | ddomingo <ddomingo@redhat.com> | 2009-01-28 06:51:47 +1000 |
commit | c5b5540d1f3104971aefcf1d0f588ffb45d6df7b (patch) | |
tree | e9da67ba0dd6e401ba53f4403e317dcccab57142 | |
parent | ab1739808d027db986ff72f67743442bc7c884f2 (diff) | |
parent | ef91bdb61d3810da78a1730fc377f38a129998d6 (diff) | |
download | systemtap-steved-c5b5540d1f3104971aefcf1d0f588ffb45d6df7b.tar.gz systemtap-steved-c5b5540d1f3104971aefcf1d0f588ffb45d6df7b.tar.xz systemtap-steved-c5b5540d1f3104971aefcf1d0f588ffb45d6df7b.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | dtrace | 14 | ||||
-rw-r--r-- | runtime/ChangeLog | 8 | ||||
-rw-r--r-- | runtime/sdt.h | 18 |
4 files changed, 28 insertions, 16 deletions
@@ -1,3 +1,7 @@ +2009-01-26 Mark Wielaard <mjw@redhat.com> + + * dtrace: Handle (absense of) -o argument correctly. + 2009-01-26 Stan Cox <scox@redhat.com> * tapsets.cxx (find_variable_and_frame_base): Allow for disjoint @@ -21,7 +21,7 @@ class provider: have_provider = False self.f = open(provider) self.h = open(header,mode='w') - self.h.write("// Generated by /usr/bin/dtrace\n") + self.h.write("// Generated by the Systemtap dtrace wrapper\n") self.h.write("\n#include <sys/sdt.h>\n\n") in_comment = False while (True): @@ -124,21 +124,21 @@ if (build_header == False and build_source == False): if (filename == ""): if (s_filename != ""): filename = s_filename.replace(".d","") + if (build_header): + filename = filename + ".h" + elif (build_source): + filename = filename + ".o" else: usage sys.exit(1) if (build_header): providers = provider() - providers.open(s_filename, filename + ".h") + providers.open(s_filename, filename) elif (build_source): fn = "/tmp/" + os.path.basename(s_filename).replace(".d", ".c") f = open(fn,mode='w') f.write("static __dtrace () {}\n") f.close() - call("gcc -fPIC -c " + fn + " -o " + filename + ".o", shell=True) - f.close() + call("gcc -fPIC -c " + fn + " -o " + filename, shell=True) os.remove(fn) - - - diff --git a/runtime/ChangeLog b/runtime/ChangeLog index d005d3c1..0420183d 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,11 @@ +2009-01-27 Mark Wielaard <mjw@redhat.com> + + * sdt.h (STAP_PROBE): Use "g", not "r", for asm args. + +2008-01-27 Stan Cox <scox@redhat.com> + + * sdt.h (struct _probe_): Make probe_name a STAP_PROBE_STRUCT_ARG. + 2009-01-26 Mark Wielaard <mjw@redhat.com> * sdt.h: DTRACE_PROBE5 is STAP_PROBE5, not 4, likewise for 6. diff --git a/runtime/sdt.h b/runtime/sdt.h index 88183461..b36c6973 100644 --- a/runtime/sdt.h +++ b/runtime/sdt.h @@ -22,13 +22,13 @@ struct _probe_ ## probe \ { \ int probe_type; \ - char *probe_name; \ + STAP_PROBE_STRUCT_ARG (probe_name); \ STAP_PROBE_STRUCT_ARG (probe_arg); \ }; \ -static char probe_name [strlen(#probe)+1] \ +static char probe ## _ ## probe_name [strlen(#probe)+1] \ __attribute__ ((section (".probes"))) \ = #probe; \ -static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {STAP_SENTINEL,&probe_name[0],argc}; + static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {STAP_SENTINEL,(long)& probe ## _ ## probe_name[0],argc}; #define STAP_CONCAT(a,b) a ## b #define STAP_LABEL(p,n) \ @@ -56,7 +56,7 @@ STAP_LABEL(probe,__LINE__): \ #define STAP_PROBE1(provider,probe,parm1) \ {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1)); \ + asm volatile ("nop" :: "g"(arg1)); \ STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ goto STAP_LABEL(probe,__LINE__);} @@ -71,7 +71,7 @@ STAP_LABEL(probe,__LINE__): \ {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2)); \ + asm volatile ("nop" :: "g"(arg1), "g"(arg2)); \ STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ goto STAP_LABEL(probe,__LINE__);} @@ -87,7 +87,7 @@ STAP_LABEL(probe,__LINE__): \ volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2), "r"(arg3)); \ + asm volatile ("nop" :: "g"(arg1), "g"(arg2), "g"(arg3)); \ STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ goto STAP_LABEL(probe,__LINE__);} @@ -104,7 +104,7 @@ STAP_LABEL(probe,__LINE__): \ volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4)); \ + asm volatile ("nop" :: "g"(arg1), "g"(arg2), "g"(arg3), "g"(arg4)); \ STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ goto STAP_LABEL(probe,__LINE__);} @@ -122,7 +122,7 @@ STAP_LABEL(probe,__LINE__): \ volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ volatile typeof((parm5)) arg5 __attribute__ ((unused)) = parm5; \ STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5)); \ + asm volatile ("nop" :: "g"(arg1), "g"(arg2), "g"(arg3), "g"(arg4), "g"(arg5)); \ STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ goto STAP_LABEL(probe,__LINE__);} @@ -141,7 +141,7 @@ STAP_LABEL(probe,__LINE__): \ volatile typeof((parm5)) arg5 __attribute__ ((unused)) = parm5; \ volatile typeof((parm6)) arg6 __attribute__ ((unused)) = parm6; \ STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5), "r"(arg6)); \ + asm volatile ("nop" :: "g"(arg1), "g"(arg2), "g"(arg3), "g"(arg4), "g"(arg5), "g"(arg6)); \ STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ goto STAP_LABEL(probe,__LINE__);} |