summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--ChangeLog36
-rw-r--r--Makefile.am11
-rw-r--r--Makefile.in74
-rw-r--r--buildrun.cxx2
-rw-r--r--elaborate.h6
-rw-r--r--runtime/ChangeLog38
-rw-r--r--runtime/autoconf-module-nsections.c8
-rw-r--r--runtime/regs.h4
-rw-r--r--runtime/runtime.h4
-rw-r--r--runtime/stack-i386.c50
-rw-r--r--runtime/stack-x86_64.c17
-rw-r--r--runtime/stack.c8
-rw-r--r--runtime/sym.c5
-rw-r--r--runtime/transport/ChangeLog11
-rw-r--r--runtime/transport/symbols.c21
-rw-r--r--runtime/unwind.c5
-rw-r--r--runtime/unwind/i386.h18
-rw-r--r--runtime/unwind/unwind.h4
-rw-r--r--tapset/ChangeLog4
-rw-r--r--tapset/context.stp4
-rw-r--r--tapsets.cxx63
-rw-r--r--translate.cxx4
23 files changed, 244 insertions, 154 deletions
diff --git a/.gitignore b/.gitignore
index 2b253d9a..b70c9e21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@ CVS
SNAPSHOT
*.o
git_version.h
+Makefile
diff --git a/ChangeLog b/ChangeLog
index 7f3d347a..8a1e89a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6405 cont'd.
+ * Makefile.am (AM_CFLAGS): Remove -Wshadow, as it triggers for
+ new stapio (modname global vs. dwfl headers).
+
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6405
+ * buildrun.cxx (compile_pass): Add STAPCONF_MODULE_NSECTIONS.
+
+2008-04-14 David Smith <dsmith@redhat.com>
+
+ * elaborate.h (struct derived_probe_group): Removed
+ emit_module_header virtual function.
+ * translate.cxx (c_unparser::emit_common_header): Removed calls to
+ emit_module_header function.
+ * tapsets.cxx (be_derived_probe>): Removed emit_module_header function.
+ (struct timer_derived_probe_group): Ditto.
+ (struct profile_derived_probe_group): Ditto.
+ (struct procfs_derived_probe_group): Ditto.
+ (struct hrtimer_derived_probe_group): Ditto.
+ (struct perfmon_derived_probe_group): Ditto.
+ (dwarf_derived_probe_group::emit_module_decls): Moved kernel check
+ back from deleted emit_module_header function.
+ (uprobe_derived_probe_group::emit_module_decls): Ditto.
+ (mark_derived_probe_group::join_group): Moved marker
+ kernel check (to a new embedded code section) from deleted
+ emit_module_header function.
+
+2008-04-14 Frank Ch. Eigler <fche@elastic.org>
+
+ * Makefile.am (stapio_*): Become able to link/compile against
+ bundled elfutils.
+ * Makefile.in: Regenerated.
+
2008-04-09 Martin Hunt <hunt@dragon>
* buildrun.cxx (run_pass): Remove unused "-d" option
diff --git a/Makefile.am b/Makefile.am
index 66df81cf..03fdd8c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@ pkglibexecdir = ${libexecdir}/${PACKAGE}
AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"'
-AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wshadow -Wunused -Wformat=2 -W
+AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W
AM_CXXFLAGS = -Wall -Werror
dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 staprun.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.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
@@ -65,6 +65,9 @@ stap_CXXFLAGS = $(AM_CXXFLAGS)
stap_CPPFLAGS = $(AM_CPPFLAGS)
stap_LDFLAGS = $(AM_LDFLAGS)
+stapio_CPPFLAGS = $(AM_CPPFLAGS)
+stapio_LDFLAGS = $(AM_LDFLAGS)
+
if BUILD_ELFUTILS
# This tells automake's "make distcheck" what we need to compile.
DISTCHECK_CONFIGURE_FLAGS = --with-elfutils=$(elfutils_abs_srcdir)
@@ -72,6 +75,11 @@ DISTCHECK_CONFIGURE_FLAGS = --with-elfutils=$(elfutils_abs_srcdir)
stap_CPPFLAGS += -Iinclude-elfutils
stap_LDFLAGS += -Llib-elfutils -Wl,-rpath-link,lib-elfutils \
-Wl,--enable-new-dtags,-rpath,$(pkglibdir)
+stapio_CPPFLAGS += -Iinclude-elfutils
+stapio_LDFLAGS += -Llib-elfutils -Wl,-rpath-link,lib-elfutils \
+ -Wl,--enable-new-dtags,-rpath,$(pkglibdir)
+
+
BUILT_SOURCES += stamp-elfutils
CLEANFILES += stamp-elfutils
stamp-elfutils: config.status
@@ -104,7 +112,6 @@ stapio_SOURCES = runtime/staprun/stapio.c \
runtime/staprun/mainloop.c runtime/staprun/common.c \
runtime/staprun/ctl.c runtime/staprun/unwind_data.c \
runtime/staprun/relay.c runtime/staprun/relay_old.c
-
stapio_CFLAGS = @PROCFLAGS@ $(AM_CFLAGS)
stapio_LDADD = @PROCFLAGS@ -ldw -lpthread
diff --git a/Makefile.in b/Makefile.in
index f9822cac..e1db0a3d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -37,8 +37,12 @@ bin_PROGRAMS = stap$(EXEEXT) staprun$(EXEEXT)
@BUILD_ELFUTILS_TRUE@am__append_2 = -Llib-elfutils -Wl,-rpath-link,lib-elfutils \
@BUILD_ELFUTILS_TRUE@ -Wl,--enable-new-dtags,-rpath,$(pkglibdir)
-@BUILD_ELFUTILS_TRUE@am__append_3 = stamp-elfutils
-@BUILD_ELFUTILS_TRUE@am__append_4 = stamp-elfutils
+@BUILD_ELFUTILS_TRUE@am__append_3 = -Iinclude-elfutils
+@BUILD_ELFUTILS_TRUE@am__append_4 = -Llib-elfutils -Wl,-rpath-link,lib-elfutils \
+@BUILD_ELFUTILS_TRUE@ -Wl,--enable-new-dtags,-rpath,$(pkglibdir)
+
+@BUILD_ELFUTILS_TRUE@am__append_5 = stamp-elfutils
+@BUILD_ELFUTILS_TRUE@am__append_6 = stamp-elfutils
@BUILD_ELFUTILS_FALSE@stap_DEPENDENCIES =
pkglibexec_PROGRAMS = stapio$(EXEEXT)
noinst_PROGRAMS = loc2c-test$(EXEEXT)
@@ -107,7 +111,7 @@ am_stapio_OBJECTS = stapio-stapio.$(OBJEXT) stapio-mainloop.$(OBJEXT) \
stapio-relay_old.$(OBJEXT)
stapio_OBJECTS = $(am_stapio_OBJECTS)
stapio_DEPENDENCIES =
-stapio_LINK = $(CCLD) $(stapio_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+stapio_LINK = $(CCLD) $(stapio_CFLAGS) $(CFLAGS) $(stapio_LDFLAGS) \
$(LDFLAGS) -o $@
am_staprun_OBJECTS = staprun-staprun.$(OBJEXT) \
staprun-staprun_funcs.$(OBJEXT) staprun-ctl.$(OBJEXT) \
@@ -267,7 +271,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = dist-bzip2
pkglibexecdir = ${libexecdir}/${PACKAGE}
AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"'
-AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wshadow -Wunused -Wformat=2 -W
+AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W
AM_CXXFLAGS = -Wall -Werror
dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 staprun.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.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
stap_SOURCES = main.cxx \
@@ -285,12 +289,14 @@ stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@
# of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES
# instead of foo_SOURCES prevents shipping git_version.h in dist tarballs,
# which may cause false GIT_FOO readings.
-BUILT_SOURCES = git_version.stamp $(am__append_3)
-CLEANFILES = git_version.h $(am__append_4) $(pkglibexec_PROGRAMS)
+BUILT_SOURCES = git_version.stamp $(am__append_5)
+CLEANFILES = git_version.h $(am__append_6) $(pkglibexec_PROGRAMS)
GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh
stap_CXXFLAGS = $(AM_CXXFLAGS)
stap_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_1)
stap_LDFLAGS = $(AM_LDFLAGS) $(am__append_2)
+stapio_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_3)
+stapio_LDFLAGS = $(AM_LDFLAGS) $(am__append_4)
# This tells automake's "make distcheck" what we need to compile.
@BUILD_ELFUTILS_TRUE@DISTCHECK_CONFIGURE_FLAGS = --with-elfutils=$(elfutils_abs_srcdir)
@@ -595,102 +601,102 @@ stap-mdfour.obj: mdfour.c
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stap-mdfour.obj `if test -f 'mdfour.c'; then $(CYGPATH_W) 'mdfour.c'; else $(CYGPATH_W) '$(srcdir)/mdfour.c'; fi`
stapio-stapio.o: runtime/staprun/stapio.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-stapio.o -MD -MP -MF $(DEPDIR)/stapio-stapio.Tpo -c -o stapio-stapio.o `test -f 'runtime/staprun/stapio.c' || echo '$(srcdir)/'`runtime/staprun/stapio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-stapio.o -MD -MP -MF $(DEPDIR)/stapio-stapio.Tpo -c -o stapio-stapio.o `test -f 'runtime/staprun/stapio.c' || echo '$(srcdir)/'`runtime/staprun/stapio.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-stapio.Tpo $(DEPDIR)/stapio-stapio.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/stapio.c' object='stapio-stapio.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-stapio.o `test -f 'runtime/staprun/stapio.c' || echo '$(srcdir)/'`runtime/staprun/stapio.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-stapio.o `test -f 'runtime/staprun/stapio.c' || echo '$(srcdir)/'`runtime/staprun/stapio.c
stapio-stapio.obj: runtime/staprun/stapio.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-stapio.obj -MD -MP -MF $(DEPDIR)/stapio-stapio.Tpo -c -o stapio-stapio.obj `if test -f 'runtime/staprun/stapio.c'; then $(CYGPATH_W) 'runtime/staprun/stapio.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/stapio.c'; fi`
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-stapio.obj -MD -MP -MF $(DEPDIR)/stapio-stapio.Tpo -c -o stapio-stapio.obj `if test -f 'runtime/staprun/stapio.c'; then $(CYGPATH_W) 'runtime/staprun/stapio.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/stapio.c'; fi`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-stapio.Tpo $(DEPDIR)/stapio-stapio.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/stapio.c' object='stapio-stapio.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-stapio.obj `if test -f 'runtime/staprun/stapio.c'; then $(CYGPATH_W) 'runtime/staprun/stapio.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/stapio.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-stapio.obj `if test -f 'runtime/staprun/stapio.c'; then $(CYGPATH_W) 'runtime/staprun/stapio.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/stapio.c'; fi`
stapio-mainloop.o: runtime/staprun/mainloop.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-mainloop.o -MD -MP -MF $(DEPDIR)/stapio-mainloop.Tpo -c -o stapio-mainloop.o `test -f 'runtime/staprun/mainloop.c' || echo '$(srcdir)/'`runtime/staprun/mainloop.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-mainloop.o -MD -MP -MF $(DEPDIR)/stapio-mainloop.Tpo -c -o stapio-mainloop.o `test -f 'runtime/staprun/mainloop.c' || echo '$(srcdir)/'`runtime/staprun/mainloop.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-mainloop.Tpo $(DEPDIR)/stapio-mainloop.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/mainloop.c' object='stapio-mainloop.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-mainloop.o `test -f 'runtime/staprun/mainloop.c' || echo '$(srcdir)/'`runtime/staprun/mainloop.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-mainloop.o `test -f 'runtime/staprun/mainloop.c' || echo '$(srcdir)/'`runtime/staprun/mainloop.c
stapio-mainloop.obj: runtime/staprun/mainloop.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-mainloop.obj -MD -MP -MF $(DEPDIR)/stapio-mainloop.Tpo -c -o stapio-mainloop.obj `if test -f 'runtime/staprun/mainloop.c'; then $(CYGPATH_W) 'runtime/staprun/mainloop.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/mainloop.c'; fi`
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-mainloop.obj -MD -MP -MF $(DEPDIR)/stapio-mainloop.Tpo -c -o stapio-mainloop.obj `if test -f 'runtime/staprun/mainloop.c'; then $(CYGPATH_W) 'runtime/staprun/mainloop.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/mainloop.c'; fi`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-mainloop.Tpo $(DEPDIR)/stapio-mainloop.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/mainloop.c' object='stapio-mainloop.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-mainloop.obj `if test -f 'runtime/staprun/mainloop.c'; then $(CYGPATH_W) 'runtime/staprun/mainloop.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/mainloop.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-mainloop.obj `if test -f 'runtime/staprun/mainloop.c'; then $(CYGPATH_W) 'runtime/staprun/mainloop.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/mainloop.c'; fi`
stapio-common.o: runtime/staprun/common.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-common.o -MD -MP -MF $(DEPDIR)/stapio-common.Tpo -c -o stapio-common.o `test -f 'runtime/staprun/common.c' || echo '$(srcdir)/'`runtime/staprun/common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-common.o -MD -MP -MF $(DEPDIR)/stapio-common.Tpo -c -o stapio-common.o `test -f 'runtime/staprun/common.c' || echo '$(srcdir)/'`runtime/staprun/common.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-common.Tpo $(DEPDIR)/stapio-common.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/common.c' object='stapio-common.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-common.o `test -f 'runtime/staprun/common.c' || echo '$(srcdir)/'`runtime/staprun/common.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-common.o `test -f 'runtime/staprun/common.c' || echo '$(srcdir)/'`runtime/staprun/common.c
stapio-common.obj: runtime/staprun/common.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-common.obj -MD -MP -MF $(DEPDIR)/stapio-common.Tpo -c -o stapio-common.obj `if test -f 'runtime/staprun/common.c'; then $(CYGPATH_W) 'runtime/staprun/common.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/common.c'; fi`
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-common.obj -MD -MP -MF $(DEPDIR)/stapio-common.Tpo -c -o stapio-common.obj `if test -f 'runtime/staprun/common.c'; then $(CYGPATH_W) 'runtime/staprun/common.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/common.c'; fi`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-common.Tpo $(DEPDIR)/stapio-common.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/common.c' object='stapio-common.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-common.obj `if test -f 'runtime/staprun/common.c'; then $(CYGPATH_W) 'runtime/staprun/common.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/common.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-common.obj `if test -f 'runtime/staprun/common.c'; then $(CYGPATH_W) 'runtime/staprun/common.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/common.c'; fi`
stapio-ctl.o: runtime/staprun/ctl.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-ctl.o -MD -MP -MF $(DEPDIR)/stapio-ctl.Tpo -c -o stapio-ctl.o `test -f 'runtime/staprun/ctl.c' || echo '$(srcdir)/'`runtime/staprun/ctl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-ctl.o -MD -MP -MF $(DEPDIR)/stapio-ctl.Tpo -c -o stapio-ctl.o `test -f 'runtime/staprun/ctl.c' || echo '$(srcdir)/'`runtime/staprun/ctl.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-ctl.Tpo $(DEPDIR)/stapio-ctl.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/ctl.c' object='stapio-ctl.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-ctl.o `test -f 'runtime/staprun/ctl.c' || echo '$(srcdir)/'`runtime/staprun/ctl.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-ctl.o `test -f 'runtime/staprun/ctl.c' || echo '$(srcdir)/'`runtime/staprun/ctl.c
stapio-ctl.obj: runtime/staprun/ctl.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-ctl.obj -MD -MP -MF $(DEPDIR)/stapio-ctl.Tpo -c -o stapio-ctl.obj `if test -f 'runtime/staprun/ctl.c'; then $(CYGPATH_W) 'runtime/staprun/ctl.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/ctl.c'; fi`
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-ctl.obj -MD -MP -MF $(DEPDIR)/stapio-ctl.Tpo -c -o stapio-ctl.obj `if test -f 'runtime/staprun/ctl.c'; then $(CYGPATH_W) 'runtime/staprun/ctl.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/ctl.c'; fi`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-ctl.Tpo $(DEPDIR)/stapio-ctl.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/ctl.c' object='stapio-ctl.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-ctl.obj `if test -f 'runtime/staprun/ctl.c'; then $(CYGPATH_W) 'runtime/staprun/ctl.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/ctl.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-ctl.obj `if test -f 'runtime/staprun/ctl.c'; then $(CYGPATH_W) 'runtime/staprun/ctl.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/ctl.c'; fi`
stapio-unwind_data.o: runtime/staprun/unwind_data.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-unwind_data.o -MD -MP -MF $(DEPDIR)/stapio-unwind_data.Tpo -c -o stapio-unwind_data.o `test -f 'runtime/staprun/unwind_data.c' || echo '$(srcdir)/'`runtime/staprun/unwind_data.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-unwind_data.o -MD -MP -MF $(DEPDIR)/stapio-unwind_data.Tpo -c -o stapio-unwind_data.o `test -f 'runtime/staprun/unwind_data.c' || echo '$(srcdir)/'`runtime/staprun/unwind_data.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-unwind_data.Tpo $(DEPDIR)/stapio-unwind_data.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/unwind_data.c' object='stapio-unwind_data.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-unwind_data.o `test -f 'runtime/staprun/unwind_data.c' || echo '$(srcdir)/'`runtime/staprun/unwind_data.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-unwind_data.o `test -f 'runtime/staprun/unwind_data.c' || echo '$(srcdir)/'`runtime/staprun/unwind_data.c
stapio-unwind_data.obj: runtime/staprun/unwind_data.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-unwind_data.obj -MD -MP -MF $(DEPDIR)/stapio-unwind_data.Tpo -c -o stapio-unwind_data.obj `if test -f 'runtime/staprun/unwind_data.c'; then $(CYGPATH_W) 'runtime/staprun/unwind_data.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/unwind_data.c'; fi`
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-unwind_data.obj -MD -MP -MF $(DEPDIR)/stapio-unwind_data.Tpo -c -o stapio-unwind_data.obj `if test -f 'runtime/staprun/unwind_data.c'; then $(CYGPATH_W) 'runtime/staprun/unwind_data.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/unwind_data.c'; fi`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-unwind_data.Tpo $(DEPDIR)/stapio-unwind_data.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/unwind_data.c' object='stapio-unwind_data.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-unwind_data.obj `if test -f 'runtime/staprun/unwind_data.c'; then $(CYGPATH_W) 'runtime/staprun/unwind_data.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/unwind_data.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-unwind_data.obj `if test -f 'runtime/staprun/unwind_data.c'; then $(CYGPATH_W) 'runtime/staprun/unwind_data.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/unwind_data.c'; fi`
stapio-relay.o: runtime/staprun/relay.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay.o -MD -MP -MF $(DEPDIR)/stapio-relay.Tpo -c -o stapio-relay.o `test -f 'runtime/staprun/relay.c' || echo '$(srcdir)/'`runtime/staprun/relay.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay.o -MD -MP -MF $(DEPDIR)/stapio-relay.Tpo -c -o stapio-relay.o `test -f 'runtime/staprun/relay.c' || echo '$(srcdir)/'`runtime/staprun/relay.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-relay.Tpo $(DEPDIR)/stapio-relay.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/relay.c' object='stapio-relay.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay.o `test -f 'runtime/staprun/relay.c' || echo '$(srcdir)/'`runtime/staprun/relay.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay.o `test -f 'runtime/staprun/relay.c' || echo '$(srcdir)/'`runtime/staprun/relay.c
stapio-relay.obj: runtime/staprun/relay.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay.obj -MD -MP -MF $(DEPDIR)/stapio-relay.Tpo -c -o stapio-relay.obj `if test -f 'runtime/staprun/relay.c'; then $(CYGPATH_W) 'runtime/staprun/relay.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay.c'; fi`
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay.obj -MD -MP -MF $(DEPDIR)/stapio-relay.Tpo -c -o stapio-relay.obj `if test -f 'runtime/staprun/relay.c'; then $(CYGPATH_W) 'runtime/staprun/relay.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay.c'; fi`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-relay.Tpo $(DEPDIR)/stapio-relay.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/relay.c' object='stapio-relay.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay.obj `if test -f 'runtime/staprun/relay.c'; then $(CYGPATH_W) 'runtime/staprun/relay.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay.obj `if test -f 'runtime/staprun/relay.c'; then $(CYGPATH_W) 'runtime/staprun/relay.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay.c'; fi`
stapio-relay_old.o: runtime/staprun/relay_old.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay_old.o -MD -MP -MF $(DEPDIR)/stapio-relay_old.Tpo -c -o stapio-relay_old.o `test -f 'runtime/staprun/relay_old.c' || echo '$(srcdir)/'`runtime/staprun/relay_old.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay_old.o -MD -MP -MF $(DEPDIR)/stapio-relay_old.Tpo -c -o stapio-relay_old.o `test -f 'runtime/staprun/relay_old.c' || echo '$(srcdir)/'`runtime/staprun/relay_old.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-relay_old.Tpo $(DEPDIR)/stapio-relay_old.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/relay_old.c' object='stapio-relay_old.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay_old.o `test -f 'runtime/staprun/relay_old.c' || echo '$(srcdir)/'`runtime/staprun/relay_old.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay_old.o `test -f 'runtime/staprun/relay_old.c' || echo '$(srcdir)/'`runtime/staprun/relay_old.c
stapio-relay_old.obj: runtime/staprun/relay_old.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay_old.obj -MD -MP -MF $(DEPDIR)/stapio-relay_old.Tpo -c -o stapio-relay_old.obj `if test -f 'runtime/staprun/relay_old.c'; then $(CYGPATH_W) 'runtime/staprun/relay_old.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay_old.c'; fi`
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -MT stapio-relay_old.obj -MD -MP -MF $(DEPDIR)/stapio-relay_old.Tpo -c -o stapio-relay_old.obj `if test -f 'runtime/staprun/relay_old.c'; then $(CYGPATH_W) 'runtime/staprun/relay_old.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay_old.c'; fi`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stapio-relay_old.Tpo $(DEPDIR)/stapio-relay_old.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/staprun/relay_old.c' object='stapio-relay_old.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay_old.obj `if test -f 'runtime/staprun/relay_old.c'; then $(CYGPATH_W) 'runtime/staprun/relay_old.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay_old.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapio_CPPFLAGS) $(CPPFLAGS) $(stapio_CFLAGS) $(CFLAGS) -c -o stapio-relay_old.obj `if test -f 'runtime/staprun/relay_old.c'; then $(CYGPATH_W) 'runtime/staprun/relay_old.c'; else $(CYGPATH_W) '$(srcdir)/runtime/staprun/relay_old.c'; fi`
staprun-staprun.o: runtime/staprun/staprun.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(staprun_CPPFLAGS) $(CPPFLAGS) $(staprun_CFLAGS) $(CFLAGS) -MT staprun-staprun.o -MD -MP -MF $(DEPDIR)/staprun-staprun.Tpo -c -o staprun-staprun.o `test -f 'runtime/staprun/staprun.c' || echo '$(srcdir)/'`runtime/staprun/staprun.c
diff --git a/buildrun.cxx b/buildrun.cxx
index a186326f..76efe7c0 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -93,9 +93,9 @@ compile_pass (systemtap_session& s)
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-tsc-khz.c, -DSTAPCONF_TSC_KHZ,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-ktime-get-real.c, -DSTAPCONF_KTIME_GET_REAL,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-x86-uniregs.c, -DSTAPCONF_X86_UNIREGS,)" << endl;
-
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-nameidata.c, -DSTAPCONF_NAMEIDATA_CLEANUP,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-unregister-kprobes.c, -DSTAPCONF_UNREGISTER_KPROBES,)" << endl;
+ o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-module-nsections.c, -DSTAPCONF_MODULE_NSECTIONS,)" << endl;
for (unsigned i=0; i<s.macros.size(); i++)
o << "EXTRA_CFLAGS += -D " << lex_cast_qstring(s.macros[i]) << endl;
diff --git a/elaborate.h b/elaborate.h
index f53f3870..30bf5bce 100644
--- a/elaborate.h
+++ b/elaborate.h
@@ -150,12 +150,6 @@ struct derived_probe_group
{
virtual ~derived_probe_group () {}
- virtual void emit_module_header (systemtap_session& s) = 0;
- // The _header-generated code may assume that only basic includes
- // have been generated. _header is called near the start of the
- // code generation process, before the context, embedded-C code,
- // etc. are generated.
-
virtual void emit_module_decls (systemtap_session& s) = 0;
// The _decls-generated code may assume that declarations such as
// the context, embedded-C code, function and probe handler bodies
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 09a3e35d..7184a980 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,41 @@
+2008-04-15 hunt <hunt@redhat.com>
+
+ * stack-x86_64.c (_stp_stack_print_fallback): Add levels.
+ (__stp_stack_print): Count levels properly.
+
+2008-04-15 Martin Hunt <hunt@redhat.com>
+
+ Finish support for limits on backtrace depth.
+ * runtime.h (MAXTRACE): Default to 20.
+ * stack.c (_stp_stack_print): Call __stp_stack_print
+ with levels set properly.
+ * sym.c (_stp_func_print): Return a value indicating
+ if something was printed.
+
+ Support for i386 and x86_64 on 2.6.25 kernel
+ * unwind/i386.h: Support unified registers on 2.6.25.
+ Remove unused frame stuff, including STACK_*.
+ * stack-i386.c (__stp_stack_print): Support unified
+ registers on 2.6.25.
+ * regs.h (REG_FP): Define for i386.
+
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6410.
+ * unwind.c, unwind.h: Make body conditional in STP_USE_DWARF_UNWINDER.
+ * stack-x86_64.c (__stp_stack_print): Tolerate !unwinder.
+
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6405
+ * autoconf-module-nsections.c: New file.
+
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
+ * unwind/i386.h (STACK_BOTTOM, STACK_TOP): Comment out these
+ unused definitions, for they collide with some kernels
+ (2.6.25-0.121.rc5.git4 rawhide).
+
2008-04-13 Frank Ch. Eigler <fche@elastic.org>
* print.c (_stp_pbuf_full): New function to note full print buffer.
diff --git a/runtime/autoconf-module-nsections.c b/runtime/autoconf-module-nsections.c
new file mode 100644
index 00000000..c1ce58b7
--- /dev/null
+++ b/runtime/autoconf-module-nsections.c
@@ -0,0 +1,8 @@
+#include <linux/module.h>
+
+struct module_sect_attrs x;
+
+void foo (void)
+{
+ (void) x.nsections;
+}
diff --git a/runtime/regs.h b/runtime/regs.h
index c1e2344b..4954020f 100644
--- a/runtime/regs.h
+++ b/runtime/regs.h
@@ -1,5 +1,5 @@
/* common register includes used in multiple modules
- * Copyright (C) 2005 Red Hat Inc.
+ * Copyright (C) 2005-2008 Red Hat Inc.
* Copyright (C) 2005 Intel Corporation.
*
* This file is part of systemtap, and is free software. You can
@@ -14,6 +14,7 @@
#if defined (STAPCONF_X86_UNIREGS) && (defined (__x86_64__) || defined (__i386__))
#define REG_IP(regs) regs->ip
#define REG_SP(regs) regs->sp
+#define REG_FP(regs) regs->bp;
#elif defined (__x86_64__)
@@ -24,6 +25,7 @@
#define REG_IP(regs) regs->eip
#define REG_SP(regs) regs->esp
+#define REG_FP(regs) regs->ebp;
#elif defined (__ia64__)
#define REG_IP(regs) ((regs)->cr_iip +ia64_psr(regs)->ri)
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 8d267173..50eb9d31 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -70,6 +70,10 @@ static struct
#define MAXSTRINGLEN 128
#endif
+#ifndef MAXTRACE
+#define MAXTRACE 20
+#endif
+
#ifdef CONFIG_FRAME_POINTER
/* Just because frame pointers are available does not mean we can trust them. */
#if defined (__i386__) || defined (__arm__)
diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c
index 78f89b0d..ad101889 100644
--- a/runtime/stack-i386.c
+++ b/runtime/stack-i386.c
@@ -14,65 +14,61 @@ static int _stp_valid_stack_ptr(unsigned long context, unsigned long p)
}
/* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */
-static void _stp_stack_print_fallback(unsigned long context, unsigned long stack, int verbose)
+static void _stp_stack_print_fallback(unsigned long context, unsigned long stack, int verbose, int levels)
{
unsigned long addr;
- while (_stp_valid_stack_ptr(context, stack) &&
- !_stp_pbuf_full()) {
+ while (levels && _stp_valid_stack_ptr(context, stack)) {
if (unlikely(_stp_read_address(addr, (unsigned long *)stack, KERNEL_DS))) {
/* cannot access stack. give up. */
return;
}
- _stp_func_print(addr, verbose, 0);
+ if (_stp_func_print(addr, verbose, 0))
+ levels--;
stack++;
}
}
static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels)
{
- unsigned long *stack = (unsigned long *)&REG_SP(regs);
- unsigned long context = (unsigned long)stack & ~(THREAD_SIZE - 1);
+ unsigned long context = (unsigned long)&REG_SP(regs) & ~(THREAD_SIZE - 1);
#ifdef STP_USE_FRAME_POINTER
- /* FIXME: need to use _stp_func_print() and safe copy */
unsigned long addr;
-
-#ifdef STAPCONF_X86_UNIREGS
- unsigned long ebp = regs->bp;
-#else
- unsigned long ebp = regs->ebp;
-#endif /* STAPCONF_X86_UNIREGS */
-
- while (_stp_valid_stack_ptr(context, (unsigned long)ebp) &&
- !_stp_pbuf_full()) {
- if (unlikely(_stp_read_address(addr, (unsigned long *)(ebp + 4), KERNEL_DS))) {
+ unsigned long next_fp, fp = REG_FP(regs);
+
+ while (levels && _stp_valid_stack_ptr(context, (unsigned long)fp)) {
+ if (unlikely(_stp_read_address(addr, (unsigned long *)(fp + 4), KERNEL_DS))) {
/* cannot access stack. give up. */
return;
}
- if (verbose) {
- _stp_print_char(' ');
- _stp_symbol_print (addr);
- _stp_print_char('\n');
- } else
- _stp_printf ("0x%08lx ", addr);
- ebp = *(unsigned long *)ebp;
+ _stp_func_print(addr, verbose, 1);
+ if (unlikely(_stp_read_address(next_fp, (unsigned long *)fp, KERNEL_DS))) {
+ /* cannot access stack. give up. */
+ return;
+ }
+ levels--;
+
+ /* frame pointers move upwards */
+ if (next_fp <= fp)
+ break;
+ fp = next_fp;
}
#else
struct unwind_frame_info info;
arch_unw_init_frame_info(&info, regs);
- while (!arch_unw_user_mode(&info) &&
- !_stp_pbuf_full ()) {
+ while (levels && !arch_unw_user_mode(&info)) {
int ret = unwind(&info);
dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info));
if (ret == 0) {
_stp_func_print(UNW_PC(&info), verbose, 1);
+ levels--;
continue;
}
/* If an error happened or we hit a kretprobe trampoline, use fallback backtrace */
/* FIXME: is there a way to unwind across kretprobe trampolines? */
if (ret < 0 || (ret > 0 && UNW_PC(&info) == _stp_kretprobe_trampoline))
- _stp_stack_print_fallback(context, UNW_SP(&info), verbose);
+ _stp_stack_print_fallback(context, UNW_SP(&info), verbose, levels);
break;
}
#endif /* STP_USE_FRAME_POINTER */
diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c
index 9915c594..729b8a2a 100644
--- a/runtime/stack-x86_64.c
+++ b/runtime/stack-x86_64.c
@@ -9,37 +9,42 @@
*/
/* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */
-static void _stp_stack_print_fallback(unsigned long stack, int verbose)
+static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels)
{
unsigned long addr;
- while (stack & (THREAD_SIZE - 1) &&
- !_stp_pbuf_full()) {
+ while (levels && stack & (THREAD_SIZE - 1)) {
if (unlikely(_stp_read_address(addr, (unsigned long *)stack, KERNEL_DS))) {
/* cannot access stack. give up. */
return;
}
- _stp_func_print(addr, verbose, 0);
+ if (_stp_func_print(addr, verbose, 0))
+ levels--;
stack++;
}
}
static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels)
{
+#ifdef STP_USE_DWARF_UNWINDER
// FIXME: large stack allocation
struct unwind_frame_info info;
arch_unw_init_frame_info(&info, regs);
- while (!arch_unw_user_mode(&info)) {
+ while (levels && !arch_unw_user_mode(&info)) {
int ret = unwind(&info);
dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info));
if (ret == 0) {
_stp_func_print(UNW_PC(&info), verbose, 1);
+ levels--;
continue;
}
/* If an error happened or we hit a kretprobe trampoline, use fallback backtrace */
/* FIXME: is there a way to unwind across kretprobe trampolines? */
if (ret < 0 || (ret > 0 && UNW_PC(&info) == _stp_kretprobe_trampoline))
- _stp_stack_print_fallback(UNW_SP(&info), verbose);
+ _stp_stack_print_fallback(UNW_SP(&info), verbose, levels);
break;
}
+#else /* ! STP_USE_DWARF_UNWINDER */
+ _stp_stack_print_fallback(REG_SP(regs), verbose);
+#endif
}
diff --git a/runtime/stack.c b/runtime/stack.c
index 772c5baf..23ac2edc 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -47,7 +47,7 @@
* @param regs A pointer to the struct pt_regs.
*/
-void _stp_stack_print(struct pt_regs *regs, int verbose, struct kretprobe_instance *pi)
+void _stp_stack_print(struct pt_regs *regs, int verbose, struct kretprobe_instance *pi, int levels)
{
if (verbose) {
/* print the current address */
@@ -66,7 +66,7 @@ void _stp_stack_print(struct pt_regs *regs, int verbose, struct kretprobe_instan
else
_stp_printf("%p ", (int64_t) REG_IP(regs));
- __stp_stack_print(regs, verbose, 0);
+ __stp_stack_print(regs, verbose, levels);
}
/** Writes stack backtrace to a string
@@ -75,14 +75,14 @@ void _stp_stack_print(struct pt_regs *regs, int verbose, struct kretprobe_instan
* @param regs A pointer to the struct pt_regs.
* @returns void
*/
-void _stp_stack_snprint(char *str, int size, struct pt_regs *regs, int verbose, struct kretprobe_instance *pi)
+void _stp_stack_snprint(char *str, int size, struct pt_regs *regs, int verbose, struct kretprobe_instance *pi, int levels)
{
/* To get a string, we use a simple trick. First flush the print buffer, */
/* then call _stp_stack_print, then copy the result into the output string */
/* and clear the print buffer. */
_stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id());
_stp_print_flush();
- _stp_stack_print(regs, verbose, pi);
+ _stp_stack_print(regs, verbose, pi, levels);
strlcpy(str, pb->buf, size < (int)pb->len ? size : (int)pb->len);
pb->len = 0;
}
diff --git a/runtime/sym.c b/runtime/sym.c
index 3d5ff01d..7163bf92 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -223,8 +223,7 @@ void _stp_symbol_print(unsigned long address)
}
/* Like _stp_symbol_print, except only print if the address is a valid function address */
-
-void _stp_func_print(unsigned long address, int verbose, int exact)
+int _stp_func_print(unsigned long address, int verbose, int exact)
{
char *modname;
const char *name;
@@ -247,7 +246,9 @@ void _stp_func_print(unsigned long address, int verbose, int exact)
_stp_printf(" %p : %s+%#lx/%#lx%s\n", (int64_t) address, name, offset, size, exstr);
} else
_stp_printf("%p ", (int64_t) address);
+ return 1;
}
+ return 0;
}
void _stp_symbol_snprint(char *str, size_t len, unsigned long address)
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index b3a159e3..807f6eda 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,14 @@
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6410
+ * symbols.c (_stp_do_unwind_data): Tolerate !STP_USE_DWARF_UNWINDER.
+
+2008-04-15 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 6405
+ * symbols.c (_stp_load_module_symbols): Support older kernels
+ without module->sect_attrs->nsections.
+
2008-04-09 Martin Hunt <hunt@dragon>
* symbols.c (_stp_init_kernel_symbols): Print error
diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c
index b0e7c319..087bf893 100644
--- a/runtime/transport/symbols.c
+++ b/runtime/transport/symbols.c
@@ -290,7 +290,9 @@ static void _stp_do_unwind_data(const char __user *buf, size_t count)
goto done;
}
m->unwind_data_len = count;
+#ifdef STP_USE_DWARF_UNWINDER
_stp_create_unwind_hdr(m);
+#endif
done:
write_unlock(&m->lock);
}
@@ -401,14 +403,25 @@ static int _stp_section_is_interesting(const char *name)
static struct _stp_module *_stp_load_module_symbols(struct module *mod)
{
int i, num, overflow = 0;
- struct module_sect_attrs *sa;
+ struct module_sect_attrs *sa = mod->sect_attrs;
+ struct attribute_group *sag = & sa->grp;
unsigned sect_size = 0, sect_num = 0, sym_size, sym_num;
struct _stp_module *sm;
char *dataptr, *endptr;
+ unsigned nsections = 0;
+
+#ifdef STAPCONF_MODULE_NSECTIONS
+ nsections = sa->nsections;
+#else
+ /* count section attributes on older kernel */
+ struct attribute** gattr;
+ for (gattr = sag->attrs; *gattr; gattr++)
+ nsections++;
+ dbug_sym(2, "\tcount %d\n", nsections);
+#endif
- sa = mod->sect_attrs;
/* calculate how much space to allocate for section strings */
- for (i = 0; i < sa->nsections; i++) {
+ for (i = 0; i < nsections; i++) {
if (_stp_section_is_interesting(sa->attrs[i].name)) {
sect_num++;
sect_size += strlen(sa->attrs[i].name) + 1;
@@ -438,7 +451,7 @@ static struct _stp_module *_stp_load_module_symbols(struct module *mod)
dataptr = (char *)((long)sm->sections + sect_num * sizeof(struct _stp_symbol));
endptr = (char *)((long)sm->sections + sect_size);
num = 0;
- for (i = 0; i < sa->nsections; i++) {
+ for (i = 0; i < nsections; i++) {
size_t len, maxlen;
if (_stp_section_is_interesting(sa->attrs[i].name)) {
sm->sections[num].addr = sa->attrs[i].address;
diff --git a/runtime/unwind.c b/runtime/unwind.c
index f0010372..aa270cad 100644
--- a/runtime/unwind.c
+++ b/runtime/unwind.c
@@ -15,6 +15,8 @@
#include "unwind/unwind.h"
+#ifdef STP_USE_DWARF_UNWINDER
+
struct eh_frame_hdr_table_entry {
unsigned long start, fde;
};
@@ -957,3 +959,6 @@ done:
#undef CASES
#undef FRAME_REG
}
+
+
+#endif /* STP_USE_DWARF_UNWINDER */
diff --git a/runtime/unwind/i386.h b/runtime/unwind/i386.h
index 1f69b4a9..79e6ba73 100644
--- a/runtime/unwind/i386.h
+++ b/runtime/unwind/i386.h
@@ -34,15 +34,6 @@ struct unwind_frame_info
#define UNW_PC(frame) (frame)->regs.ip
#define UNW_SP(frame) (frame)->regs.sp
-#ifdef STP_USE_FRAME_POINTER
-#define UNW_FP(frame) (frame)->regs.bp
-#define FRAME_RETADDR_OFFSET 4
-#define FRAME_LINK_OFFSET 0
-#define STACK_BOTTOM(tsk) STACK_LIMIT((tsk)->thread.sp0)
-#define STACK_TOP(tsk) ((tsk)->thread.sp0)
-#else
-#define UNW_FP(frame) ((void)(frame), 0)
-#endif
#define UNW_REGISTER_INFO \
PTREGS_INFO(ax), \
@@ -59,15 +50,6 @@ struct unwind_frame_info
#define UNW_PC(frame) (frame)->regs.eip
#define UNW_SP(frame) (frame)->regs.esp
-#ifdef STP_USE_FRAME_POINTER
-#define UNW_FP(frame) (frame)->regs.ebp
-#define FRAME_RETADDR_OFFSET 4
-#define FRAME_LINK_OFFSET 0
-#define STACK_BOTTOM(tsk) STACK_LIMIT((tsk)->thread.esp0)
-#define STACK_TOP(tsk) ((tsk)->thread.esp0)
-#else
-#define UNW_FP(frame) ((void)(frame), 0)
-#endif
#define UNW_REGISTER_INFO \
PTREGS_INFO(eax), \
diff --git a/runtime/unwind/unwind.h b/runtime/unwind/unwind.h
index 8651cb9e..ae5e75d3 100644
--- a/runtime/unwind/unwind.h
+++ b/runtime/unwind/unwind.h
@@ -13,6 +13,8 @@
#ifndef _STP_UNWIND_H_
#define _STP_UNWIND_H_
+#ifdef STP_USE_DWARF_UNWINDER
+
#if defined (__x86_64__)
#include "x86_64.h"
#elif defined (__i386__)
@@ -139,4 +141,6 @@ static const u32 bad_cie, not_fde;
static const u32 *cie_for_fde(const u32 *fde, const struct _stp_module *);
static signed fde_pointer_type(const u32 *cie);
+
+#endif /* STP_USE_DWARF_UNWINDER */
#endif /*_STP_UNWIND_H_*/
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index dae8b452..c4c526f4 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-15 Martin Hunt <hunt@monkey>
+
+ * context.stp (print_backtrace, backtrace): Use MAXTRACE.
+
2008-03-21 Eugene Teo <eugeneteo@kernel.sg>
PR 5528
diff --git a/tapset/context.stp b/tapset/context.stp
index 4aa75158..dc560316 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -15,7 +15,7 @@ function print_regs () %{
function print_backtrace () %{
if (CONTEXT->regs) {
- _stp_stack_print(CONTEXT->regs, 1, CONTEXT->pi);
+ _stp_stack_print(CONTEXT->regs, 1, CONTEXT->pi, MAXTRACE);
} else {
_stp_printf("Systemtap probe: %s\n", CONTEXT->probe_point);
}
@@ -23,7 +23,7 @@ function print_backtrace () %{
function backtrace:string () %{ /* pure */
if (CONTEXT->regs)
- _stp_stack_snprint (THIS->__retvalue, MAXSTRINGLEN, CONTEXT->regs, 0, CONTEXT->pi);
+ _stp_stack_snprint (THIS->__retvalue, MAXSTRINGLEN, CONTEXT->regs, 0, CONTEXT->pi, MAXTRACE);
else
strlcpy (THIS->__retvalue, "", MAXSTRINGLEN);
%}
diff --git a/tapsets.cxx b/tapsets.cxx
index a7f8034e..7d377d40 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -104,7 +104,6 @@ struct be_derived_probe: public derived_probe
struct be_derived_probe_group: public generic_dpg<be_derived_probe>
{
public:
- void emit_module_header (systemtap_session& ) { };
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -2069,7 +2068,6 @@ private:
public:
void enroll (dwarf_derived_probe* probe);
- void emit_module_header (systemtap_session& s);
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -3929,22 +3927,17 @@ dwarf_derived_probe_group::enroll (dwarf_derived_probe* p)
void
-dwarf_derived_probe_group::emit_module_header (systemtap_session& s)
+dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
{
if (probes_by_module.empty()) return;
- // Warn of misconfigured kernels
+ s.op->newline() << "/* ---- dwarf probes ---- */";
+
+ // Warn of misconfigured kernels
s.op->newline() << "#if ! defined(CONFIG_KPROBES)";
s.op->newline() << "#error \"Need CONFIG_KPROBES!\"";
s.op->newline() << "#endif";
-}
-
-void
-dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
-{
- if (probes_by_module.empty()) return;
-
- s.op->newline() << "/* ---- dwarf probes ---- */";
+ s.op->newline();
// Forward declare the master entry functions
s.op->newline() << "static int enter_kprobe_probe (struct kprobe *inst,";
@@ -4271,7 +4264,6 @@ struct uprobe_derived_probe: public derived_probe
struct uprobe_derived_probe_group: public generic_dpg<uprobe_derived_probe>
{
public:
- void emit_module_header (systemtap_session& s);
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -4321,9 +4313,10 @@ struct uprobe_builder: public derived_probe_builder
void
-uprobe_derived_probe_group::emit_module_header (systemtap_session& s)
+uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
{
if (probes.empty()) return;
+ s.op->newline() << "/* ---- user probes ---- */";
// If uprobes isn't in the kernel, pull it in from the runtime.
s.op->newline() << "#if defined(CONFIG_UPROBES) || defined(CONFIG_UPROBES_MODULE)";
@@ -4331,14 +4324,6 @@ uprobe_derived_probe_group::emit_module_header (systemtap_session& s)
s.op->newline() << "#else";
s.op->newline() << "#include \"uprobes/uprobes.h\"";
s.op->newline() << "#endif";
-}
-
-
-void
-uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
-{
- if (probes.empty()) return;
- s.op->newline() << "/* ---- user probes ---- */";
s.op->newline() << "struct stap_uprobe {";
s.op->newline(1) << "union { struct uprobe up; struct uretprobe urp; };";
@@ -4457,7 +4442,6 @@ struct timer_derived_probe_group: public generic_dpg<timer_derived_probe>
{
void emit_interval (translator_output* o);
public:
- void emit_module_header (systemtap_session& ) { };
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -4599,7 +4583,6 @@ struct profile_derived_probe: public derived_probe
struct profile_derived_probe_group: public generic_dpg<profile_derived_probe>
{
public:
- void emit_module_header (systemtap_session& ) { };
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -4767,7 +4750,6 @@ public:
has_read_probes(false), has_write_probes(false) {}
void enroll (procfs_derived_probe* probe);
- void emit_module_header (systemtap_session& ) { };
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -5243,7 +5225,6 @@ struct mark_derived_probe: public derived_probe
struct mark_derived_probe_group: public generic_dpg<mark_derived_probe>
{
public:
- void emit_module_header (systemtap_session& s);
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -5610,7 +5591,19 @@ void
mark_derived_probe::join_group (systemtap_session& s)
{
if (! s.mark_derived_probes)
- s.mark_derived_probes = new mark_derived_probe_group ();
+ {
+ s.mark_derived_probes = new mark_derived_probe_group ();
+
+ // Make sure <linux/marker.h> is included early.
+ embeddedcode *ec = new embeddedcode;
+ ec->tok = NULL;
+ ec->code = string("#if ! defined(CONFIG_MARKERS)\n")
+ + string("#error \"Need CONFIG_MARKERS!\"\n")
+ + string("#endif\n")
+ + string("#include <linux/marker.h>\n");
+
+ s.embeds.push_back(ec);
+ }
s.mark_derived_probes->enroll (this);
}
@@ -5682,20 +5675,6 @@ mark_derived_probe::initialize_probe_context_vars (translator_output* o)
void
-mark_derived_probe_group::emit_module_header (systemtap_session& s)
-{
- if (probes.empty())
- return;
-
- // Warn of misconfigured kernels
- s.op->newline() << "#if ! defined(CONFIG_MARKERS)";
- s.op->newline() << "#error \"Need CONFIG_MARKERS!\"";
- s.op->newline() << "#endif";
- s.op->newline() << "#include <linux/marker.h>";
- s.op->newline();
-}
-
-void
mark_derived_probe_group::emit_module_decls (systemtap_session& s)
{
if (probes.empty())
@@ -5958,7 +5937,6 @@ struct hrtimer_derived_probe_group: public generic_dpg<hrtimer_derived_probe>
{
void emit_interval (translator_output* o);
public:
- void emit_module_header (systemtap_session& ) { };
void emit_module_decls (systemtap_session& s);
void emit_module_init (systemtap_session& s);
void emit_module_exit (systemtap_session& s);
@@ -6314,7 +6292,6 @@ public:
struct perfmon_derived_probe_group: public generic_dpg<perfmon_derived_probe>
{
public:
- void emit_module_header (systemtap_session& ) { };
void emit_module_decls (systemtap_session&) {}
void emit_module_init (systemtap_session&) {}
void emit_module_exit (systemtap_session&) {}
diff --git a/translate.cxx b/translate.cxx
index 776e6770..1b812ec1 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -849,10 +849,6 @@ translator_output::line ()
void
c_unparser::emit_common_header ()
{
- vector<derived_probe_group*> g = all_session_groups (*session);
- for (unsigned i=0; i<g.size(); i++)
- g[i]->emit_module_header (*session);
-
o->newline();
o->newline() << "typedef char string_t[MAXSTRINGLEN];";
o->newline();