diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | Makefile.in | 63 | ||||
-rw-r--r-- | runtime/sduprobes.h | 133 | ||||
-rw-r--r-- | systemtap.spec | 15 | ||||
-rw-r--r-- | testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | testsuite/systemtap.base/static_uprobes.exp | 2 |
7 files changed, 75 insertions, 154 deletions
@@ -1,3 +1,12 @@ +2009-01-13 Stan Cox <scox@redhat.com> + + * systemtap.spec (sdt-devel): New subpackage. + * Makefile.am (oldincludedir): New. + (oldinclude_HEADERS): New. + (bin_SCRIPTS): Add dtrace + * Makefile.in: Regenerated. + * runtime/sduprobes.h: Renamed to sdt.h + 2009-01-13 Dave Brolley <brolley@redhat.com> * stap-find-or-start-server,stap-start-server,stap-serverd,stap-server: diff --git a/Makefile.am b/Makefile.am index 38a2edaf..4ad842f8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,7 @@ AUTOMAKE_OPTIONS = no-dist pkglibexecdir = ${libexecdir}/${PACKAGE} +oldincludedir = ${includedir}/sys AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' @@ -15,6 +16,7 @@ man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 man/st bin_PROGRAMS = stap staprun bin_SCRIPTS = stap-report +oldinclude_HEADERS = runtime/sdt.h if BUILD_SERVER man_MANS += stap-server.8 bin_PROGRAMS += stap-client-connect stap-server-connect @@ -22,6 +24,7 @@ bin_SCRIPTS += stap-client stap-serverd stap-server stap-find-servers \ stap-start-server stap-find-or-start-server stap-stop-server \ stap-gen-server-cert stap-add-server-cert endif +bin_SCRIPTS += dtrace stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ diff --git a/Makefile.in b/Makefile.in index 37afdcdc..93575271 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,6 +18,7 @@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -71,7 +72,7 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(top_srcdir)/man/stapprobes.socket.5.in \ $(top_srcdir)/man/stapprobes.tcp.5.in \ $(top_srcdir)/man/stapprobes.udp.5.in $(srcdir)/run-stap.in \ - depcomp + depcomp $(oldinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -97,7 +98,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ - "$(DESTDIR)$(man8dir)" + "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(oldincludedir)" pkglibLIBRARIES_INSTALL = $(INSTALL_DATA) LIBRARIES = $(pkglib_LIBRARIES) AR = ar @@ -182,6 +183,8 @@ man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) +oldincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(oldinclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags @@ -282,7 +285,7 @@ nspr_CFLAGS = @nspr_CFLAGS@ nspr_LIBS = @nspr_LIBS@ nss_CFLAGS = @nss_CFLAGS@ nss_LIBS = @nss_LIBS@ -oldincludedir = @oldincludedir@ +oldincludedir = ${includedir}/sys pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -310,7 +313,8 @@ man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 \ man/stapprobes.rpc.5 man/stapprobes.scsi.5 \ man/stapprobes.signal.5 man/stapprobes.socket.5 \ man/stapprobes.tcp.5 man/stapprobes.udp.5 $(am__append_1) -bin_SCRIPTS = stap-report $(am__append_3) +bin_SCRIPTS = stap-report $(am__append_3) dtrace +oldinclude_HEADERS = runtime/sdt.h stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ @@ -1199,6 +1203,23 @@ uninstall-man8: echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ done +install-oldincludeHEADERS: $(oldinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(oldincludedir)" || $(MKDIR_P) "$(DESTDIR)$(oldincludedir)" + @list='$(oldinclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(oldincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(oldincludedir)/$$f'"; \ + $(oldincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(oldincludedir)/$$f"; \ + done + +uninstall-oldincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(oldinclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(oldincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(oldincludedir)/$$f"; \ + done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1333,11 +1354,11 @@ distclean-tags: check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h \ - all-local +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) \ + $(HEADERS) config.h all-local installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \ + for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(oldincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -1389,7 +1410,8 @@ info: info-recursive info-am: -install-data-am: install-data-local install-man +install-data-am: install-data-local install-man \ + install-oldincludeHEADERS install-dvi: install-dvi-recursive @@ -1431,8 +1453,8 @@ ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-local uninstall-man uninstall-pkglibLIBRARIES \ - uninstall-pkglibexecPROGRAMS + uninstall-local uninstall-man uninstall-oldincludeHEADERS \ + uninstall-pkglibLIBRARIES uninstall-pkglibexecPROGRAMS uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 @@ -1451,16 +1473,17 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 install-exec install-exec-am install-exec-hook \ install-exec-local install-html install-html-am install-info \ install-info-am install-man install-man1 install-man5 \ - install-man8 install-pdf install-pdf-am \ - install-pkglibLIBRARIES install-pkglibexecPROGRAMS install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-local uninstall-man \ - uninstall-man1 uninstall-man5 uninstall-man8 \ - uninstall-pkglibLIBRARIES uninstall-pkglibexecPROGRAMS + install-man8 install-oldincludeHEADERS install-pdf \ + install-pdf-am install-pkglibLIBRARIES \ + install-pkglibexecPROGRAMS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-local \ + uninstall-man uninstall-man1 uninstall-man5 uninstall-man8 \ + uninstall-oldincludeHEADERS uninstall-pkglibLIBRARIES \ + uninstall-pkglibexecPROGRAMS git_version.stamp: @if test -f "$(srcdir)/git_version.h"; then \ diff --git a/runtime/sduprobes.h b/runtime/sduprobes.h deleted file mode 100644 index 17c1be71..00000000 --- a/runtime/sduprobes.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (C) 2005-2008 Red Hat Inc. -// Copyright (C) 2006 Intel Corporation. -// -// This file is part of systemtap, and is free software. You can -// redistribute it and/or modify it under the terms of the GNU General -// Public License (GPL); either version 2, or (at your option) any -// later version. - -#include <string.h> - -#if _LP64 -#define STAP_PROBE_STRUCT_ARG(arg) \ - __uint64_t arg; -#else -#define STAP_PROBE_STRUCT_ARG(arg) \ - long arg __attribute__ ((aligned(8))); -#endif - -#define STAP_PROBE_STRUCT(probe,type,argc) \ -struct _probe_ ## probe \ -{ \ - char probe_name [strlen(#probe)+1]; \ - int probe_type; \ - STAP_PROBE_STRUCT_ARG (probe_arg); \ -}; \ - static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {#probe,type,argc}; - -// The goto _probe_ prevents the label from "drifting" -#ifdef USE_STAP_PROBE -#define STAP_PROBE(provider,probe) \ - STAP_PROBE_STRUCT(probe,0,0) \ - _stap_probe_0 (_probe_ ## probe.probe_name); -#else -#define STAP_PROBE(provider,probe) \ -_probe_ ## probe: \ - asm volatile ("nop"); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto _probe_ ## probe; -#endif - - -#ifdef USE_STAP_PROBE -#define STAP_PROBE1(provider,probe,arg1) \ - STAP_PROBE_STRUCT(probe,0,1) \ - _stap_probe_1 (_probe_ ## probe.probe_name,(size_t)arg1); -#else -#define STAP_PROBE1(provider,probe,parm1) \ - {volatile typeof(parm1) arg1 = parm1; \ -_probe_ ## probe: \ - asm volatile ("nop" :: "r"(arg1)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto _probe_ ## probe;} -#endif - - -#ifdef USE_STAP_PROBE -#define STAP_PROBE2(provider,probe,arg1,arg2) \ - STAP_PROBE_STRUCT(probe,0,2) \ - _stap_probe_2 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2); -#else -#define STAP_PROBE2(provider,probe,parm1,parm2) \ - {volatile typeof(parm1) arg1 = parm1; \ - volatile typeof(parm2) arg2 = parm2; \ -_probe_ ## probe: \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe)\ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto _probe_ ## probe;} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE3(provider,probe,arg1,arg2,arg3) \ - STAP_PROBE_STRUCT(probe,0,3) \ - _stap_probe_3 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3); -#else -#define STAP_PROBE3(provider,probe,parm1,parm2,parm3) \ - {volatile typeof(parm1) arg1 = parm1; \ - volatile typeof(parm2) arg2 = parm2; \ - volatile typeof(parm3) arg3 = parm3; \ -_probe_ ## probe: \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2), "r"(arg3)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto _probe_ ## probe;} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE4(provider,probe,arg1,arg2,arg3,arg4) \ - STAP_PROBE_STRUCT(probe,0,4) \ - _stap_probe_4 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4); -#else -#define STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ - {volatile typeof(parm1) arg1 = parm1; \ - volatile typeof(parm2) arg2 = parm2; \ - volatile typeof(parm3) arg3 = parm3; \ - volatile typeof(parm4) arg4 = parm4; \ -_probe_ ## probe: \ - asm volatile ("nop" "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto _probe_ ## probe;} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE5(provider,probe,arg1,arg2,arg3,arg4,arg5) \ - STAP_PROBE_STRUCT(probe,0,5) \ - _stap_probe_5 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4,(size_t)arg5); -#else -#define STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \ - {volatile typeof(parm1) arg1 = parm1; \ - volatile typeof(parm2) arg2 = parm2; \ - volatile typeof(parm3) arg3 = parm3; \ - volatile typeof(parm4) arg4 = parm4; \ - volatile typeof(parm5) arg5 = parm5; \ -_probe_ ## probe: \ - asm volatile ("nop" "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto _probe_ ## probe;} -#endif - -#define DTRACE_PROBE(provider,probe) \ -STAP_PROBE(provider,probe) -#define DTRACE_PROBE1(provider,probe,parm1) \ -STAP_PROBE1(provider,probe,parm1) -#define DTRACE_PROBE2(provider,probe,parm1,parm2) \ -STAP_PROBE2(provider,probe,parm1,parm2) -#define DTRACE_PROBE3(provider,probe,parm1,parm2,parm3) \ -STAP_PROBE3(provider,probe,parm1,parm2,parm3) -#define DTRACE_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ -STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) diff --git a/systemtap.spec b/systemtap.spec index b7dc6b69..75274d24 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -102,6 +102,16 @@ SystemTap server is the server component of an instrumentation system for systems running Linux 2.6. Developers can write instrumentation to collect data on the operation of the system. +%package sdt-devel +Summary: Static probe support tools +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap + +%description sdt-devel +Support tools to allow applications to use static probes. + %prep %setup -q %{?setup_elfutils} @@ -257,6 +267,11 @@ exit 0 %{_bindir}/stap-server-connect %{_mandir}/man8/stap-server.8* +%files sdt-devel +%defattr(-,root,root) +%{_bindir}/dtrace +%{_includedir}/sys/sdt.h + %changelog * Thu Nov 13 2008 Frank Ch. Eigler <fche@redhat.com> - 0.8-1 - Upstream release. diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index fe40eb67..ec5dc08e 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-01-13 Stan Cox <scox@redhat.com> + + * systemtap.base/static_uprobes.exp: Use sdt.h + 2009-01-11 Wenji Huang <wenji.huang@oracle.com> * systemtap.base/badkprobe.exp: Add explicit timeout. diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp index 354256db..34bd33a4 100644 --- a/testsuite/systemtap.base/static_uprobes.exp +++ b/testsuite/systemtap.base/static_uprobes.exp @@ -9,7 +9,7 @@ set fp [open $sup_srcpath "w"] puts $fp " #include <stdlib.h> #define USE_STAP_PROBE 1 -#include \"sduprobes.h\" +#include \"sdt.h\" foo () { |