From 6d05e34f799ac14ccd7f0adab39986b8b6d89939 Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 10 Apr 2008 15:00:08 -0500 Subject: 2008-04-10 David Smith * elaborate.h (struct derived_probe_group): Added emit_module_header virtual function. * translate.cxx (c_unparser::emit_common_header): Calls each probe group's emit_module_header function. (translate_pass): Moved inclusion of linux/marker.h to mark_derived_probe_group::emit_module_header(). * tapsets.cxx (struct be_derived_probe_group): Added empty emit_module_header function. (struct dwarf_derived_probe_group): Ditto. (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. (uprobe_derived_probe_group::emit_module_header): Moved uprobe kernel check from emit_module_decls() to here. (uprobe_derived_probe_group::emit_module_decls): Moved uprobe kernel check to emit_module_header(). (mark_derived_probe_group::emit_module_header): Moved marker kernel check from emit_module_decls and translate_pass() to here. (uprobe_derived_probe_group::emit_module_decls): Moved marker kernel check to emit_module_header(). --- ChangeLog | 25 +++++++++++++++++++++++++ elaborate.h | 6 ++++++ tapsets.cxx | 51 ++++++++++++++++++++++++++++++++++++++++++--------- translate.cxx | 9 +++++---- 4 files changed, 78 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d2853d2..18a3aab1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2008-04-10 David Smith + + * elaborate.h (struct derived_probe_group): Added + emit_module_header virtual function. + * translate.cxx (c_unparser::emit_common_header): Calls each probe + group's emit_module_header function. + (translate_pass): Moved inclusion of linux/marker.h to + mark_derived_probe_group::emit_module_header(). + * tapsets.cxx (struct be_derived_probe_group): Added empty + emit_module_header function. + (struct dwarf_derived_probe_group): Ditto. + (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. + (uprobe_derived_probe_group::emit_module_header): Moved uprobe + kernel check from emit_module_decls() to here. + (uprobe_derived_probe_group::emit_module_decls): Moved uprobe + kernel check to emit_module_header(). + (mark_derived_probe_group::emit_module_header): Moved marker + kernel check from emit_module_decls and translate_pass() to here. + (uprobe_derived_probe_group::emit_module_decls): Moved marker + kernel check to emit_module_header(). + 2008-04-09 David Smith * .gitignore: Added more files to ignore. diff --git a/elaborate.h b/elaborate.h index fc8fbbcb..1a029e3c 100644 --- a/elaborate.h +++ b/elaborate.h @@ -148,6 +148,12 @@ 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/tapsets.cxx b/tapsets.cxx index ceda9015..c269ce05 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -104,6 +104,7 @@ struct be_derived_probe: public derived_probe struct be_derived_probe_group: public generic_dpg { 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); @@ -2068,6 +2069,7 @@ private: public: void enroll (dwarf_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); @@ -3931,13 +3933,18 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) { if (probes_by_module.empty()) return; - s.op->newline() << "/* ---- dwarf probes ---- */"; - - // Warn of misconfigured kernels + // Warn of misconfigured kernels s.op->newline() << "#if ! defined(CONFIG_KPROBES)"; s.op->newline() << "#error \"Need CONFIG_KPROBES!\""; s.op->newline() << "#endif"; - s.op->newline(); +} + +void +dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) +{ + if (probes_by_module.empty()) return; + + s.op->newline() << "/* ---- dwarf probes ---- */"; // Forward declare the master entry functions s.op->newline() << "static int enter_kprobe_probe (struct kprobe *inst,"; @@ -4264,6 +4271,7 @@ struct uprobe_derived_probe: public derived_probe struct uprobe_derived_probe_group: public generic_dpg { 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); @@ -4313,10 +4321,9 @@ struct uprobe_builder: public derived_probe_builder void -uprobe_derived_probe_group::emit_module_decls (systemtap_session& s) +uprobe_derived_probe_group::emit_module_header (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)"; @@ -4324,6 +4331,14 @@ uprobe_derived_probe_group::emit_module_decls (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; };"; @@ -4442,6 +4457,7 @@ struct timer_derived_probe_group: public generic_dpg { 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); @@ -4583,6 +4599,7 @@ struct profile_derived_probe: public derived_probe struct profile_derived_probe_group: public generic_dpg { 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); @@ -4711,6 +4728,7 @@ profile_derived_probe_group::emit_module_exit (systemtap_session& s) } + // ------------------------------------------------------------------------ // procfs file derived probes // ------------------------------------------------------------------------ @@ -4749,6 +4767,7 @@ 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); @@ -5189,6 +5208,7 @@ procfs_builder::build(systemtap_session & sess, } + // ------------------------------------------------------------------------ // statically inserted macro-based derived probes // ------------------------------------------------------------------------ @@ -5223,6 +5243,7 @@ struct mark_derived_probe: public derived_probe struct mark_derived_probe_group: public generic_dpg { 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); @@ -5661,18 +5682,26 @@ mark_derived_probe::initialize_probe_context_vars (translator_output* o) void -mark_derived_probe_group::emit_module_decls (systemtap_session& s) +mark_derived_probe_group::emit_module_header (systemtap_session& s) { if (probes.empty()) return; - s.op->newline() << "/* ---- marker probes ---- */"; - // 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 "; s.op->newline(); +} + +void +mark_derived_probe_group::emit_module_decls (systemtap_session& s) +{ + if (probes.empty()) + return; + + s.op->newline() << "/* ---- marker probes ---- */"; s.op->newline() << "struct stap_marker_probe {"; s.op->newline(1) << "const char * const name;"; @@ -5887,6 +5916,7 @@ mark_builder::build(systemtap_session & sess, } + // ------------------------------------------------------------------------ // hrtimer derived probes // ------------------------------------------------------------------------ @@ -5928,6 +5958,7 @@ struct hrtimer_derived_probe_group: public generic_dpg { 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); @@ -6180,6 +6211,7 @@ timer_builder::register_patterns(match_node *root) } + // ------------------------------------------------------------------------ // perfmon derived probes // ------------------------------------------------------------------------ @@ -6282,6 +6314,7 @@ public: struct perfmon_derived_probe_group: public generic_dpg { 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 c9ec094a..ba848d43 100644 --- a/translate.cxx +++ b/translate.cxx @@ -849,6 +849,11 @@ translator_output::line () void c_unparser::emit_common_header () { + vector g = all_session_groups (*session); + for (unsigned i=0; iemit_module_header (*session); + + o->newline(); o->newline() << "typedef char string_t[MAXSTRINGLEN];"; o->newline(); o->newline() << "#define STAP_SESSION_STARTING 0"; @@ -4526,10 +4531,6 @@ translate_pass (systemtap_session& s) s.op->newline() << "#define read_trylock(x) ({ read_lock(x); 1; })"; s.op->newline() << "#endif"; - s.op->newline() << "#if defined(CONFIG_MARKERS)"; - s.op->newline() << "#include "; - s.op->newline() << "#endif"; - s.up->emit_common_header (); // context etc. for (unsigned i=0; i Date: Mon, 14 Apr 2008 12:31:22 -0400 Subject: PR6400: support bundled elfutils for stapio 2008-04-14 Frank Ch. Eigler * Makefile.am (stapio_*): Become able to link/compile against bundled elfutils. * Makefile.in: Regenerated. --- ChangeLog | 6 ++++++ Makefile.am | 9 +++++++- Makefile.in | 72 +++++++++++++++++++++++++++++++++---------------------------- 3 files changed, 53 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f3d347a..f0ca0a67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-14 Frank Ch. Eigler + + * Makefile.am (stapio_*): Become able to link/compile against + bundled elfutils. + * Makefile.in: Regenerated. + 2008-04-09 Martin Hunt * buildrun.cxx (run_pass): Remove unused "-d" option diff --git a/Makefile.am b/Makefile.am index 66df81cf..f6061da0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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..26080a85 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) \ @@ -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 -- cgit From 775d51e5fb2f379fe4ae15dcbae8b17e4eab8805 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 14 Apr 2008 12:22:53 -0500 Subject: 2008-04-14 David Smith * 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. --- ChangeLog | 19 ++++++++++++++++++ elaborate.h | 6 ------ tapsets.cxx | 63 +++++++++++++++++++---------------------------------------- translate.cxx | 4 ---- 4 files changed, 39 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0ca0a67..a9c22930 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2008-04-14 David Smith + + * 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 * Makefile.am (stapio_*): Become able to link/compile against 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/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 { 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 { 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 { 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 { 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 { 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 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 \n"); + + s.embeds.push_back(ec); + } s.mark_derived_probes->enroll (this); } @@ -5681,20 +5674,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 "; - s.op->newline(); -} - void mark_derived_probe_group::emit_module_decls (systemtap_session& s) { @@ -5958,7 +5937,6 @@ struct hrtimer_derived_probe_group: public generic_dpg { 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 { 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 g = all_session_groups (*session); - for (unsigned i=0; iemit_module_header (*session); - o->newline(); o->newline() << "typedef char string_t[MAXSTRINGLEN];"; o->newline(); -- cgit From 7eb702bfb612c4c65b4d834ab3c1995e744a4945 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 14 Apr 2008 12:58:32 -0500 Subject: 2008-04-14 David Smith * .gitignore: Added 'Makefile'. --- .gitignore | 1 + 1 file changed, 1 insertion(+) 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 -- cgit From 184b2d42207667089c20208d8c63c4fcb2d481aa Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 15 Apr 2008 00:02:27 -0400 Subject: unwinder build fix for STACK_{TOP,BOTTOM} macro name collisions 2008-04-15 Frank Ch. Eigler * 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). --- runtime/ChangeLog | 6 ++++++ runtime/unwind/i386.h | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 09a3e35d..69eb6c36 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,9 @@ +2008-04-15 Frank Ch. Eigler + + * 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 * print.c (_stp_pbuf_full): New function to note full print buffer. diff --git a/runtime/unwind/i386.h b/runtime/unwind/i386.h index 1f69b4a9..6511f76a 100644 --- a/runtime/unwind/i386.h +++ b/runtime/unwind/i386.h @@ -38,8 +38,8 @@ struct unwind_frame_info #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) +/* #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 @@ -63,8 +63,8 @@ struct unwind_frame_info #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) +/* #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 -- cgit From d9bdb83d6f14ddfb2980b62655a12cd11771af88 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 15 Apr 2008 01:22:46 -0400 Subject: PR6405: unwinder build compatibility with RHEL5 --- ChangeLog | 5 +++++ buildrun.cxx | 2 +- runtime/ChangeLog | 5 +++++ runtime/autoconf-module-nsections.c | 8 ++++++++ runtime/transport/ChangeLog | 6 ++++++ runtime/transport/symbols.c | 19 +++++++++++++++---- 6 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 runtime/autoconf-module-nsections.c diff --git a/ChangeLog b/ChangeLog index a9c22930..0aee4d96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-15 Frank Ch. Eigler + + PR 6405 + * buildrun.cxx (compile_pass): Add STAPCONF_MODULE_NSECTIONS. + 2008-04-14 David Smith * elaborate.h (struct derived_probe_group): Removed 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 + + PR 6405 + * autoconf-module-nsections.c: New file. + 2008-04-15 Frank Ch. Eigler * unwind/i386.h (STACK_BOTTOM, STACK_TOP): Comment out these 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 + +struct module_sect_attrs x; + +void foo (void) +{ + (void) x.nsections; +} diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index b3a159e3..f031c088 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,9 @@ +2008-04-15 Frank Ch. Eigler + + PR 6405 + * symbols.c (_stp_load_module_symbols): Support older kernels + without module->sect_attrs->nsections. + 2008-04-09 Martin Hunt * symbols.c (_stp_init_kernel_symbols): Print error diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index b0e7c319..8cce2fd4 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -401,14 +401,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 +449,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; -- cgit From 8558d3925ee2931b654a19f243bfa8b3be0bfc12 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 15 Apr 2008 01:24:19 -0400 Subject: PR6405, start of rhel4 compatibility --- ChangeLog | 6 ++++++ Makefile.am | 2 +- Makefile.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0aee4d96..8a1e89a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-15 Frank Ch. Eigler + + 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 PR 6405 diff --git a/Makefile.am b/Makefile.am index f6061da0..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 diff --git a/Makefile.in b/Makefile.in index 26080a85..e1db0a3d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -271,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 \ -- cgit From ca1655b01e0f15289f5b8e7b760373c733cbdd83 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 15 Apr 2008 17:44:32 -0400 Subject: PR6410: unwinder-less architecture tolerance --- runtime/ChangeLog | 6 ++++++ runtime/stack-x86_64.c | 4 ++++ runtime/transport/ChangeLog | 5 +++++ runtime/transport/symbols.c | 2 ++ runtime/unwind.c | 5 +++++ runtime/unwind/unwind.h | 4 ++++ 6 files changed, 26 insertions(+) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index b33fa22a..98ca569e 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,9 @@ +2008-04-15 Frank Ch. Eigler + + 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 PR 6405 diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 9915c594..c3b171ea 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -25,6 +25,7 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose) 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); @@ -42,4 +43,7 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) _stp_stack_print_fallback(UNW_SP(&info), verbose); break; } +#else /* ! STP_USE_DWARF_UNWINDER */ + _stp_stack_print_fallback(REG_SP(regs), verbose); +#endif } diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index f031c088..807f6eda 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,8 @@ +2008-04-15 Frank Ch. Eigler + + PR 6410 + * symbols.c (_stp_do_unwind_data): Tolerate !STP_USE_DWARF_UNWINDER. + 2008-04-15 Frank Ch. Eigler PR 6405 diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 8cce2fd4..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); } 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/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_*/ -- cgit From 4f7a75f2cb3394290d1093a031546aa848ace929 Mon Sep 17 00:00:00 2001 From: Martin Hunt Date: Tue, 15 Apr 2008 21:10:34 -0400 Subject: 2.6.25 fixes and stack level limits. --- runtime/ChangeLog | 16 ++++++++++++++++ runtime/regs.h | 4 +++- runtime/runtime.h | 4 ++++ runtime/stack-i386.c | 50 +++++++++++++++++++++++--------------------------- runtime/stack.c | 8 ++++---- runtime/sym.c | 5 +++-- runtime/unwind/i386.h | 18 ------------------ tapset/ChangeLog | 4 ++++ tapset/context.stp | 4 ++-- 9 files changed, 59 insertions(+), 54 deletions(-) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index b33fa22a..5066279e 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,19 @@ +2008-04-15 Martin Hunt + + 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 PR 6405 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 *)®_SP(regs); - unsigned long context = (unsigned long)stack & ~(THREAD_SIZE - 1); + unsigned long context = (unsigned long)®_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.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/unwind/i386.h b/runtime/unwind/i386.h index 6511f76a..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/tapset/ChangeLog b/tapset/ChangeLog index dae8b452..c4c526f4 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,7 @@ +2008-04-15 Martin Hunt + + * context.stp (print_backtrace, backtrace): Use MAXTRACE. + 2008-03-21 Eugene Teo 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); %} -- cgit From 8a49d1d23c77033bf98fc7b139b37f83e3e0eb49 Mon Sep 17 00:00:00 2001 From: Martin Hunt Date: Tue, 15 Apr 2008 21:46:36 -0400 Subject: Count stack levels printed on x86_64 too. --- runtime/ChangeLog | 5 +++++ runtime/stack-x86_64.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index d7cf674d..7184a980 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2008-04-15 hunt + + * stack-x86_64.c (_stp_stack_print_fallback): Add levels. + (__stp_stack_print): Count levels properly. + 2008-04-15 Martin Hunt Finish support for limits on backtrace depth. diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index c3b171ea..729b8a2a 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -9,16 +9,16 @@ */ /* 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++; } } @@ -30,17 +30,18 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) 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 */ -- cgit