diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-03-17 16:58:35 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-03-17 16:58:35 +0100 |
commit | bf33ee46c8fff4d181b7f28521f12175bd32ec77 (patch) | |
tree | 5e0a9e1047af60389eee36da54182b52d3d53ee7 | |
parent | 524c6f82b0a3c010d0fd6a67b1afcfbf55b789a6 (diff) | |
parent | 30cb532a560ed152b86506b80490e99195970271 (diff) | |
download | systemtap-steved-bf33ee46c8fff4d181b7f28521f12175bd32ec77.tar.gz systemtap-steved-bf33ee46c8fff4d181b7f28521f12175bd32ec77.tar.xz systemtap-steved-bf33ee46c8fff4d181b7f28521f12175bd32ec77.zip |
Merge branch 'master' into pr6866
Resolved conflicts:
runtime/task_finder.c: name vs path.
154 files changed, 12939 insertions, 2000 deletions
@@ -2,6 +2,7 @@ Ananth N Mavinakayanahalli Anil Keshavamurthy Anithra Janakiraman Charles Spirakis +Dan Horak Dave Brolley Dave Nomura David Smith @@ -24,6 +25,7 @@ Mark McLoughlin Mark Wielaard Martin Hunt Masami Hiramatsu +Maynard Johnson Michael Meeks Mike Mason Nobuhiro Tachino diff --git a/Makefile.am b/Makefile.am index 4c84309c..9681381d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -101,11 +101,6 @@ stamp-elfutils: config.status stap_DEPENDENCIES += lib-elfutils/libdw.so lib-elfutils/libdw.so: stamp-elfutils ; -pkglib_LIBRARIES = libsduprobes.a -libsduprobes_a_SOURCES = runtime/sduprobes.c -sduprobes.o: runtime/sduprobes.c - $(CC) -g -O0 -c -o $@ $< - PHONIES += install-elfutils install-elfutils: mkdir -p $(DESTDIR)$(pkglibdir) diff --git a/Makefile.in b/Makefile.in index 000b6b89..73ef5bac 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,7 +18,6 @@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -90,26 +89,12 @@ CONFIG_CLEAN_FILES = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 \ man/stapprobes.scsi.5 man/stapprobes.signal.5 \ man/stapprobes.socket.5 man/stapprobes.tcp.5 \ man/stapprobes.udp.5 initscript/systemtap run-stap -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ - "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(oldincludedir)" -pkglibLIBRARIES_INSTALL = $(INSTALL_DATA) -LIBRARIES = $(pkglib_LIBRARIES) -AR = ar -ARFLAGS = cru -libsduprobes_a_AR = $(AR) $(ARFLAGS) -libsduprobes_a_LIBADD = -@BUILD_ELFUTILS_TRUE@am_libsduprobes_a_OBJECTS = sduprobes.$(OBJEXT) -libsduprobes_a_OBJECTS = $(am_libsduprobes_a_OBJECTS) @BUILD_SERVER_TRUE@am__EXEEXT_1 = stap-client-connect$(EXEEXT) \ @BUILD_SERVER_TRUE@ stap-server-connect$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" \ + "$(DESTDIR)$(oldincludedir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) pkglibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglibexec_PROGRAMS) @@ -168,10 +153,9 @@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ -SOURCES = $(libsduprobes_a_SOURCES) $(loc2c_test_SOURCES) \ - $(stap_SOURCES) $(stap_client_connect_SOURCES) \ - $(stap_server_connect_SOURCES) $(stapio_SOURCES) \ - $(staprun_SOURCES) +SOURCES = $(loc2c_test_SOURCES) $(stap_SOURCES) \ + $(stap_client_connect_SOURCES) $(stap_server_connect_SOURCES) \ + $(stapio_SOURCES) $(staprun_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -184,6 +168,12 @@ man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; oldincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(oldinclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ @@ -298,7 +288,6 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -343,8 +332,6 @@ stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ $(am__append_5) @BUILD_SERVER_TRUE@stap_client_connect_LDFLAGS = $(AM_LDFLAGS) @BUILD_SERVER_TRUE@stap_server_connect_LDFLAGS = $(AM_LDFLAGS) PHONIES = $(am__append_9) $(am__append_10) dist-gzip -@BUILD_ELFUTILS_TRUE@pkglib_LIBRARIES = libsduprobes.a -@BUILD_ELFUTILS_TRUE@libsduprobes_a_SOURCES = runtime/sduprobes.c staprun_SOURCES = runtime/staprun/staprun.c runtime/staprun/staprun_funcs.c\ runtime/staprun/ctl.c runtime/staprun/common.c @@ -485,39 +472,6 @@ initscript/systemtap: $(top_builddir)/config.status $(top_srcdir)/initscript/sys cd $(top_builddir) && $(SHELL) ./config.status $@ run-stap: $(top_builddir)/config.status $(srcdir)/run-stap.in cd $(top_builddir) && $(SHELL) ./config.status $@ -install-pkglibLIBRARIES: $(pkglib_LIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_LIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(pkglibLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \ - $(pkglibLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \ - else :; fi; \ - done - @$(POST_INSTALL) - @list='$(pkglib_LIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - p=$(am__strip_dir) \ - echo " $(RANLIB) '$(DESTDIR)$(pkglibdir)/$$p'"; \ - $(RANLIB) "$(DESTDIR)$(pkglibdir)/$$p"; \ - else :; fi; \ - done - -uninstall-pkglibLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pkglib_LIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \ - rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \ - done - -clean-pkglibLIBRARIES: - -test -z "$(pkglib_LIBRARIES)" || rm -f $(pkglib_LIBRARIES) -libsduprobes.a: $(libsduprobes_a_OBJECTS) $(libsduprobes_a_DEPENDENCIES) - -rm -f libsduprobes.a - $(libsduprobes_a_AR) libsduprobes.a $(libsduprobes_a_OBJECTS) $(libsduprobes_a_LIBADD) - $(RANLIB) libsduprobes.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @@ -613,7 +567,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loc2c_test-loc2c-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loc2c_test-loc2c.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sduprobes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-buildrun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-coveragedb.Po@am__quote@ @@ -655,20 +608,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -@BUILD_ELFUTILS_FALSE@sduprobes.o: runtime/sduprobes.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sduprobes.o -MD -MP -MF $(DEPDIR)/sduprobes.Tpo -c -o sduprobes.o `test -f 'runtime/sduprobes.c' || echo '$(srcdir)/'`runtime/sduprobes.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sduprobes.Tpo $(DEPDIR)/sduprobes.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/sduprobes.c' object='sduprobes.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) $(AM_CFLAGS) $(CFLAGS) -c -o sduprobes.o `test -f 'runtime/sduprobes.c' || echo '$(srcdir)/'`runtime/sduprobes.c - -sduprobes.obj: runtime/sduprobes.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sduprobes.obj -MD -MP -MF $(DEPDIR)/sduprobes.Tpo -c -o sduprobes.obj `if test -f 'runtime/sduprobes.c'; then $(CYGPATH_W) 'runtime/sduprobes.c'; else $(CYGPATH_W) '$(srcdir)/runtime/sduprobes.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sduprobes.Tpo $(DEPDIR)/sduprobes.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='runtime/sduprobes.c' object='sduprobes.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) $(AM_CFLAGS) $(CFLAGS) -c -o sduprobes.obj `if test -f 'runtime/sduprobes.c'; then $(CYGPATH_W) 'runtime/sduprobes.c'; else $(CYGPATH_W) '$(srcdir)/runtime/sduprobes.c'; fi` - loc2c_test-loc2c-test.o: loc2c-test.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loc2c_test_CPPFLAGS) $(CPPFLAGS) $(loc2c_test_CFLAGS) $(CFLAGS) -MT loc2c_test-loc2c-test.o -MD -MP -MF $(DEPDIR)/loc2c_test-loc2c-test.Tpo -c -o loc2c_test-loc2c-test.o `test -f 'loc2c-test.c' || echo '$(srcdir)/'`loc2c-test.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/loc2c_test-loc2c-test.Tpo $(DEPDIR)/loc2c_test-loc2c-test.Po @@ -1360,11 +1299,11 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) \ - $(HEADERS) config.h all-local +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) $(HEADERS) config.h \ + all-local installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(oldincludedir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(oldincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -1396,8 +1335,7 @@ maintainer-clean-generic: clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-local \ - clean-noinstPROGRAMS clean-pkglibLIBRARIES \ - clean-pkglibexecPROGRAMS mostlyclean-am + clean-noinstPROGRAMS clean-pkglibexecPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -1422,8 +1360,7 @@ install-data-am: install-data-local install-man \ install-dvi: install-dvi-recursive install-exec-am: install-binPROGRAMS install-binSCRIPTS \ - install-exec-local install-pkglibLIBRARIES \ - install-pkglibexecPROGRAMS + install-exec-local install-pkglibexecPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook @@ -1460,7 +1397,7 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-local uninstall-man uninstall-oldincludeHEADERS \ - uninstall-pkglibLIBRARIES uninstall-pkglibexecPROGRAMS + uninstall-pkglibexecPROGRAMS uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 @@ -1470,27 +1407,24 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local am--refresh check check-am check-local \ clean clean-binPROGRAMS clean-generic clean-local \ - clean-noinstPROGRAMS clean-pkglibLIBRARIES \ - clean-pkglibexecPROGRAMS ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-local distclean-tags dvi dvi-am html html-am info \ - info-am install install-am install-binPROGRAMS \ + clean-noinstPROGRAMS clean-pkglibexecPROGRAMS ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-hdr distclean-local distclean-tags dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ install-binSCRIPTS install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-exec-local \ install-html install-html-am install-info install-info-am \ install-man install-man1 install-man5 install-man8 \ install-oldincludeHEADERS install-pdf install-pdf-am \ - install-pkglibLIBRARIES install-pkglibexecPROGRAMS install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-local uninstall-man \ - uninstall-man1 uninstall-man5 uninstall-man8 \ - uninstall-oldincludeHEADERS uninstall-pkglibLIBRARIES \ - uninstall-pkglibexecPROGRAMS + install-pkglibexecPROGRAMS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-local \ + uninstall-man uninstall-man1 uninstall-man5 uninstall-man8 \ + uninstall-oldincludeHEADERS uninstall-pkglibexecPROGRAMS git_version.stamp: @if test -f "$(srcdir)/git_version.h"; then \ @@ -1523,8 +1457,6 @@ cscope: @BUILD_ELFUTILS_TRUE@ done @BUILD_ELFUTILS_TRUE@ touch $@ @BUILD_ELFUTILS_TRUE@lib-elfutils/libdw.so: stamp-elfutils ; -@BUILD_ELFUTILS_TRUE@sduprobes.o: runtime/sduprobes.c -@BUILD_ELFUTILS_TRUE@ $(CC) -g -O0 -c -o $@ $< @BUILD_ELFUTILS_TRUE@install-elfutils: @BUILD_ELFUTILS_TRUE@ mkdir -p $(DESTDIR)$(pkglibdir) @BUILD_ELFUTILS_TRUE@ for file in lib-elfutils/*.so* lib-elfutils/${PACKAGE_NAME}/*.so*; do \ @@ -1,3 +1,10 @@ +* What's new + +- Variables unavailable in current context may be skipped by setting a + session level flag with command line option --skip-badvars now available. + This will simply substitute the otherwise error causing variable with a + literal 0 and print a warning message when the substitution has been made. + * What's new in version 0.9 - Typecasting is now supported using the @cast operator. A script can diff --git a/buildrun.cxx b/buildrun.cxx index 3a6e20ae..b9d648ef 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -24,6 +24,7 @@ extern "C" { #include <unistd.h> #include <string.h> #include <errno.h> +#include <glob.h> } @@ -125,9 +126,6 @@ compile_pass (systemtap_session& s) // o << module_cflags << " += -Iusr/include" << endl; // since such headers are cleansed of _KERNEL_ pieces that we need - string stapconf_cflags = "STAPCONF_CFLAGS"; - o << stapconf_cflags << " :=" << endl; - o << "STAPCONF_HEADER := " << s.tmpdir << "/" << s.stapconf_name << endl; o << s.translated_source << ": $(STAPCONF_HEADER)" << endl; o << "$(STAPCONF_HEADER):" << endl; @@ -149,6 +147,7 @@ compile_pass (systemtap_session& s) output_autoconf(s, o, "autoconf-task-uid.c", "STAPCONF_TASK_UID", NULL); output_autoconf(s, o, "autoconf-vm-area.c", "STAPCONF_VM_AREA", NULL); output_autoconf(s, o, "autoconf-procfs-owner.c", "STAPCONF_PROCFS_OWNER", NULL); + output_autoconf(s, o, "autoconf-alloc-percpu-align.c", "STAPCONF_ALLOC_PERCPU_ALIGN", NULL); #if 0 /* NB: For now, the performance hit of probe_kernel_read/write (vs. our @@ -156,6 +155,8 @@ compile_pass (systemtap_session& s) * this autoconf. */ output_autoconf(s, o, "autoconf-probe-kernel.c", "STAPCONF_PROBE_KERNEL", NULL); #endif + output_autoconf(s, o, "autoconf-save-stack-trace.c", + "STAPCONF_KERNEL_STACKTRACE", NULL); o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl; @@ -337,4 +338,78 @@ run_pass (systemtap_session& s) return rc; } + +// Build a tiny kernel module to query tracepoints +int +make_tracequery(systemtap_session& s, string& name) +{ + // create a subdirectory for the module + string dir(s.tmpdir + "/tracequery"); + if (create_dir(dir.c_str()) != 0) + { + if (! s.suppress_warnings) + cerr << "Warning: failed to create directory for querying tracepoints." << endl; + return 1; + } + + name = dir + "/tracequery.ko"; + + // create a simple Makefile + string makefile(dir + "/Makefile"); + ofstream omf(makefile.c_str()); + omf << "EXTRA_CFLAGS := -g" << endl; // force debuginfo generation + omf << "obj-m := tracequery.o" << endl; + omf.close(); + + // create our source file + string source(dir + "/tracequery.c"); + ofstream osrc(source.c_str()); + osrc << "#include <linux/module.h>" << endl; + osrc << "#ifdef CONFIG_TRACEPOINTS" << endl; + osrc << "#include <linux/tracepoint.h>" << endl; + + // override DECLARE_TRACE to synthesize probe functions for us + osrc << "#undef DECLARE_TRACE" << endl; + osrc << "#define DECLARE_TRACE(name, proto, args) \\" << endl; + osrc << " void stapprobe_##name(proto) {}" << endl; + + // older tracepoints used DEFINE_TRACE, so redirect that too + osrc << "#undef DEFINE_TRACE" << endl; + osrc << "#define DEFINE_TRACE(name, proto, args) \\" << endl; + osrc << " DECLARE_TRACE(name, TPPROTO(proto), TPARGS(args))" << endl; + + // dynamically pull in all tracepoint headers from include/trace/ + glob_t trace_glob; + string glob_str(s.kernel_build_tree + "/include/trace/*.h"); + glob(glob_str.c_str(), 0, NULL, &trace_glob); + for (unsigned i = 0; i < trace_glob.gl_pathc; ++i) + { + string header(basename(trace_glob.gl_pathv[i])); + + // filter out a few known "internal-only" headers + if (header == "trace_events.h") + continue; + if (header.find("_event_types.h") != string::npos) + continue; + + osrc << "#include <trace/" << header << ">" << endl; + } + globfree(&trace_glob); + + // finish up the module source + osrc << "#endif /* CONFIG_TRACEPOINTS */" << endl; + osrc << "int init_module(void) { return 0; }" << endl; + osrc << "void cleanup_module(void) {}" << endl; + osrc << "MODULE_DESCRIPTION(\"tracepoint query\");" << endl; + osrc << "MODULE_LICENSE(\"GPL\");" << endl; + osrc.close(); + + // make the module + string make_cmd = "make -C '" + s.kernel_build_tree + "'" + + " M='" + dir + "' modules"; + if (s.verbose < 4) + make_cmd += " >/dev/null 2>&1"; + return run_make_cmd(s, make_cmd); +} + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -14,6 +14,7 @@ int compile_pass (systemtap_session& s); int run_pass (systemtap_session& s); +int make_tracequery(systemtap_session& s, std::string& name); #endif // BUILDRUN_H diff --git a/doc/Language_Reference_Guide/Makefile b/doc/Language_Reference_Guide/Makefile new file mode 100644 index 00000000..e8dfb206 --- /dev/null +++ b/doc/Language_Reference_Guide/Makefile @@ -0,0 +1,17 @@ +#Makefile for Language_Reference_Guide + +XML_LANG = en-US +DOCNAME = Language_Reference_Guide +PRODUCT = Fedora +BRAND = fedora + +CHUNK_SECTION_DEPTH=1 + +#OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW + +# Extra Parameters start here + +# Extra Parameters stop here +COMMON_CONFIG = /usr/share/publican +include $(COMMON_CONFIG)/make/Makefile.common + diff --git a/doc/Language_Reference_Guide/README b/doc/Language_Reference_Guide/README new file mode 100644 index 00000000..d3175ae3 --- /dev/null +++ b/doc/Language_Reference_Guide/README @@ -0,0 +1,16 @@ +This is an automated source build of the Language Reference Guide, +used to build it in Publican. + +To build the source, run: + + bash publicanize-langref.sh + +This will copy the LaTeX source of the Language Reference Guide and +convert it to DocBook XML. You can now build it in pdf, html, etc +using Publican. + +The main source of the Language Reference Guide is in: + ../langref.tex + +As such, any revisions to this document should be applied to ../langref.tex, +not to the source in this directory. diff --git a/doc/Language_Reference_Guide/en-US/Author_Group.xml b/doc/Language_Reference_Guide/en-US/Author_Group.xml new file mode 100644 index 00000000..00df1c7d --- /dev/null +++ b/doc/Language_Reference_Guide/en-US/Author_Group.xml @@ -0,0 +1,16 @@ +<?xml version='1.0'?> +<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<authorgroup> + + <author> + <firstname>Robb</firstname> + <surname>Romans</surname> + <affiliation> + <orgname>IBM</orgname> + <orgdiv>Documentation</orgdiv> + </affiliation> + <email>robb@linux.vnet.ibm.com</email> + </author> +</authorgroup> diff --git a/doc/Language_Reference_Guide/en-US/Book_Info.xml b/doc/Language_Reference_Guide/en-US/Book_Info.xml new file mode 100644 index 00000000..14a34093 --- /dev/null +++ b/doc/Language_Reference_Guide/en-US/Book_Info.xml @@ -0,0 +1,63 @@ +<?xml version='1.0'?> +<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<bookinfo id="Language_Reference_Guide-Fedora"> + <title>Language Reference Guide</title> + <subtitle>A guide to the constructs and syntax used in SystemTap scripts</subtitle> + <productname>Fedora</productname> + <productnumber>10</productnumber> + <edition>1</edition> + <pubsnumber>1</pubsnumber> + <abstract> + <para> + The <citetitle>SystemTap Language Reference Guide</citetitle> is a + comprehensive reference of the language constructs and syntax used in + SystemTap scripts. It is suitable for users who have intermediate to + advanced knowledge of SystemTap. For other available SystemTap documentation, + refer to <xref linkend="For-Further-Reference"/>. + </para> + </abstract> + <corpauthor> + <inlinemediaobject> + <imageobject> + <imagedata format='SVG' fileref="Common_Content/images/title_logo.svg" /> + </imageobject> + <textobject><phrase>Logo</phrase></textobject> + </inlinemediaobject> + </corpauthor> +<!-- <copyright> + <year>&YEAR;</year> + <holder>&HOLDER;</holder> + </copyright>--> + +<legalnotice> + <para> + Copyright © 2007 Red Hat Inc., Copyright © 2007 IBM Corp., Copyright © 2007 Intel Corporation. + </para> + + <para> + This document was derived from other documents contributed to the SystemTap project by employees of Red Hat, IBM and Intel. + </para> + + <para> + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + </para> + <para> + The GNU Free Documentation License is available from + <ulink url="http://www.gnu.org/licenses/fdl.html"/> or by writing to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + </para> +</legalnotice> + + +<!-- <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> --> + <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</bookinfo> + + + diff --git a/doc/Language_Reference_Guide/en-US/Language_Reference_Guide.ent b/doc/Language_Reference_Guide/en-US/Language_Reference_Guide.ent new file mode 100644 index 00000000..e44f36cb --- /dev/null +++ b/doc/Language_Reference_Guide/en-US/Language_Reference_Guide.ent @@ -0,0 +1,2 @@ +<!ENTITY PRODUCT "Fedora"> +<!ENTITY BOOKID "Language_Reference_Guide"> diff --git a/doc/Language_Reference_Guide/en-US/Preface.xml b/doc/Language_Reference_Guide/en-US/Preface.xml new file mode 100644 index 00000000..9e8995e3 --- /dev/null +++ b/doc/Language_Reference_Guide/en-US/Preface.xml @@ -0,0 +1,13 @@ +<?xml version='1.0'?> +<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<preface id="Language_Reference_Guide-Preface"> + <title>Preface</title> + <xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + </xi:fallback> + </xi:include> +</preface> diff --git a/doc/Language_Reference_Guide/en-US/Revision_History.xml b/doc/Language_Reference_Guide/en-US/Revision_History.xml new file mode 100644 index 00000000..68432a02 --- /dev/null +++ b/doc/Language_Reference_Guide/en-US/Revision_History.xml @@ -0,0 +1,26 @@ +<?xml version='1.0'?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<appendix id="appe-Publican-Revision_History"> + <title>Revision History</title> + <simpara> + <revhistory> + <revision> + <revnumber>1.0</revnumber> + <date></date> + <author> + <firstname></firstname> + <surname></surname> + <email></email> + </author> + <revdescription> + <simplelist> + <member></member> + </simplelist> + </revdescription> + </revision> + </revhistory> + </simpara> +</appendix> + diff --git a/doc/Language_Reference_Guide/en-US/images/icon.svg b/doc/Language_Reference_Guide/en-US/images/icon.svg new file mode 100644 index 00000000..c471a607 --- /dev/null +++ b/doc/Language_Reference_Guide/en-US/images/icon.svg @@ -0,0 +1,3936 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:ns="http://ns.adobe.com/AdobeSVGViewerExtensions/3/" + xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.0" + width="32" + height="32" + id="svg3017" + sodipodi:version="0.32" + inkscape:version="0.44+devel" + sodipodi:docname="book.svg" + sodipodi:docbase="/home/andy/Desktop"> + <metadata + id="metadata489"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + inkscape:window-height="480" + inkscape:window-width="858" + inkscape:pageshadow="0" + inkscape:pageopacity="0.0" + guidetolerance="10.0" + gridtolerance="10.0" + objecttolerance="10.0" + borderopacity="1.0" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + inkscape:zoom="1" + inkscape:cx="16" + inkscape:cy="15.944056" + inkscape:window-x="0" + inkscape:window-y="33" + inkscape:current-layer="svg3017" /> + <defs + id="defs3019"> + <linearGradient + id="linearGradient2381"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop2383" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="stop2385" /> + </linearGradient> + <linearGradient + x1="415.73831" + y1="11.854" + x2="418.13361" + y2="18.8104" + id="XMLID_1758_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8362,0.5206,-1.1904,0.992,147.62,-30.9374)"> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="0" + id="stop3903" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop3905" /> + <a:midPointStop + style="stop-color:#CCCCCC" + offset="0" /> + <a:midPointStop + style="stop-color:#CCCCCC" + offset="0.5" /> + <a:midPointStop + style="stop-color:#F2F2F2" + offset="1" /> + </linearGradient> + <linearGradient + x1="500.70749" + y1="-13.2441" + x2="513.46442" + y2="-2.1547" + id="XMLID_1757_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop3890" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop3892" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <clipPath + id="XMLID_1755_"> + <use + id="use3874" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_343_" /> + </clipPath> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop3877" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop3879" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop3881" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop3883" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="471.0806" + y1="201.07761" + x2="481.91711" + y2="210.4977" + id="XMLID_1754_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#6498c1;stop-opacity:1" + offset="0.005618" + id="stop3863" /> + <stop + style="stop-color:#79a9cc;stop-opacity:1" + offset="0.2332" + id="stop3865" /> + <stop + style="stop-color:#a4cde2;stop-opacity:1" + offset="0.74049997" + id="stop3867" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="1" + id="stop3869" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="5.618000e-003" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="0.4438" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="1" /> + </linearGradient> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="XMLID_1753_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop3851" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop3853" /> + <a:midPointStop + style="stop-color:#B2B2B2" + offset="0" /> + <a:midPointStop + style="stop-color:#B2B2B2" + offset="0.5" /> + <a:midPointStop + style="stop-color:#F2F2F2" + offset="1" /> + </linearGradient> + <clipPath + id="XMLID_1751_"> + <use + id="use3837" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_338_" /> + </clipPath> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop3840" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop3842" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop3844" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop3846" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="468.2915" + y1="204.7612" + x2="479.39871" + y2="214.4166" + id="XMLID_1750_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop3830" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop3832" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop3818" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop3820" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <linearGradient + x1="501.0903" + y1="-19.2544" + x2="531.85413" + y2="0.72390002" + id="XMLID_1748_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop3803" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop3805" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop3807" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop3809" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="XMLID_2275_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop9947" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop9949" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop9951" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop9953" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <clipPath + id="XMLID_2273_"> + <use + id="use9933" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_960_" /> + </clipPath> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="XMLID_2274_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop9936" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop9938" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop9940" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop9942" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <linearGradient + x1="478.21341" + y1="-131.9297" + x2="469.85818" + y2="-140.28481" + id="XMLID_2272_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.5592,0.829,-0.829,0.5592,101.3357,-104.791)"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop9917" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop9919" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop9921" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop9923" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <marker + refX="0" + refY="0" + orient="auto" + style="overflow:visible" + id="TriangleInM"> + <path + d="M 5.77,0 L -2.88,5 L -2.88,-5 L 5.77,0 z " + transform="scale(-0.4,-0.4)" + style="fill:#5c5c4f" + id="path3197" /> + </marker> + <linearGradient + x1="200.7363" + y1="100.4028" + x2="211.99519" + y2="89.143997" + id="XMLID_3298_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#bfbfbf;stop-opacity:1" + offset="0" + id="stop20103" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop20105" /> + <a:midPointStop + offset="0" + style="stop-color:#BFBFBF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#BFBFBF" /> + <a:midPointStop + offset="1" + style="stop-color:#F2F2F2" /> + </linearGradient> + <linearGradient + x1="200.7363" + y1="100.4028" + x2="211.99519" + y2="89.143997" + id="linearGradient36592" + xlink:href="#XMLID_3298_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="181.2925" + y1="110.8481" + x2="192.6369" + y2="99.5037" + id="XMLID_3297_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="stop20096" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop20098" /> + <a:midPointStop + offset="0" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="181.2925" + y1="110.8481" + x2="192.6369" + y2="99.5037" + id="linearGradient36595" + xlink:href="#XMLID_3297_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="211.77589" + y1="105.7749" + x2="212.6619" + y2="108.2092" + id="XMLID_3296_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#0f6124;stop-opacity:1" + offset="0" + id="stop20087" /> + <stop + style="stop-color:#219630;stop-opacity:1" + offset="1" + id="stop20089" /> + <a:midPointStop + offset="0" + style="stop-color:#0F6124" /> + <a:midPointStop + offset="0.5" + style="stop-color:#0F6124" /> + <a:midPointStop + offset="1" + style="stop-color:#219630" /> + </linearGradient> + <linearGradient + x1="211.77589" + y1="105.7749" + x2="212.6619" + y2="108.2092" + id="linearGradient36677" + xlink:href="#XMLID_3296_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="208.9834" + y1="116.8296" + x2="200.0811" + y2="96.834602" + id="XMLID_3295_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop20076" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.5" + id="stop20078" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop20080" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="208.9834" + y1="116.8296" + x2="200.0811" + y2="96.834602" + id="linearGradient36604" + xlink:href="#XMLID_3295_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="195.5264" + y1="97.911102" + x2="213.5213" + y2="115.9061" + id="XMLID_3294_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="0" + id="stop20069" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop20071" /> + <a:midPointStop + offset="0" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="0.5" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="195.5264" + y1="97.911102" + x2="213.5213" + y2="115.9061" + id="linearGradient36607" + xlink:href="#XMLID_3294_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="186.1938" + y1="109.1343" + x2="206.6881" + y2="88.639999" + id="XMLID_3293_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop20056" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.16850001" + id="stop20058" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.23029999" + id="stop20060" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.2809" + id="stop20062" /> + <stop + style="stop-color:#c2c2c2;stop-opacity:1" + offset="0.5" + id="stop20064" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.1685" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.2303" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.2809" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#C2C2C2" /> + </linearGradient> + <linearGradient + x1="186.1938" + y1="109.1343" + x2="206.6881" + y2="88.639999" + id="linearGradient36610" + xlink:href="#XMLID_3293_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="184.8569" + y1="112.2676" + x2="211.94099" + y2="89.541397" + id="XMLID_3292_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop20043" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.16850001" + id="stop20045" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.23029999" + id="stop20047" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.2809" + id="stop20049" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop20051" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.1685" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.2303" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.2809" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="184.8569" + y1="112.2676" + x2="211.94099" + y2="89.541397" + id="linearGradient36613" + xlink:href="#XMLID_3292_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <marker + refX="0" + refY="0" + orient="auto" + style="overflow:visible" + id="TriangleOutM"> + <path + d="M 5.77,0 L -2.88,5 L -2.88,-5 L 5.77,0 z " + transform="scale(0.4,0.4)" + style="fill:#5c5c4f;fill-rule:evenodd;stroke-width:1pt;marker-start:none" + id="path3238" /> + </marker> + <linearGradient + x1="165.3" + y1="99.5" + x2="165.3" + y2="115.9" + id="XMLID_3457_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#999;stop-opacity:1" + offset="0" + id="stop8309" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0.30000001" + id="stop8311" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="1" + id="stop8313" /> + <a:midPointstop + offset="0" + style="stop-color:#999999" /> + <a:midPointstop + offset="0.5" + style="stop-color:#999999" /> + <a:midPointstop + offset="0.3" + style="stop-color:#B2B2B2" /> + <a:midPointstop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointstop + offset="1" + style="stop-color:#B2B2B2" /> + </linearGradient> + <linearGradient + x1="165.3" + y1="99.5" + x2="165.3" + y2="115.9" + id="lg1997" + xlink:href="#XMLID_3457_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="175" + y1="99.800003" + x2="175" + y2="112.5" + id="XMLID_3456_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="0" + id="stop8300" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="0.60000002" + id="stop8302" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="1" + id="stop8304" /> + <a:midPointstop + offset="0" + style="stop-color:#737373" /> + <a:midPointstop + offset="0.5" + style="stop-color:#737373" /> + <a:midPointstop + offset="0.6" + style="stop-color:#191919" /> + <a:midPointstop + offset="0.5" + style="stop-color:#191919" /> + <a:midPointstop + offset="1" + style="stop-color:#191919" /> + </linearGradient> + <linearGradient + x1="175" + y1="99.800003" + x2="175" + y2="112.5" + id="lg2000" + xlink:href="#XMLID_3456_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="168.8" + y1="107.1" + x2="164.5" + y2="110" + id="XMLID_3455_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#666;stop-opacity:1" + offset="0" + id="stop8291" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="0.69999999" + id="stop8293" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="1" + id="stop8295" /> + <a:midPointstop + offset="0" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.5" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.7" + style="stop-color:#191919" /> + <a:midPointstop + offset="0.5" + style="stop-color:#191919" /> + <a:midPointstop + offset="1" + style="stop-color:#191919" /> + </linearGradient> + <linearGradient + x1="168.8" + y1="107.1" + x2="164.5" + y2="110" + id="lg2003" + xlink:href="#XMLID_3455_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + id="lg63694"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop63696" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="stop63698" /> + </linearGradient> + <linearGradient + x1="458" + y1="483" + x2="465.20001" + y2="271.39999" + id="lg2006" + xlink:href="#lg63694" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(6.3e-2,0,0,6.3e-2,-1.3,-9.8)" /> + <linearGradient + x1="176.3" + y1="110.1" + x2="158.7" + y2="105" + id="XMLID_3453_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#666;stop-opacity:1" + offset="0" + id="stop8271" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="0.2" + id="stop8273" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop8275" /> + <a:midPointstop + offset="0" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.5" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.2" + style="stop-color:#737373" /> + <a:midPointstop + offset="0.5" + style="stop-color:#737373" /> + <a:midPointstop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="176.3" + y1="110.1" + x2="158.7" + y2="105" + id="lg2009" + xlink:href="#XMLID_3453_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="173.60001" + y1="118.9" + x2="172.8" + y2="128.2" + id="XMLID_3449_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8232" /> + <stop + style="stop-color:#fff95e;stop-opacity:1" + offset="0.60000002" + id="stop8234" /> + <stop + style="stop-color:#ecd600;stop-opacity:1" + offset="1" + id="stop8236" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.6" + style="stop-color:#FFF95E" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFF95E" /> + <a:midPointstop + offset="1" + style="stop-color:#ECD600" /> + </linearGradient> + <linearGradient + x1="173.60001" + y1="118.9" + x2="172.8" + y2="128.2" + id="lg2016" + xlink:href="#XMLID_3449_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <radialGradient + cx="284.60001" + cy="172.60001" + r="6.5" + fx="284.60001" + fy="172.60001" + id="XMLID_3448_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4,0,0,1.4,-237.3,-126.8)"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8219" /> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0.30000001" + id="stop8221" /> + <stop + style="stop-color:#c96b00;stop-opacity:1" + offset="0.89999998" + id="stop8223" /> + <stop + style="stop-color:#9a5500;stop-opacity:1" + offset="1" + id="stop8225" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.3" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.9" + style="stop-color:#C96B00" /> + <a:midPointstop + offset="0.5" + style="stop-color:#C96B00" /> + <a:midPointstop + offset="1" + style="stop-color:#9A5500" /> + </radialGradient> + <radialGradient + cx="284.60001" + cy="172.60001" + r="6.5" + fx="284.60001" + fy="172.60001" + id="rg2020" + xlink:href="#XMLID_3448_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.513992,0,0,2.347576,-689.1621,-378.5717)" /> + <linearGradient + x1="158.10001" + y1="123" + x2="164.2" + y2="126.6" + id="XMLID_3447_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecd600;stop-opacity:1" + offset="0" + id="stop8204" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.30000001" + id="stop8206" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop8208" /> + <a:midPointstop + offset="0" + style="stop-color:#ECD600" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECD600" /> + <a:midPointstop + offset="0.3" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="158.10001" + y1="123" + x2="164.2" + y2="126.6" + id="lg2026" + xlink:href="#XMLID_3447_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <radialGradient + cx="280.89999" + cy="163.7" + r="10.1" + fx="280.89999" + fy="163.7" + id="XMLID_3446_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4,0,0,1.4,-237.3,-126.8)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop8197" /> + <stop + style="stop-color:#fff95e;stop-opacity:1" + offset="1" + id="stop8199" /> + <a:midPointstop + offset="0" + style="stop-color:#FFFFFF" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointstop + offset="1" + style="stop-color:#FFF95E" /> + </radialGradient> + <radialGradient + cx="280.89999" + cy="163.7" + r="10.1" + fx="280.89999" + fy="163.7" + id="rg2029" + xlink:href="#XMLID_3446_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.7,0,0,1.7,-457.5,-266.8)" /> + <linearGradient + x1="156.5" + y1="122.7" + x2="180.10001" + y2="122.7" + id="XMLID_3445_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8184" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.2" + id="stop8186" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.30000001" + id="stop8188" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.40000001" + id="stop8190" /> + <stop + style="stop-color:#d68100;stop-opacity:1" + offset="1" + id="stop8192" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.2" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.3" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.4" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="1" + style="stop-color:#D68100" /> + </linearGradient> + <linearGradient + x1="156.5" + y1="122.7" + x2="180.10001" + y2="122.7" + id="lg2032" + xlink:href="#XMLID_3445_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="156.39999" + y1="115.4" + x2="180.10001" + y2="115.4" + id="XMLID_3444_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8171" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.2" + id="stop8173" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.30000001" + id="stop8175" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.40000001" + id="stop8177" /> + <stop + style="stop-color:#d68100;stop-opacity:1" + offset="1" + id="stop8179" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.2" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.3" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.4" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="1" + style="stop-color:#D68100" /> + </linearGradient> + <linearGradient + x1="156.39999" + y1="115.4" + x2="180.10001" + y2="115.4" + id="lg2035" + xlink:href="#XMLID_3444_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="379.70001" + y1="167.89999" + x2="383.89999" + y2="172.89999" + id="lg4286_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8,0.2,-0.2,0.8,78.8,38.1)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s16159" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.1" + id="s16161" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="1" + id="s16163" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.1" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#737373" + offset="1" /> + </linearGradient> + <linearGradient + x1="379.60001" + y1="167.8" + x2="383.79999" + y2="172" + id="lg6416" + xlink:href="#lg4286_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.622156,0.623859,-0.623859,2.62182,-882.9706,-673.7921)" /> + <linearGradient + x1="384.20001" + y1="169.8" + x2="384.79999" + y2="170.39999" + id="lg4285_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8,0.2,-0.2,0.8,78.8,38.1)"> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="0" + id="s16152" /> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="1" + id="s16154" /> + <ns:midPointStop + style="stop-color:#737373" + offset="0" /> + <ns:midPointStop + style="stop-color:#737373" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#D9D9D9" + offset="1" /> + </linearGradient> + <linearGradient + x1="384.20001" + y1="169.8" + x2="384.79999" + y2="170.39999" + id="lg6453" + xlink:href="#lg4285_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.6,0.6,-0.6,2.6,-883,-673.8)" /> + <linearGradient + x1="380.5" + y1="172.60001" + x2="382.79999" + y2="173.7" + id="lg4284_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8,0.2,-0.2,0.8,78.8,38.1)"> + <stop + style="stop-color:gray;stop-opacity:1" + offset="0" + id="s16145" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="1" + id="s16147" /> + <ns:midPointStop + style="stop-color:#808080" + offset="0" /> + <ns:midPointStop + style="stop-color:#808080" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#E5E5E5" + offset="1" /> + </linearGradient> + <linearGradient + x1="380.5" + y1="172.60001" + x2="382.79999" + y2="173.7" + id="lg6456" + xlink:href="#lg4284_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.6,0.6,-0.6,2.6,-883,-673.8)" /> + <radialGradient + cx="347.29999" + cy="244.5" + r="5.1999998" + fx="347.29999" + fy="244.5" + id="lg4282_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)"> + <stop + style="stop-color:#333;stop-opacity:1" + offset="0" + id="s16135" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="s16137" /> + <ns:midPointStop + style="stop-color:#333333" + offset="0" /> + <ns:midPointStop + style="stop-color:#333333" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#999999" + offset="1" /> + </radialGradient> + <linearGradient + x1="310.39999" + y1="397.70001" + x2="310.89999" + y2="399.5" + id="lg4280_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.7,-0.7,0.7,0.7,-153.4,180.6)"> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="0" + id="s16111" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.60000002" + id="s16113" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="1" + id="s16115" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.6" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="1" /> + </linearGradient> + <linearGradient + x1="310.39999" + y1="397.70001" + x2="310.89999" + y2="399.5" + id="lg6467" + xlink:href="#lg4280_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.4,-2.4,2.4,2.4,-1663.6,-195)" /> + <linearGradient + x1="310.89999" + y1="395.79999" + x2="313.29999" + y2="403.10001" + id="lg4279_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.7,-0.7,0.7,0.7,-153.4,180.6)"> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0" + id="s16100" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.40000001" + id="s16102" /> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="0.89999998" + id="s16104" /> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="1" + id="s16106" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.4" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0.9" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="310.89999" + y1="395.79999" + x2="313.29999" + y2="403.10001" + id="lg6465" + xlink:href="#lg4279_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.4,-2.4,2.4,2.4,-1663.6,-195)" /> + <linearGradient + x1="307.79999" + y1="395.20001" + x2="313.79999" + y2="413.60001" + id="lg4278_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.7,-0.7,0.7,0.7,-153.4,180.6)"> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0" + id="s16091" /> + <stop + style="stop-color:#fcd72f;stop-opacity:1" + offset="0.40000001" + id="s16093" /> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="1" + id="s16095" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FCD72F" + offset="0.4" /> + <ns:midPointStop + style="stop-color:#FCD72F" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="306.5" + y1="393" + x2="309" + y2="404" + id="lg6400" + xlink:href="#lg4278_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.4,-2.4,2.4,2.4,-1663.6,-195)" /> + <linearGradient + x1="352.10001" + y1="253.60001" + x2="348.5" + y2="237.8" + id="lg4276_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)"> + <stop + style="stop-color:#ffff87;stop-opacity:1" + offset="0" + id="s16077" /> + <stop + style="stop-color:#ffad00;stop-opacity:1" + offset="1" + id="s16079" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFAD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="335.60001" + y1="354.79999" + x2="337.89999" + y2="354.79999" + id="lg4275_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9,-0.5,0.5,0.9,-121.7,105.1)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="s16057" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.80000001" + id="s16059" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="s16061" /> + <ns:midPointStop + style="stop-color:#D9D9D9" + offset="0" /> + <ns:midPointStop + style="stop-color:#D9D9D9" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.8" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="1" /> + </linearGradient> + <linearGradient + x1="335.60001" + y1="354.79999" + x2="337.89999" + y2="354.79999" + id="lg6463" + xlink:href="#lg4275_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.9,-1.7,1.7,2.9,-1557,-448.7)" /> + <linearGradient + x1="337.39999" + y1="353.10001" + x2="339.39999" + y2="357.10001" + id="lg4274_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9,-0.5,0.5,0.9,-121.7,105.1)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s16048" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.1" + id="s16050" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s16052" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.1" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="337.39999" + y1="353.10001" + x2="339.39999" + y2="357.10001" + id="lg6461" + xlink:href="#lg4274_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.9,-1.7,1.7,2.9,-1557,-448.7)" /> + <linearGradient + x1="334.39999" + y1="355.5" + x2="335.5" + y2="356.79999" + id="lg4273_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9,-0.5,0.5,0.9,-121.7,105.1)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s16041" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s16043" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="5.6e-003" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="334.39999" + y1="355.5" + x2="335.5" + y2="356.79999" + id="lg6381" + xlink:href="#lg4273_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.9,-1.7,1.7,2.9,-1557,-448.7)" /> + <linearGradient + x1="348.39999" + y1="247.39999" + x2="354.10001" + y2="242" + id="lg4271_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)"> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0" + id="s16025" /> + <stop + style="stop-color:#9e9e9e;stop-opacity:1" + offset="0.40000001" + id="s16027" /> + <stop + style="stop-color:black;stop-opacity:1" + offset="1" + id="s16029" /> + <ns:midPointStop + style="stop-color:#F2F2F2" + offset="0" /> + <ns:midPointStop + style="stop-color:#F2F2F2" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#000000" + offset="1" /> + </linearGradient> + <linearGradient + x1="351.29999" + y1="257.29999" + x2="346.29999" + y2="235.5" + id="lg4270_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ffff87;stop-opacity:1" + offset="0" + id="s16007" /> + <stop + style="stop-color:#ffad00;stop-opacity:1" + offset="1" + id="s16009" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFAD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="351.29999" + y1="257.29999" + x2="346.29999" + y2="235.5" + id="lg6459" + xlink:href="#lg4270_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)" /> + <linearGradient + x1="43.799999" + y1="32.5" + x2="63.299999" + y2="66.400002" + id="XMLID_2708_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop75318" /> + <stop + style="stop-color:#fffcea;stop-opacity:1" + offset="1" + id="stop75320" /> + <a:midPointStop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointStop + style="stop-color:#FFFCEA" + offset="1" /> + </linearGradient> + <linearGradient + x1="43.799999" + y1="32.5" + x2="63.299999" + y2="66.400002" + id="lg1907" + xlink:href="#XMLID_2708_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)" /> + <linearGradient + x1="52.5" + y1="40.400002" + x2="58.200001" + y2="64" + id="XMLID_2707_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ffdea0;stop-opacity:1" + offset="0" + id="stop75305" /> + <stop + style="stop-color:#ffd89e;stop-opacity:1" + offset="0.30000001" + id="stop75307" /> + <stop + style="stop-color:#ffd79e;stop-opacity:1" + offset="0.30000001" + id="stop75309" /> + <stop + style="stop-color:#dbaf6d;stop-opacity:1" + offset="0.69999999" + id="stop75311" /> + <stop + style="stop-color:#6f4c24;stop-opacity:1" + offset="1" + id="stop75313" /> + <a:midPointStop + style="stop-color:#FFDEA0" + offset="0" /> + <a:midPointStop + style="stop-color:#FFDEA0" + offset="0.6" /> + <a:midPointStop + style="stop-color:#FFD79E" + offset="0.3" /> + <a:midPointStop + style="stop-color:#FFD79E" + offset="0.5" /> + <a:midPointStop + style="stop-color:#DBAF6D" + offset="0.7" /> + <a:midPointStop + style="stop-color:#DBAF6D" + offset="0.5" /> + <a:midPointStop + style="stop-color:#6F4C24" + offset="1" /> + </linearGradient> + <linearGradient + x1="52.5" + y1="40.400002" + x2="58.200001" + y2="64" + id="lg1910" + xlink:href="#XMLID_2707_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)" /> + <linearGradient + x1="58" + y1="73.199997" + x2="44.5" + y2="19" + id="XMLID_2704_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)"> + <stop + style="stop-color:#d4a96c;stop-opacity:1" + offset="0.5" + id="stop75284" /> + <stop + style="stop-color:#dcb273;stop-opacity:1" + offset="0.60000002" + id="stop75286" /> + <stop + style="stop-color:#f0ca87;stop-opacity:1" + offset="0.80000001" + id="stop75288" /> + <stop + style="stop-color:#ffdc96;stop-opacity:1" + offset="0.69999999" + id="stop75290" /> + <stop + style="stop-color:#c18a42;stop-opacity:1" + offset="1" + id="stop75292" /> + <a:midPointStop + style="stop-color:#D4A96C" + offset="0.5" /> + <a:midPointStop + style="stop-color:#D4A96C" + offset="0.6" /> + <a:midPointStop + style="stop-color:#FFDC96" + offset="0.7" /> + <a:midPointStop + style="stop-color:#FFDC96" + offset="0.5" /> + <a:midPointStop + style="stop-color:#C18A42" + offset="1" /> + </linearGradient> + <linearGradient + x1="53.700001" + y1="32" + x2="53.700001" + y2="64.599998" + id="XMLID_2703_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e5c9b0;stop-opacity:1" + offset="0" + id="stop75268" /> + <stop + style="stop-color:#e5c9b0;stop-opacity:1" + offset="0.40000001" + id="stop75270" /> + <stop + style="stop-color:#c0aa94;stop-opacity:1" + offset="1" + id="stop75272" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0.5" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0.4" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0.5" /> + <a:midPointStop + style="stop-color:#C0AA94" + offset="1" /> + </linearGradient> + <linearGradient + x1="53.700001" + y1="32" + x2="53.700001" + y2="64.599998" + id="lg1916" + xlink:href="#XMLID_2703_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)" /> + <linearGradient + x1="224.31" + y1="19.450001" + x2="214.33" + y2="11.46" + id="XMLID_419_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#404040;stop-opacity:1" + offset="0" + id="s1903" /> + <stop + style="stop-color:#6d6d6d;stop-opacity:1" + offset="0.33000001" + id="s1905" /> + <stop + style="stop-color:#e9e9e9;stop-opacity:1" + offset="1" + id="s1907" /> + <a:midPointStop + offset="0" + style="stop-color:#404040" /> + <a:midPointStop + offset="0.5" + style="stop-color:#404040" /> + <a:midPointStop + offset="0.33" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="0.5" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="1" + style="stop-color:#E9E9E9" /> + </linearGradient> + <linearGradient + x1="221.84" + y1="32.779999" + x2="212.2" + y2="20.27" + id="lg1988" + xlink:href="#XMLID_419_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.33,0,0,1.31,-274.2,-5.2)" /> + <linearGradient + x1="228.35001" + y1="33.279999" + x2="215.42999" + y2="33.279999" + id="lg1900" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s1902" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="s1906" /> + <a:midPointStop + style="stop-color:#575757" + offset="0" /> + <a:midPointStop + style="stop-color:#575757" + offset="0.5" /> + <a:midPointStop + style="stop-color:#6D6D6D" + offset="0.33" /> + <a:midPointStop + style="stop-color:#6D6D6D" + offset="0.5" /> + <a:midPointStop + style="stop-color:#D3D3D3" + offset="1" /> + </linearGradient> + <linearGradient + x1="234.81" + y1="33.279999" + x2="228.27" + y2="33.279999" + id="lg1908" + xlink:href="#lg1900" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.33,0,0,1.31,-274.2,-5.2)" /> + <linearGradient + x1="228.35001" + y1="33.279999" + x2="215.42999" + y2="33.279999" + id="XMLID_416_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#575757;stop-opacity:1" + offset="0" + id="s1874" /> + <stop + style="stop-color:#6d6d6d;stop-opacity:1" + offset="0.33000001" + id="s1876" /> + <stop + style="stop-color:#d3d3d3;stop-opacity:1" + offset="1" + id="s1878" /> + <a:midPointStop + offset="0" + style="stop-color:#575757" /> + <a:midPointStop + offset="0.5" + style="stop-color:#575757" /> + <a:midPointStop + offset="0.33" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="0.5" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="1" + style="stop-color:#D3D3D3" /> + </linearGradient> + <linearGradient + x1="228.35001" + y1="33.279999" + x2="215.42999" + y2="33.279999" + id="lg1991" + xlink:href="#XMLID_416_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.33,0,0,1.31,-274.2,-5.2)" /> + <radialGradient + cx="603.19" + cy="230.77" + r="1.67" + fx="603.19" + fy="230.77" + id="x5010_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.1,0,0,1.1,-54.33,-75.4)"> + <stop + style="stop-color:#c9ffc9;stop-opacity:1" + offset="0" + id="stop29201" /> + <stop + style="stop-color:#23a11f;stop-opacity:1" + offset="1" + id="stop29203" /> + <a:midPointStop + offset="0" + style="stop-color:#C9FFC9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#C9FFC9" /> + <a:midPointStop + offset="1" + style="stop-color:#23A11F" /> + </radialGradient> + <radialGradient + cx="603.19" + cy="230.77" + r="1.67" + fx="603.19" + fy="230.77" + id="radialGradient5711" + xlink:href="#x5010_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.23,0,0,1.23,-709.93,-245.02)" /> + <linearGradient + x1="592.31" + y1="162.60001" + x2="609.32001" + y2="145.59" + id="lg5722" + xlink:href="#x5003_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="601.48999" + y1="170.16" + x2="613.84003" + y2="170.16" + id="x5002_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop29134" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.2" + id="stop29136" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="stop29138" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.20" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="1" + style="stop-color:#999999" /> + </linearGradient> + <linearGradient + x1="601.48999" + y1="170.16" + x2="613.84003" + y2="170.16" + id="lg5725" + xlink:href="#x5002_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.23" + id="x5004_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop29157" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop29159" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.23" + id="lg5728" + xlink:href="#x5004_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="592.31" + y1="162.60001" + x2="609.32001" + y2="145.59" + id="x5003_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0" + id="stop29143" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="1" + id="stop29145" /> + <a:midPointStop + offset="0" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="1" + style="stop-color:#E5E5E5" /> + </linearGradient> + <linearGradient + x1="592.31" + y1="162.60001" + x2="609.32001" + y2="145.59" + id="lg5732" + xlink:href="#x5003_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.24001" + id="x5000_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop29124" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop29126" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.24001" + id="lg5735" + xlink:href="#x5000_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="308.54999" + y1="149.89999" + x2="299.72" + y2="148.83" + id="XMLID_2433_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d6d6d6;stop-opacity:1" + offset="0" + id="71615" /> + <stop + style="stop-color:#a5a5a5;stop-opacity:1" + offset="1" + id="71617" /> + <a:midPointStop + offset="0" + style="stop-color:#D6D6D6" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D6D6D6" /> + <a:midPointStop + offset="1" + style="stop-color:#A5A5A5" /> + </linearGradient> + <linearGradient + x1="308.54999" + y1="149.89999" + x2="299.72" + y2="148.83" + id="lg1952" + xlink:href="#XMLID_2433_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.03,0,0,1.03,-279.57,-124.36)" /> + <radialGradient + cx="307.39999" + cy="121" + r="23.35" + fx="307.39999" + fy="121" + id="XMLID_2432_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.98,0,0,0.98,2.88,2.75)"> + <stop + style="stop-color:#d2d2d2;stop-opacity:1" + offset="0.19" + id="71592" /> + <stop + style="stop-color:#cfcfcf;stop-opacity:1" + offset="0.44999999" + id="71594" /> + <stop + style="stop-color:#c7c7c7;stop-opacity:1" + offset="0.60000002" + id="71596" /> + <stop + style="stop-color:#b9b9b9;stop-opacity:1" + offset="0.74000001" + id="71598" /> + <stop + style="stop-color:#a4a4a4;stop-opacity:1" + offset="0.86000001" + id="71600" /> + <stop + style="stop-color:#8a8a8a;stop-opacity:1" + offset="0.95999998" + id="71602" /> + <stop + style="stop-color:gray;stop-opacity:1" + offset="1" + id="71604" /> + <a:midPointStop + offset="0.19" + style="stop-color:#D2D2D2" /> + <a:midPointStop + offset="0.8" + style="stop-color:#D2D2D2" /> + <a:midPointStop + offset="1" + style="stop-color:#808080" /> + </radialGradient> + <radialGradient + cx="307.39999" + cy="121" + r="23.35" + fx="307.39999" + fy="121" + id="radialGradient2331" + xlink:href="#XMLID_2432_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-276.62,-121.54)" /> + <linearGradient + x1="294.13" + y1="127.07" + x2="294.13" + y2="142.2" + id="XMLID_2430_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b5d8ff;stop-opacity:1" + offset="0" + id="71582" /> + <stop + style="stop-color:black;stop-opacity:1" + offset="1" + id="71584" /> + <a:midPointStop + offset="0" + style="stop-color:#B5D8FF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B5D8FF" /> + <a:midPointStop + offset="1" + style="stop-color:#000000" /> + </linearGradient> + <linearGradient + x1="294.13" + y1="127.07" + x2="294.13" + y2="142.2" + id="lg2820" + xlink:href="#XMLID_2430_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.03,0,0,1.03,-279.57,-124.36)" /> + <linearGradient + x1="279.10999" + y1="148.03" + x2="309.16" + y2="148.03" + id="XMLID_2429_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e1e1e1;stop-opacity:1" + offset="0" + id="71564" /> + <stop + style="stop-color:#e1e1e1;stop-opacity:1" + offset="0.25" + id="71566" /> + <stop + style="stop-color:#a5a5a5;stop-opacity:1" + offset="0.44" + id="71568" /> + <stop + style="stop-color:#a5a5a5;stop-opacity:1" + offset="1" + id="71570" /> + <a:midPointStop + offset="0" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.25" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.44" + style="stop-color:#A5A5A5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#A5A5A5" /> + <a:midPointStop + offset="1" + style="stop-color:#A5A5A5" /> + </linearGradient> + <linearGradient + x1="279.10999" + y1="148.03" + x2="309.16" + y2="148.03" + id="lg2818" + xlink:href="#XMLID_2429_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.03,0,0,1.03,-279.57,-124.36)" /> + <radialGradient + cx="622.34302" + cy="14.449" + r="26.496" + fx="622.34302" + fy="14.449" + id="lg3499_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.851,0,0,0.849,69.297,51.658)"> + <stop + style="stop-color:#23468e;stop-opacity:1" + offset="0" + id="stop10972" /> + <stop + style="stop-color:#012859;stop-opacity:1" + offset="1" + id="stop10974" /> + <a:midPointStop + offset="0" + style="stop-color:#23468E" /> + <a:midPointStop + offset="0.5" + style="stop-color:#23468E" /> + <a:midPointStop + offset="1" + style="stop-color:#012859" /> + </radialGradient> + <radialGradient + cx="622.34302" + cy="14.449" + r="26.496" + fx="622.34302" + fy="14.449" + id="rg5791" + xlink:href="#lg3499_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.858,0,0,0.857,-511.7,9.02)" /> + <linearGradient + x1="616.112" + y1="76.247002" + x2="588.14099" + y2="60.742001" + id="lg3497_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#01326e;stop-opacity:1" + offset="0" + id="stop10962" /> + <stop + style="stop-color:#012859;stop-opacity:1" + offset="1" + id="stop10964" /> + <a:midPointStop + offset="0" + style="stop-color:#01326E" /> + <a:midPointStop + offset="0.5" + style="stop-color:#01326E" /> + <a:midPointStop + offset="1" + style="stop-color:#012859" /> + </linearGradient> + <linearGradient + x1="617.698" + y1="82.445999" + x2="585.95203" + y2="54.848999" + id="lg3496_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="stop10950" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop10952" /> + <a:midPointStop + offset="0" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="617.698" + y1="82.445999" + x2="585.95203" + y2="54.848999" + id="lg5794" + xlink:href="#lg3496_" + gradientUnits="userSpaceOnUse" /> + <linearGradient + x1="601.39001" + y1="55.341" + x2="588.29199" + y2="71.515999" + id="lg3495_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop10941" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.52200001" + id="stop10943" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop10945" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.522" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="601.39001" + y1="55.341" + x2="588.29199" + y2="71.515999" + id="lg5771" + xlink:href="#lg3495_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.009,0,0,1.009,-581.615,-43.098)" /> + <linearGradient + x1="611.34601" + y1="55.279999" + x2="590.39001" + y2="81.157997" + id="lg3494_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop10932" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.52200001" + id="stop10934" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop10936" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.522" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="611.34601" + y1="55.279999" + x2="590.39001" + y2="81.157997" + id="lg5774" + xlink:href="#lg3494_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.009,0,0,1.009,-581.616,-43.098)" /> + <linearGradient + x1="798.72998" + y1="69.839996" + x2="799.04999" + y2="70.709999" + id="g3302_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#005e00;stop-opacity:1" + offset="0" + id="s6504" /> + <stop + style="stop-color:#23a11f;stop-opacity:1" + offset="1" + id="s6506" /> + <a:midPointstop + style="stop-color:#005E00" + offset="0" /> + <a:midPointstop + style="stop-color:#005E00" + offset="0.5" /> + <a:midPointstop + style="stop-color:#23A11F" + offset="1" /> + </linearGradient> + <linearGradient + x1="798.72998" + y1="69.839996" + x2="799.04999" + y2="70.709999" + id="lg5851" + xlink:href="#g3302_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,-60.001)" /> + <linearGradient + x1="779.19" + y1="122.73" + x2="811.69" + y2="149.74001" + id="g3301_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,129.19)"> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0" + id="s6483" /> + <stop + style="stop-color:#eee;stop-opacity:1" + offset="0.17" + id="s6485" /> + <stop + style="stop-color:#e3e3e3;stop-opacity:1" + offset="0.34" + id="s6487" /> + <stop + style="stop-color:#cfcfcf;stop-opacity:1" + offset="0.50999999" + id="s6489" /> + <stop + style="stop-color:#b4b4b4;stop-opacity:1" + offset="0.67000002" + id="s6491" /> + <stop + style="stop-color:#919191;stop-opacity:1" + offset="0.83999997" + id="s6493" /> + <stop + style="stop-color:#666;stop-opacity:1" + offset="1" + id="s6495" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.71" /> + <a:midPointstop + style="stop-color:#666666" + offset="1" /> + </linearGradient> + <linearGradient + x1="779.19" + y1="122.73" + x2="811.69" + y2="149.74001" + id="lg5855" + xlink:href="#g3301_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,-0.316,0,1.263,-926.036,103.123)" /> + <clipPath + id="g3299_"> + <use + id="use6469" + x="0" + y="0" + width="1005.92" + height="376.97" + xlink:href="#g101_" /> + </clipPath> + <radialGradient + cx="1189.9301" + cy="100.05" + r="40.400002" + fx="1189.9301" + fy="100.05" + id="g3300_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.34,-8.46e-2,0,0.34,394.16,137.13)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s6472" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="s6474" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointstop + style="stop-color:#000000" + offset="1" /> + </radialGradient> + <radialGradient + cx="1199.74" + cy="97.150002" + r="40.400002" + fx="1199.74" + fy="97.150002" + id="rg5860" + xlink:href="#g3300_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.409,-0.107,0,0.429,-451.489,113.149)" /> + <linearGradient + x1="796.38" + y1="67.580002" + x2="781.28003" + y2="58.549999" + id="g3298_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#4c8bca;stop-opacity:1" + offset="0" + id="s6462" /> + <stop + style="stop-color:#b7e9ff;stop-opacity:1" + offset="1" + id="s6464" /> + <a:midPointstop + style="stop-color:#4C8BCA" + offset="0" /> + <a:midPointstop + style="stop-color:#4C8BCA" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B7E9FF" + offset="1" /> + </linearGradient> + <linearGradient + x1="800.97998" + y1="140.72" + x2="777.71997" + y2="121.76" + id="g3297_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,129.19)"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="s6448" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s6450" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0.5" /> + <a:midPointstop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="800.97998" + y1="140.72" + x2="777.71997" + y2="121.76" + id="lg5890" + xlink:href="#g3297_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,129.19)" /> + <linearGradient + x1="790.03998" + y1="-16.33" + x2="779.84003" + y2="-3.73" + id="g3296_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,70.17)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="s6439" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.51999998" + id="s6441" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s6443" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0.5" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.52" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.5" /> + <a:midPointstop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="790.03998" + y1="-16.33" + x2="779.84003" + y2="-3.73" + id="lg5866" + xlink:href="#g3296_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,28.6)" /> + <linearGradient + x1="785.84003" + y1="72.989998" + x2="785.26001" + y2="76.279999" + id="g3293_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s6412" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="1" + id="s6414" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointstop + style="stop-color:#737373" + offset="1" /> + </linearGradient> + <linearGradient + x1="785.84003" + y1="72.989998" + x2="785.26001" + y2="76.279999" + id="lg5871" + xlink:href="#g3293_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,-60.001)" /> + <linearGradient + x1="789.37" + y1="69.879997" + x2="791.03998" + y2="77.120003" + id="g3292_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#999;stop-opacity:1" + offset="0" + id="s6403" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.28" + id="s6405" /> + <stop + style="stop-color:#666;stop-opacity:1" + offset="1" + id="s6407" /> + <a:midPointstop + style="stop-color:#999999" + offset="0" /> + <a:midPointstop + style="stop-color:#999999" + offset="0.5" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.28" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.5" /> + <a:midPointstop + style="stop-color:#666666" + offset="1" /> + </linearGradient> + <linearGradient + x1="789.37" + y1="69.879997" + x2="791.03998" + y2="77.120003" + id="lg5874" + xlink:href="#g3292_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,-60.001)" /> + <linearGradient + x1="786.65997" + y1="136.12" + x2="786.71002" + y2="134.33" + id="g3290_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,137.29)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="s6380" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="1" + id="s6382" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="1" /> + </linearGradient> + <linearGradient + x1="786.65997" + y1="136.12" + x2="786.71002" + y2="134.33" + id="lg5878" + xlink:href="#g3290_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,-0.316,0,1.263,-926.036,113.351)" /> + <radialGradient + cx="1458.77" + cy="-5.0999999" + r="35.130001" + fx="1458.77" + fy="-5.0999999" + id="g3289_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.42,0,0,0.42,167.09,79.84)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s6371" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="s6373" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointstop + style="stop-color:#999999" + offset="1" /> + </radialGradient> + <radialGradient + cx="1458.77" + cy="-5.0999999" + r="35.130001" + fx="1458.77" + fy="-5.0999999" + id="rg5881" + xlink:href="#g3289_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.505,0,0,0.53,-724.957,40.636)" /> + <radialGradient + cx="1612.98" + cy="-4.4699998" + r="36.580002" + fx="1612.98" + fy="-4.4699998" + id="g3288_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.34,0,0,0.36,238.56,86.87)"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="s6362" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0.63999999" + id="s6364" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="1" + id="s6366" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.64" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.5" /> + <a:midPointstop + style="stop-color:#737373" + offset="1" /> + </radialGradient> + <radialGradient + cx="1612.98" + cy="-4.4699998" + r="36.580002" + fx="1612.98" + fy="-4.4699998" + id="rg5884" + xlink:href="#g3288_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.408,0,0,0.448,-638.943,49.495)" /> + <radialGradient + cx="1470.5" + cy="-10.21" + r="33.290001" + fx="1470.5" + fy="-10.21" + id="g3287_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.42,0,0,0.42,167.09,79.84)"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="s6347" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0.38999999" + id="s6349" /> + <stop + style="stop-color:#b1b1b1;stop-opacity:1" + offset="0.75" + id="s6351" /> + <stop + style="stop-color:#aaa;stop-opacity:1" + offset="0.88" + id="s6353" /> + <stop + style="stop-color:#9e9e9e;stop-opacity:1" + offset="0.97000003" + id="s6355" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="s6357" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.39" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.87" /> + <a:midPointstop + style="stop-color:#999999" + offset="1" /> + </radialGradient> + <radialGradient + cx="1470.5" + cy="-10.21" + r="33.290001" + fx="1470.5" + fy="-10.21" + id="rg5887" + xlink:href="#g3287_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.505,0,0,0.53,-724.957,40.636)" /> + <pattern + patternTransform="matrix(0.592927,0,0,0.592927,78,462)" + id="cream-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-365.3146,-513.505)" + id="g3047"> + id="path2858" /> + <path + inkscape:label="#path2854" + sodipodi:nodetypes="czzzz" + style="fill:#e3dcc0" + id="path3060" + d="M 390.31462,529.50504 C 390.31462,534.47304 386.28262,538.50504 381.31462,538.50504 C 376.34662,538.50504 372.31462,534.47304 372.31462,529.50504 C 372.31462,524.53704 376.34662,520.50504 381.31462,520.50504 C 386.28262,520.50504 390.31462,524.53704 390.31462,529.50504 z " /> +</g> + </pattern> + <pattern + patternTransform="matrix(0.733751,0,0,0.733751,67,367)" + id="dark-cream-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-408.0946,-513.505)" + id="dark-cream-spot" + inkscape:label="#g3043"> + <path + sodipodi:nodetypes="czzzz" + style="fill:#c8c5ac" + d="M 433.09458,529.50504 C 433.09458,534.47304 429.06258,538.50504 424.09458,538.50504 C 419.12658,538.50504 415.09458,534.47304 415.09458,529.50504 C 415.09458,524.53704 419.12658,520.50504 424.09458,520.50504 C 429.06258,520.50504 433.09458,524.53704 433.09458,529.50504 z " + id="path2953" /> + </g> + </pattern> + <pattern + patternTransform="matrix(0.375,0,0,0.375,379,400)" + id="white-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-484.3997,-513.505)" + id="white-spot" + inkscape:label="#g3035"> + <path + style="opacity:0.25;fill:white" + id="path3033" + d="M 509.39967,529.50504 C 509.39967,534.47304 505.36767,538.50504 500.39967,538.50504 C 495.43167,538.50504 491.39967,534.47304 491.39967,529.50504 C 491.39967,524.53704 495.43167,520.50504 500.39967,520.50504 C 505.36767,520.50504 509.39967,524.53704 509.39967,529.50504 z " + sodipodi:nodetypes="czzzz" /> + </g> + </pattern> + <pattern + patternTransform="matrix(0.455007,0,0,0.455007,-5e-5,1.9e-5)" + id="black-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-448.3997,-513.505)" + id="black-spot" + inkscape:label="#g3039"> + <path + sodipodi:nodetypes="czzzz" + d="M 473.39967,529.50504 C 473.39967,534.47304 469.36767,538.50504 464.39967,538.50504 C 459.43167,538.50504 455.39967,534.47304 455.39967,529.50504 C 455.39967,524.53704 459.43167,520.50504 464.39967,520.50504 C 469.36767,520.50504 473.39967,524.53704 473.39967,529.50504 z " + id="path2961" + style="opacity:0.25;fill:black" /> + </g> + </pattern> + <linearGradient + x1="501.0903" + y1="-19.2544" + x2="531.85413" + y2="0.72390002" + id="linearGradient17334" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop17336" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop17338" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop17340" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop17342" /> + <a:midPointStop + offset="0" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.5112" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.6461" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="1" + style="stop-color:#16336E" /> + </linearGradient> + <linearGradient + x1="415.73831" + y1="11.854" + x2="418.13361" + y2="18.8104" + id="linearGradient17426" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8362,0.5206,-1.1904,0.992,147.62,-30.9374)"> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="0" + id="stop17428" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop17430" /> + <a:midPointStop + offset="0" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="0.5" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="1" + style="stop-color:#F2F2F2" /> + </linearGradient> + <linearGradient + x1="478.21341" + y1="-131.9297" + x2="469.85818" + y2="-140.28481" + id="linearGradient17434" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.5592,0.829,-0.829,0.5592,101.3357,-104.791)"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop17436" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop17438" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop17440" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop17442" /> + <a:midPointStop + offset="0" + style="stop-color:#F3403F" /> + <a:midPointStop + offset="0.4213" + style="stop-color:#F3403F" /> + <a:midPointStop + offset="1" + style="stop-color:#A6100C" /> + </linearGradient> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17709" + xlink:href="#XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)" /> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17711" + xlink:href="#XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="linearGradient17713" + xlink:href="#XMLID_1753_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17715" + xlink:href="#XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="500.70749" + y1="-13.2441" + x2="513.46442" + y2="-2.1547" + id="linearGradient17717" + xlink:href="#XMLID_1757_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="linearGradient17721" + xlink:href="#XMLID_2274_" + gradientUnits="userSpaceOnUse" /> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="linearGradient17723" + xlink:href="#XMLID_2275_" + gradientUnits="userSpaceOnUse" /> + <linearGradient + x1="500.70749" + y1="-13.2441" + x2="513.46442" + y2="-2.1547" + id="linearGradient17416" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop17418" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop17420" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <defs + id="defs9929"> + <path + d="M 489.21,209.35 L 485.35,203.63 C 483.63,204.25 473.47,208.93 471.5,210.18 C 470.57,210.77 470.17,211.16 469.72,212.48 C 470.93,212.31 471.72,212.49 473.42,213.04 C 473.26,214.77 473.24,215.74 473.57,218.2 C 474.01,216.88 474.41,216.49 475.34,215.9 C 477.33,214.65 487.49,209.97 489.21,209.35 z " + id="XMLID_960_" /> + </defs> + <clipPath + id="clipPath17448"> + <use + id="use17450" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_960_" /> + </clipPath> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="linearGradient17452" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop17454" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop17456" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop17458" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop17460" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="linearGradient17463" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop17465" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop17467" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop17469" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop17471" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="linearGradient17807" + xlink:href="#XMLID_2275_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-177.1654,35.43307)" /> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="linearGradient17810" + xlink:href="#XMLID_2274_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-177.1654,35.43307)" /> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17812" + xlink:href="#XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)" /> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17814" + xlink:href="#XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="linearGradient17816" + xlink:href="#XMLID_1753_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17818" + xlink:href="#XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17347" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop17349" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop17351" /> + <a:midPointStop + offset="0" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="1" + style="stop-color:#96BAD6" /> + </linearGradient> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="linearGradient17379" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop17381" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop17383" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="1" + style="stop-color:#F2F2F2" /> + </linearGradient> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17862" + xlink:href="#XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,-166.1427,-0.18283)" /> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17864" + xlink:href="#XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <defs + id="defs3859"> + <polygon + points="465.54,213.52 481.94,217.46 482.74,216.71 487.46,198.05 471.08,194.07 470.26,194.83 465.54,213.52 " + id="XMLID_343_" /> + </defs> + <linearGradient + x1="471.0806" + y1="201.07761" + x2="481.91711" + y2="210.4977" + id="linearGradient17389" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#6498c1;stop-opacity:1" + offset="0.005618" + id="stop17391" /> + <stop + style="stop-color:#79a9cc;stop-opacity:1" + offset="0.2332" + id="stop17393" /> + <stop + style="stop-color:#a4cde2;stop-opacity:1" + offset="0.74049997" + id="stop17395" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="1" + id="stop17397" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="5.618000e-003" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="0.4438" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="1" /> + </linearGradient> + <clipPath + id="clipPath17400"> + <use + id="use17402" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_343_" /> + </clipPath> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17404" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop17406" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop17408" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop17410" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop17412" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17882" + xlink:href="#XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <defs + id="defs3826"> + <polygon + points="463.52,216.14 480.56,220.24 481.36,219.5 483.03,202.04 469.05,196.69 468.24,197.45 463.52,216.14 " + id="XMLID_338_" /> + </defs> + <linearGradient + x1="468.2915" + y1="204.7612" + x2="479.39871" + y2="214.4166" + id="linearGradient17357" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop17359" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop17361" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <clipPath + id="clipPath17364"> + <use + id="use17366" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_338_" /> + </clipPath> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17368" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop17370" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop17372" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop17374" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop17376" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" + id="linearGradient2387" + xlink:href="#linearGradient2381" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" /> + <linearGradient + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" + id="linearGradient5105" + xlink:href="#linearGradient2381" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" /> + <linearGradient + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" + id="linearGradient5145" + xlink:href="#linearGradient2381" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2381" + id="linearGradient2371" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" /> + </defs> + <g + transform="matrix(0.437808,-0.437808,0.437808,0.437808,-220.8237,43.55311)" + id="g5089"> + <path + d="M 8.4382985,-6.28125 C 7.8309069,-6.28125 4.125,-0.33238729 4.125,1.96875 L 4.125,28.6875 C 4.125,29.533884 4.7068159,29.8125 5.28125,29.8125 L 30.84375,29.8125 C 31.476092,29.8125 31.968751,29.319842 31.96875,28.6875 L 31.96875,23.46875 L 32.25,23.46875 C 32.74684,23.46875 33.156249,23.059339 33.15625,22.5625 L 33.15625,-5.375 C 33.15625,-5.8718398 32.74684,-6.28125 32.25,-6.28125 L 8.4382985,-6.28125 z " + transform="translate(282.8327,227.1903)" + style="fill:#5c5c4f;stroke:black;stroke-width:3.23021388;stroke-miterlimit:4;stroke-dasharray:none" + id="path5091" /> + <rect + width="27.85074" + height="29.369793" + rx="1.1414107" + ry="1.1414107" + x="286.96509" + y="227.63805" + style="fill:#032c87" + id="rect5093" /> + <path + d="M 288.43262,225.43675 L 313.67442,225.43675 L 313.67442,254.80655 L 287.29827,254.83069 L 288.43262,225.43675 z " + style="fill:white" + id="rect5095" /> + <path + d="M 302.44536,251.73726 C 303.83227,259.59643 301.75225,263.02091 301.75225,263.02091 C 303.99609,261.41329 305.71651,259.54397 306.65747,257.28491 C 307.62455,259.47755 308.49041,261.71357 310.9319,263.27432 C 310.9319,263.27432 309.33686,256.07392 309.22047,251.73726 L 302.44536,251.73726 z " + style="fill:#a70000;fill-opacity:1;stroke-width:2" + id="path5097" /> + <rect + width="25.241802" + height="29.736675" + rx="0.89682275" + ry="0.89682275" + x="290.73544" + y="220.92249" + style="fill:#809cc9" + id="rect5099" /> + <path + d="M 576.47347,725.93939 L 582.84431,726.35441 L 583.25121,755.8725 C 581.35919,754.55465 576.39694,752.1117 574.98889,754.19149 L 574.98889,727.42397 C 574.98889,726.60151 575.65101,725.93939 576.47347,725.93939 z " + transform="matrix(0.499065,-0.866565,0,1,0,0)" + style="fill:#4573b3;fill-opacity:1" + id="rect5101" /> + <path + d="M 293.2599,221.89363 L 313.99908,221.89363 C 314.45009,221.89363 314.81318,222.25673 314.81318,222.70774 C 315.02865,229.0361 295.44494,244.47124 292.44579,240.30491 L 292.44579,222.70774 C 292.44579,222.25673 292.80889,221.89363 293.2599,221.89363 z " + style="opacity:0.65536726;fill:url(#linearGradient2371);fill-opacity:1" + id="path5103" /> + </g> +</svg> diff --git a/doc/Language_Reference_Guide/publicanize-langref.sh b/doc/Language_Reference_Guide/publicanize-langref.sh new file mode 100755 index 00000000..fd4edf6a --- /dev/null +++ b/doc/Language_Reference_Guide/publicanize-langref.sh @@ -0,0 +1,157 @@ +#!/bin/bash +#this script converts the langref.tex source for the Language Reference Guide into +#DocBook XML. the conversion is done thru latexml, a utility that comes with dblatex-0.2.7. +#the output xml file of latexml is pretty dirty, so this script is needed to further clean it up. + +#copy latex file to here +cp ../langref.tex . + +#convert it to raw xml +latexml langref.tex --dest=Language_Reference_Guide.xml + +#remove excess whitespace +sed -i -e 's/^\s*//g' Language_Reference_Guide.xml + +sed -i -e 's/<!--\ %\*\*\*\* langref.tex Line [0-9]* \*\*\*\* -->//g' Language_Reference_Guide.xml + +cat Language_Reference_Guide.xml | +perl -p -e 'undef $/;s|<!-- %SystemTap Language Reference -->\n<\?latexml options="twoside,english" class="article"\?>\n<\?latexml package="geometry"\?>\n<\?latexml RelaxNGSchema="LaTeXML"\?>\n<\?latexml RelaxNGSchema="LaTeXML"\?>\n<document xmlns="http://dlmf.nist.gov/LaTeXML">\n<title>SystemTap Language Reference</title>|<\!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]>\n<book>\n<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />|msg' | +perl -p -e 'undef $/;s|<para xml:id="p1a">\n<p>This document was derived from other documents contributed to the SystemTap project by employees of Red Hat, IBM and Intel.</p>\n</para>\n<para xml:id="p2">\n<p>Copyright © 2007 Red Hat Inc.\nCopyright © 2007 IBM Corp.\nCopyright © 2007 Intel Corporation.</p>\n</para>\n<para xml:id="p3">\n<p>Permission is granted to copy, distribute and/or modify this document\nunder the terms of the GNU Free Documentation License, Version 1.2\nor any later version published by the Free Software Foundation;\nwith no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.</p>\n</para>\n<para xml:id="p4">\n<p>The GNU Free Documentation License is available from\n<ref class="url" href="http://www.gnu.org/licenses/fdl.html"><text font="typewriter">http://www.gnu.org/licenses/fdl.html</text></ref> or by writing to\nthe Free Software Foundation, Inc., 51 Franklin Street,\nFifth Floor, Boston, MA 02110-1301, USA.</p>\n</para>||msg' | +#fix up screens +perl -p -e 'undef $/;s|<itemize>\n<item>\n<verbatim font="typewriter">|<screen>|msg' | +perl -p -e 'undef $/;s|<itemize>\n<item>\n\n<verbatim font="typewriter">|<screen>|msg' | +perl -p -e 'undef $/;s|</verbatim>\n</item>\n</itemize>|</screen>|msg' | +perl -p -e 'undef $/;s|</verbatim>\n\n</item>\n</itemize>|</screen>|msg' | +#fix up index tags +perl -p -e 'undef $/;s|<index xml:id="idx">\n<title>Index</title>\n</index>|<index/>|msg' | +#needed later, for TABLES! +perl -p -e 'undef $/;s|</text>\n</td>|</entry>|msg' > clean.xml + +#further fix up headers! +perl -p -i -e 's|<\?latexml searchpaths="[^>]*>\n||g' clean.xml + + +#change main tags +sed -i -e 's/<\/document>/<\/book>/g' clean.xml + +#more fixup for screen tags +perl -p -i -e 's|<verbatim font="[^"]*">|<screen>|g' clean.xml +perl -p -i -e 's|</verbatim>|</screen>|g' clean.xml + +#clean section tags +sed -i -e 's/<section refnum="[0-9]*"/<section/g' clean.xml +sed -i -e 's/<section xml:id="[0-9S]*"/<section/g' clean.xml +sed -i -e 's/<section labels="LABEL:sec:/<section id="/g' clean.xml + +#clean subsection tags +sed -i -e 's/<subsection refnum="[0-9]*.[0-9]*"/<subsection/g' clean.xml +sed -i -e 's/<subsection xml:id="[S.0-9]*"/<subsection/g' clean.xml +sed -i -e 's/<subsection labels="LABEL:sub:/<subsection id="/g' clean.xml + +#clean subsubsection tags +sed -i -e 's/<subsubsection refnum="[S.0-9]*"/<subsubsection/g' clean.xml +sed -i -e 's/<subsubsection xml:id="[S.0-9]*"/<subsubsection/g' clean.xml +sed -i -e 's/<subsubsection labels="LABEL:sub:/<subsubsection id="/g' clean.xml + +#change section tags to chapter, yay +sed -i -e 's/<section/<chapter/g' clean.xml +sed -i -e 's/<\/section>/<\/chapter>/g' clean.xml + +#change subsection and subsubsection tags to section +sed -i -e 's/<subsection/<section/g' clean.xml +sed -i -e 's/<\/subsection>/<\/section>/g' clean.xml +sed -i -e 's/<subsubsection/<section/g' clean.xml +sed -i -e 's/<\/subsubsection>/<\/section>/g' clean.xml + +#remove <para, then replace <p> with <para> +sed -i -e 's/<para xml:id="[pS.0-9]*"/<para/g' clean.xml +sed -i -e 's/<para>//g' clean.xml +sed -i -e 's/<\/para>//g' clean.xml +sed -i -e 's/<p>/<para>/g' clean.xml +sed -i -e 's/<\/p>/<\/para>/g' clean.xml + +#properly convert xrefs +sed -i -e 's/<ref labelref="LABEL:sub:/<xref linkend="/g' clean.xml +sed -i -e 's/<ref labelref="LABEL:sec:/<xref linkend="/g' clean.xml + +#convert indexterms +sed -i -e 's/indexmark>/indexterm>/g' clean.xml +perl -p -i -e 's/<indexphrase key="[^"]*">/<primary>/g' clean.xml +sed -i -e 's/<indexphrase>/<primary>/g' clean.xml +sed -i -e 's/<\/indexphrase>/<\/primary>/g' clean.xml + +#convert <emph>s +sed -i -e 's/emph>/emphasis>/g' clean.xml + +#convert itemizedlists and listitems, dependent on successful exec of "fix up screens" perl routines +sed -i -e 's/<itemize xml:id="[Ii,0-9]*">/<itemizedlist>/g' clean.xml +sed -i -e 's/<item xml:id="[Ii.0-9]*">/<listitem>/g' clean.xml +sed -i -e 's/<\/itemize>/<\/itemizedlist>/g' clean.xml +sed -i -e 's/<\/item>/<\/listitem>/g' clean.xml + +#convert orderedlists and their respective listitems +perl -p -i -e 's|<enumerate xml:id="[^"]*">|<orderedlist>|g' clean.xml +perl -p -i -e 's|</enumerate>|</orderedlist>|g' clean.xml +perl -p -i -e 's|<item refnum="[^"]*" xml:id="[^"]*">|<listitem>|g' clean.xml + +#TRICKY: this perl expression takes all occurences of +# <ref class="url" href="http://sourceware.org/systemtap/wiki/HomePage"><text +# font="typewriter">http://sourceware.org/systemtap/wiki/HomePage</text></ref> +# and replaces the <text font=...</ref> string with "/>". from jfearn +# note: [^"]* means "any number of occurences of characters that are NOT quotes +# note: () groups strings/an expression together, which can be called later as $1 when replacing +perl -p -i -e 's|(<ref class="url" href="[^"]*")><text font="typewriter">[^<]*</text></ref>|$1/>|g' clean.xml + +#now, convert <ref class="url" to <ulink>s +sed -i -e 's/<ref class="url" href=/<ulink url=/g' clean.xml + +#TRICKY again: convert <text font=[var]> accordingly; bold is <computeroutput>, typewriter is <command> +perl -p -i -e 's|(<text font="bold">[^<]*)</text>|$1</computeroutput>|g' clean.xml +sed -i -e 's/<text font="bold">/<computeroutput>/g' clean.xml +perl -p -i -e 's|(<text font="typewriter">[^<]*)</text>|$1</command>|g' clean.xml +sed -i -e 's/<text font="typewriter">/<command>/g' clean.xml + +#weird remainders, defaulting them to command +perl -p -i -e 's|(<text font="typewriter bold">[^<]*)</text>|$1</command>|g' clean.xml +sed -i -e 's/<text font="typewriter bold">/<command>/g' clean.xml +perl -p -i -e 's|(<text font="smallcaps">[^<]*)</text>|$1</emphasis>|g' clean.xml +sed -i -e 's/<text font="smallcaps">/<emphasis>/g' clean.xml + +#TABLES! +#the first expression is quite dirty, since it assumes that all tables have 3 columns. dunno yet how to +#automagicize this, since the orig XML doesn't have any attribute that specifies columns per table +sed -i -e 's/<tabular>/<tgroup cols="3">/g' clean.xml +sed -i -e 's/tabular>/tgroup>/g' clean.xml +perl -p -i -e 's|<table placement="[^"]*" refnum="[^"]*" xml:id="([^"]*">)|<table id="$1|g' clean.xml +sed -i -e 's/caption>/title>/g' clean.xml +sed -i -e 's/tr>/row>/g' clean.xml +perl -p -i -e 's|<td[^>]*>||g' clean.xml +sed -i -e 's/<text>/<entry>/g' clean.xml + +#this is needed because some indexterms have been nested inside commands *sigh* +perl -p -i -e 's|(<command>[^<]*<indexterm><primary>[^<]*</primary></indexterm>)</text>|$1</command>|g' clean.xml +#this is needed because some closer tags for <text> are on new lines; is a dirty hack since we simply +#assume that all of them are </command> +sed -i -e 's/<\/text>/<\/command>/g' clean.xml + +#clean up error tags +perl -p -i -e 's|<ERROR [^/]*/ERROR>|<!-- ERROR TAG REMOVED -->|g' clean.xml +#clean up "Math" tags (like, wtf) +perl -p -i -e 's|<Math [^>]*><XMath><XMApp>|<command>|g' clean.xml +perl -p -i -e 's|<XMTok [^>]*>||g' clean.xml +perl -p -i -e 's|</XMTok>||g' clean.xml +perl -p -i -e 's|</XMApp>||g' clean.xml +perl -p -i -e 's|</XMath>||g' clean.xml +perl -p -i -e 's|</Math>|</command>|g' clean.xml + +#remove "About this guide" section +#perl -p -i -e 'undef $/;s|<section>\n<title>About this guide</title>||msg' clean.xml + +#finalize: copy clean.xml to en-US, then deletes it +cp clean.xml en-US/Language_Reference_Guide.xml + +#delete excess files +rm langref.tex +rm clean.xml +rm Language_Reference_Guide.xml diff --git a/doc/Makefile.in b/doc/Makefile.in index e23a6699..93753666 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -163,7 +163,6 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ PDF_FILES = tutorial.pdf langref.pdf diff --git a/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml b/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml index 07c3f74d..8128fb07 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml @@ -5,7 +5,7 @@ <bookinfo id="SystemTap_Beginners_Guide"> <title>SystemTap Beginners Guide</title> <subtitle condition="RedHat">Introduction to SystemTap (for Red Hat Enterprise Linux 5.3)</subtitle> - <subtitle condition="fedora">Introduction to SystemTap (for Fedora Core 10)</subtitle> + <subtitle condition="fedora">Introduction to SystemTap (for Fedora 10)</subtitle> <edition>2.0</edition> <productname>Red Hat Enterprise Linux</productname> @@ -14,7 +14,7 @@ <pubsnumber>2</pubsnumber> <abstract condition="RedHat"><para>This guide provides basic instructions on how to use SystemTap to monitor different subsystems of &PRODUCT; in finer detail. The <citetitle>SystemTap Beginners Guide</citetitle> is recommended for users who have taken <ulink url="https://www.redhat.com/courses/rh133_red_hat_linux_system_administration_and_rhct_exam/">RHCT</ulink> or have a similar level of expertise in &PRODUCT;.</para></abstract> - <abstract condition="fedora"><para>This guide provides basic instructions on how to use SystemTap to monitor different subsystems of Fedora Core 10 in finer detail. The <citetitle>SystemTap Beginners Guide</citetitle> is recommended for users who have taken <ulink url="https://www.redhat.com/courses/rh133_red_hat_linux_system_administration_and_rhct_exam/">RHCT</ulink> or have a similar level of expertise in Fedora Core 10.</para></abstract> + <abstract condition="fedora"><para>This guide provides basic instructions on how to use SystemTap to monitor different subsystems of Fedora 10 in finer detail. The <citetitle>SystemTap Beginners Guide</citetitle> is recommended for users who have taken <ulink url="https://www.redhat.com/courses/rh133_red_hat_linux_system_administration_and_rhct_exam/">RHCT</ulink> or have a similar level of expertise in Fedora 10.</para></abstract> <corpauthor> <inlinemediaobject> <imageobject> diff --git a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml index afb9e738..0b52cc7b 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml @@ -103,7 +103,7 @@ </indexterm> <para condition="RedHat">SystemTap was originally developed to provide functionality for &PROD; similar to previous Linux probing tools such as <application>dprobes</application> and the Linux Trace Toolkit. SystemTap aims to supplement the existing suite of Linux monitoring tools by providing users with the infrastructure to track kernel activity. In addition, SystemTap combines this capability with two things:</para> -<para condition="fedora">SystemTap was originally developed to provide functionality for Fedora Core 10 similar to previous Linux probing tools such as <application>dprobes</application> and the Linux Trace Toolkit. SystemTap aims to supplement the existing suite of Linux monitoring tools by providing users with the infrastructure to track kernel activity. In addition, SystemTap combines this capability with two things:</para> +<para condition="fedora">SystemTap was originally developed to provide functionality for Fedora 10 similar to previous Linux probing tools such as <application>dprobes</application> and the Linux Trace Toolkit. SystemTap aims to supplement the existing suite of Linux monitoring tools by providing users with the infrastructure to track kernel activity. In addition, SystemTap combines this capability with two things:</para> <!-- <para>SystemTap was originally developed as a working &PROD; version of old Linux probing tools such as <application>dprobes</application> and the Linux Trace Toolkit. Further, SystemTap can also be considered the Linux answer to <firstterm>Dtrace</firstterm>. Dtrace is a Sun Microsystems "dynamic tracing" framework that assists administrators in monitoring and troubleshooting kernel and user-space applications in real time.</para> diff --git a/doc/SystemTap_Tapset_Reference/tapsets.tmpl b/doc/SystemTap_Tapset_Reference/tapsets.tmpl index d6b3b309..892d30a9 100644 --- a/doc/SystemTap_Tapset_Reference/tapsets.tmpl +++ b/doc/SystemTap_Tapset_Reference/tapsets.tmpl @@ -51,9 +51,9 @@ </para> </legalnotice> </bookinfo> - +<!-- pls dont remove marker comments, as they are used in publican conversion--> <toc></toc> - +<!--starthere--> <chapter id="introduction"> <title>Introduction</title> <para> @@ -98,7 +98,6 @@ the kernel. This is common among asynchronous events such as timers, exit functions, and print functions. </para> - <!-- <varlistentry> <term></term> @@ -111,13 +110,15 @@ </section> </chapter> - +<!--endhere--> +<!--markerforxi--> +<!-- pls dont remove marker comments, as they are used in publican conversion--> <chapter id="context_stp"> <title>Context Functions</title> <para> - The context functions provide additional information about the where - the event occurred. - These functions can provide information such as a backtrace + The context functions provide additional information about where + an event occurred. + These functions can provide information such as a backtrace to where the event occured and the current register values for the processor. </para> @@ -130,23 +131,27 @@ <title>Timestamp Functions</title> <para> Each timestamp function returns a value to indicate when - the function is executed. - Thus, these returned values can be used to indicate - when an event occurs, provide an ordering for events, or compute - the amount of time elapsed between to time stamps. + a function is executed. + These returned values can then be used to indicate + when an event occurred, provide an ordering for events, or compute + the amount of time elapsed between two time stamps. </para> !Itapset/timestamp.stp </chapter> <chapter id="memory_stp"> <title>Memory Tapset</title> + <para> + This family of probe points is used to probe memory-related events. + It contains the following probe points: + </para> !Itapset/memory.stp </chapter> <chapter id="iosched.stp"> <title>IO Scheduler Tapset</title> <para> - This family of probe points is used to probe the IO scheduler activities. + This family of probe points is used to probe IO scheduler activities. It contains the following probe points: </para> !Itapset/ioscheduler.stp @@ -155,7 +160,7 @@ <chapter id="scsi.stp"> <title>SCSI Tapset</title> <para> - This family of probe points is used to probe the SCSI activities. + This family of probe points is used to probe SCSI activities. It contains the following probe points: </para> !Itapset/scsi.stp @@ -165,9 +170,11 @@ <title>Networking Tapset</title> <para> This family of probe points is used to probe the activities of - network device. + the network device, TCP layer, and UDP layer. </para> !Itapset/networking.stp +!Itapset/tcp.stp +!Itapset/udp.stp </chapter> <chapter id="socket.stp"> @@ -178,14 +185,14 @@ </para> !Itapset/socket.stp </chapter> - +<!-- <chapter id="tcp.stp"> <title>TCP Tapset</title> <para> This family of probe points is used to probe TCP layer activities. It contains the following probe points: </para> -!Itapset/tcp.stp + </chapter> <chapter id="upd.stp"> @@ -194,13 +201,13 @@ This family of probe points is used to probe UDP layer activities. It contains the following probe points: </para> -!Itapset/udp.stp - </chapter> + </chapter> +--> <chapter id="process.stp"> <title>Process Tapset</title> <para> - This family of probe points is used to probe the process activities. + This family of probe points is used to probe process-related activities. It contains the following probe points: </para> !Itapset/process.stp diff --git a/doc/Tapset_Reference_Guide/Makefile b/doc/Tapset_Reference_Guide/Makefile new file mode 100644 index 00000000..87a1fb5f --- /dev/null +++ b/doc/Tapset_Reference_Guide/Makefile @@ -0,0 +1,15 @@ +#Makefile for Tapset_Reference_Guide + +XML_LANG = en-US +DOCNAME = Tapset_Reference_Guide +#PRODUCT = FIX_ME! +BRAND = fedora + +#OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW + +# Extra Parameters start here + +# Extra Parameters stop here +COMMON_CONFIG = /usr/share/publican +include $(COMMON_CONFIG)/make/Makefile.common + diff --git a/doc/Tapset_Reference_Guide/README b/doc/Tapset_Reference_Guide/README new file mode 100644 index 00000000..1f27abe7 --- /dev/null +++ b/doc/Tapset_Reference_Guide/README @@ -0,0 +1,35 @@ +This is an automated source build of the SystemTap_Tapset_Reference Guide, +used to build it in Publican. + +To build the DocBook XML source (required by Publican), run: + + bash publicanize.sh + +This will copy and clean the XML source of SystemTap_Tapset_Reference +created by kernel-doc. You can now build it in pdf, html, etc using +Publican. + +The main source of the Language Reference Guide is: + + ../SystemTap_Tapset_Reference/tapsets.xml + +This main source is generated by kernel-doc when you run 'make' in the +main git tree. The tapset documentation inside is collected from all +tapset files defined in the following template file: + + ../SystemTap_Tapset_Reference/tapsets.tmpl + +The tapset file definitions appear in tapsets.tmpl as: + + !Itapset/context.stp + !Itapset/context-symbols.stp + etc + +context.stp, context-symbols, and all the other tapset files are located in: + + ../../tapset + +All tapset documentation should be done inside their respective tapset files. +For more information about this project, refer to: + + http://sourceware.org/systemtap/wiki/ProjectTapsetReferenceGuide
\ No newline at end of file diff --git a/doc/Tapset_Reference_Guide/en-US/Book_Info.xml b/doc/Tapset_Reference_Guide/en-US/Book_Info.xml new file mode 100644 index 00000000..ddf0f205 --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/Book_Info.xml @@ -0,0 +1,36 @@ +<?xml version='1.0'?> +<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<bookinfo id="Tapset_Reference_Guide-Red_Hat_Enterprise_Linux"> + <title>Tapset Reference Guide</title> + <subtitle>For SystemTap in Fedora 10</subtitle> + <productname>Fedora</productname> + <productnumber>10</productnumber> + <edition>1.0</edition> + <pubsnumber>0</pubsnumber> + <abstract> + <para> + The <citetitle>Tapset Reference Guide</citetitle> describes the most common tapset definitions + users can apply to SystemTap scripts. All included tapsets documented in this guide are current + as of Fedora 10 and the latest upstream version of SystemTap. + </para> + </abstract> + <corpauthor> + <inlinemediaobject> + <imageobject> + <imagedata format='SVG' fileref="Common_Content/images/title_logo.svg" /> + </imageobject> + <textobject><phrase>Logo</phrase></textobject> + </inlinemediaobject> + </corpauthor> + <copyright> + <year>&YEAR;</year> + <holder>&HOLDER;</holder> + </copyright> + <xi:include href="Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</bookinfo> + + + diff --git a/doc/Tapset_Reference_Guide/en-US/Introduction.xml b/doc/Tapset_Reference_Guide/en-US/Introduction.xml new file mode 100644 index 00000000..633521e1 --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/Introduction.xml @@ -0,0 +1,59 @@ +<?xml version='1.0'?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<chapter id="introduction"> + <title>Introduction</title> + + <para> + SystemTap provides free software (GPL) infrastructure to simplify the + gathering of information about the running Linux system. This assists + diagnosis of a performance or functional problem. SystemTap eliminates the + need for the developer to go through the tedious and disruptive instrument, + recompile, install, and reboot sequence that may be otherwise required to + collect data. + </para> + + <para> + SystemTap provides a simple command line interface and scripting language + for writing instrumentation for a live, running kernel. This instrumentation + uses probe points and functions provided in the <firstterm>tapset</firstterm> library. + </para> + + <para> + Simply put, tapsets are scripts that encapsulate knowledge about a kernel subsystem + into pre-written probes and functions that can be used by other scripts. + Tapsets are analogous to libraries for C programs. They hide the + underlying details of a kernel area while exposing the key information + needed to manage and monitor that aspect of the kernel. They are typically + developed by kernel subject-matter experts. + </para> + + <para> + A tapset exposes the high-level data and state transitions of a + subsystem. For the most part, good tapset developers assume that + SystemTap users know little to nothing about the kernel subsystem's + low-level details. As such, tapset developers write tapsets that help + ordinary SystemTap users write meaningful and useful SystemTap scripts. + </para> + +<!-- add xref to upcoming section on how to write Tapsets/Tapset Comments --> + + <section id="docsgoals"> + <title>Documentation Goals</title> + + <para> + This guide aims to document SystemTap's most useful and common tapset entries; it + also contains guidelines on proper tapset development and documentation. + The tapset definitions contained in this guide are extracted automatically from + properly-formatted comments in the code of each tapset file. As such, any revisions + to the definitions in this guide should be applied directly to their respective + tapset file. + </para> + +<remark>add: "while users can read from code, it's easier to read from here!"</remark> +<remark>add: target audience, expected proficiency of readers</remark> + + </section> + +</chapter>
\ No newline at end of file diff --git a/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml b/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml new file mode 100644 index 00000000..1fcb7b99 --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/Legal_Notice.xml @@ -0,0 +1,30 @@ +<?xml version='1.0'?> +<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<legalnotice> + <para> + This documentation is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + </para> + + <para> + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + </para> + + <para> + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + </para> + + <para> + For more details see the file COPYING in the source + distribution of Linux. + </para> +</legalnotice> diff --git a/doc/Tapset_Reference_Guide/en-US/Preface.xml b/doc/Tapset_Reference_Guide/en-US/Preface.xml new file mode 100644 index 00000000..6acf0c3e --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/Preface.xml @@ -0,0 +1,15 @@ +<?xml version='1.0'?> +<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<preface id="Tapset_Reference_Guide-Preface"> + <title>Preface</title> + <para> + </para> + <xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + </xi:fallback> + </xi:include> +</preface> diff --git a/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml b/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml new file mode 100644 index 00000000..d497eae6 --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/Tapset_Dev_Guide.xml @@ -0,0 +1,296 @@ +<?xml version='1.0'?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<chapter id="Tapset_Dev_Guide"> + <title>Tapset Development Guidelines</title> + +<para> + This chapter describes the upstream guidelines on proper tapset documentation. It also contains + information on how to properly document your tapsets, to ensure that they are properly + defined in this guide. +</para> + + <section id="Tapsetcontents"> + <title>Writing Good Tapsets</title> + +<para> + The first step to writing good tapsets is to create a simple model of your subject area. For + example, a model of the process subsystem might include the following: +</para> + +<formalpara> + <title>Key Data</title> + <para> + <itemizedlist> + <listitem><para>process ID</para></listitem> + <listitem><para>parent process ID</para></listitem> + <listitem><para>process group ID</para></listitem> + </itemizedlist> + </para> +</formalpara> + +<formalpara> + <title>State Transitions</title> + <para> + <itemizedlist> + <listitem><para>forked</para></listitem> + <listitem><para>exec'd</para></listitem> + <listitem><para>running</para></listitem> + <listitem><para>stopped</para></listitem> + <listitem><para>terminated</para></listitem> + </itemizedlist> + </para> +</formalpara> + +<note> + <title>Note</title> + <para>Both lists are examples, and are not meant to represent a complete list.</para> +</note> + +<para> + Use your subsystem expertise to find probe points (function entries and + exits) that expose the elements of the model, then define probe aliases + for those points. Be aware that some state transitions can occur in more + than one place. In those cases, an alias can place a probe in multiple + locations. +</para> + +<para> + For example, process execs can occur in either the <command>do_execve()</command> or the + <command>compat_do_execve()</command> functions. The following alias inserts probes at the + beginning of those functions: +</para> + +<para> +<programlisting> +probe process.exec = kernel.function("do_execve"), +kernel.function("compat_do_execve") +{<replaceable>probe body</replaceable>} +</programlisting> +</para> + +<para> + Try to place probes on stable interfaces (i.e., functions + that are unlikely to change at the interface level) whenever possible. This will + make the tapset less likely to break due to kernel changes. Where + kernel version or architecture dependencies are unavoidable, use + preprocessor conditionals (see the <command>stap(1)</command> man page for details). +</para> + + +<para> + Fill in the probe bodies with the key data available at the probe points. + Function entry probes can access the entry parameters specified to + the function, while exit probes can access the entry parameters and the + return value. Convert the data into meaningful forms where appropriate + (e.g., bytes to kilobytes, state values to strings, etc). +</para> + +<para> + You may need to use auxiliary functions to access or convert some of the data. Auxiliary + functions often use embedded C to do things that cannot be done in the + SystemTap language, like access structure fields in some contexts, follow + linked lists, etc. You can use auxiliary functions defined in other tapsets + or write your own. +</para> + +<para> + In the following example, <command>copy_process()</command> returns a + pointer to the <command>task_struct</command> for the new process. Note + that the process ID of the new process is retrieved by calling + <command>task_pid()</command> and passing it the <command>task_struct</command> + pointer. In this case, the auxiliary function is an embedded C function + defined in <filename>task.stp</filename>. +</para> + +<para> +<programlisting> +probe process.create = kernel.function("copy_process").return +{ + task = $return + new_pid = task_pid(task) +} +</programlisting> +</para> + +<para> + It is not advisable to write probes for every function. Most SystemTap users + will not need or understand them. Keep your tapsets simple and high-level. +</para> + +<remark>info from here:http://sources.redhat.com/git/?p=systemtap.git;a=blob_plain;f=tapset/DEVGUIDE</remark> + + </section> + +<section id="Tapsetelements"> + <title>Elements of a Tapset</title> + + <para> + The following sections describe the most important aspects of writing a tapset. Most of + the content herein is suitable for developers who wish to contribute to + SystemTap's upstream library of tapsets. + </para> + +<section id="Tapsetelements-tapsetfiles"> + <title>Tapset Files</title> + + <para> + Tapset files are stored in <filename><replaceable>src</replaceable>/tapset/</filename> + of the SystemTap GIT directory. Most tapset files are kept at that level. If you have + code that only works with a specific architecture or kernel version, you may + choose to put your tapset in the appropriate subdirectory. + </para> + + <para> + Installed tapsets are located in <filename>/usr/share/systemtap/tapset/</filename> + or <filename>/usr/local/share/systemtap/tapset</filename>. + </para> + + <para> + Personal tapsets can be stored anywhere. However, to ensure that SystemTap + can use them, use <command>-I <replaceable>tapset_directory</replaceable></command> + to specify their location when invoking <command>stap</command>. + </para> +</section> + +<section id="Tapsetelements-namespace"> + <title>Namespace</title> + + + <para> + Probe alias names should take the form + <command><replaceable>tapset_name.probe_name</replaceable></command>. + For example, the probe for sending a signal could be named + <command>signal.send</command>. + </para> + + <para> + Global symbol names (probes, functions, and variables) should be unique + accross all tapsets. This helps avoid namespace collisions in scripts + that use multiple tapsets. To ensure this, use tapset-specific + prefixes in your global symbols. + </para> + + <para> + Internal symbol names should be prefixed with an underscore + (<command>_</command>). + </para> +</section> + +<section id="Tapsetelements-docscomments"> + <title>Comments and Documentation</title> + + <para> + All probes and functions should include comment blocks that describe + their purpose, the data they provide, and the context in which they run + (e.g. interrupt, process, etc). Use comments in areas where your intent may not + be clear from reading the code. + </para> + + <para> + Note that specially-formatted comments are automatically extracted from most + tapsets and included in this guide. This helps ensure that tapset contributors + can write their tapset <emphasis>and</emphasis> document it in the same place. + The specified format for documenting tapsets is as follows: + </para> + +<para> +<programlisting> +/** + * probe tapset.name - Short summary of what the tapset does. + * @argument: Explanation of argument. + * @argument2: Explanation of argument2. Probes can have multiple arguments. + * + * Context: + * A brief explanation of the tapset context. + * Note that the context should only be 1 paragraph short. + * + * Text that will appear under "Description." + * + * A new paragraph that will also appear under the heading "Description". + * + * Header: + * A paragraph that will appear under the heading "Header". + **/ +</programlisting> +</para> + +<para>For example:</para> + +<para> +<programlisting> +/** + * probe vm.write_shared_copy- Page copy for shared page write. + * @address: The address of the shared write. + * @zero: Boolean indicating whether it is a zero page + * (can do a clear instead of a copy). + * + * Context: + * The process attempting the write. + * + * Fires when a write to a shared page requires a page copy. This is + * always preceded by a <command>vm.shared_write</command>. + **/ +</programlisting> +</para> + +<para>To override the automatically-generated <command>Synopsis</command> content, use:</para> + +<para> +<programlisting> + * Synopsis: + * <replaceable>New Synopsis string</replaceable> + * +</programlisting> +</para> + +<para>For example:</para> + +<para> +<programlisting> +/** + * probe signal.handle - Fires when the signal handler is invoked + * @sig: The signal number that invoked the signal handler + * + * Synopsis: + * <programlisting>static int handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, + * sigset_t *oldset, struct pt_regs * regs)</programlisting> + */ +</programlisting> +</para> + +<para> + It is recommended that you use the <command><programlisting></command> tag in + this instance, since overriding the <command>Synopsis</command> content of an entry + does not automatically form the necessary tags. +</para> + +<para> + For the purposes of improving the DocBook XML output of your comments, you can also + use the following XML tags in your comments: +</para> + +<itemizedlist> + <listitem><para><command>command</command></para></listitem> + <listitem><para><command>emphasis</command></para></listitem> + <listitem><para><command>programlisting</command></para></listitem> + <listitem><para><command>remark</command> (tagged strings will appear in Publican beta + builds of the document)</para></listitem> +</itemizedlist> + + +</section> + +</section> + +<!-- +<section id="Tapset_Reference_Guide-Test-Section_2_Test"> + <title>Section 2 Test</title> + <para> + Test of a section + </para> +</section> +--> +</chapter> + diff --git a/doc/Tapset_Reference_Guide/en-US/Tapset_Reference_Guide.ent b/doc/Tapset_Reference_Guide/en-US/Tapset_Reference_Guide.ent new file mode 100644 index 00000000..6638d812 --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/Tapset_Reference_Guide.ent @@ -0,0 +1,5 @@ +<!ENTITY PRODUCT "Red_Hat_Enterprise_Linux"> +<!ENTITY BOOKID "Tapset_Reference_Guide"> +<!ENTITY YEAR "2008"> +<!ENTITY RHEL "Red Hat Enterprise Linux 5"> +<!ENTITY APH "'">
\ No newline at end of file diff --git a/doc/Tapset_Reference_Guide/en-US/images/icon.svg b/doc/Tapset_Reference_Guide/en-US/images/icon.svg new file mode 100644 index 00000000..c471a607 --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/images/icon.svg @@ -0,0 +1,3936 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:ns="http://ns.adobe.com/AdobeSVGViewerExtensions/3/" + xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.0" + width="32" + height="32" + id="svg3017" + sodipodi:version="0.32" + inkscape:version="0.44+devel" + sodipodi:docname="book.svg" + sodipodi:docbase="/home/andy/Desktop"> + <metadata + id="metadata489"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + inkscape:window-height="480" + inkscape:window-width="858" + inkscape:pageshadow="0" + inkscape:pageopacity="0.0" + guidetolerance="10.0" + gridtolerance="10.0" + objecttolerance="10.0" + borderopacity="1.0" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + inkscape:zoom="1" + inkscape:cx="16" + inkscape:cy="15.944056" + inkscape:window-x="0" + inkscape:window-y="33" + inkscape:current-layer="svg3017" /> + <defs + id="defs3019"> + <linearGradient + id="linearGradient2381"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop2383" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="stop2385" /> + </linearGradient> + <linearGradient + x1="415.73831" + y1="11.854" + x2="418.13361" + y2="18.8104" + id="XMLID_1758_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8362,0.5206,-1.1904,0.992,147.62,-30.9374)"> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="0" + id="stop3903" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop3905" /> + <a:midPointStop + style="stop-color:#CCCCCC" + offset="0" /> + <a:midPointStop + style="stop-color:#CCCCCC" + offset="0.5" /> + <a:midPointStop + style="stop-color:#F2F2F2" + offset="1" /> + </linearGradient> + <linearGradient + x1="500.70749" + y1="-13.2441" + x2="513.46442" + y2="-2.1547" + id="XMLID_1757_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop3890" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop3892" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <clipPath + id="XMLID_1755_"> + <use + id="use3874" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_343_" /> + </clipPath> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop3877" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop3879" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop3881" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop3883" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="471.0806" + y1="201.07761" + x2="481.91711" + y2="210.4977" + id="XMLID_1754_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#6498c1;stop-opacity:1" + offset="0.005618" + id="stop3863" /> + <stop + style="stop-color:#79a9cc;stop-opacity:1" + offset="0.2332" + id="stop3865" /> + <stop + style="stop-color:#a4cde2;stop-opacity:1" + offset="0.74049997" + id="stop3867" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="1" + id="stop3869" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="5.618000e-003" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="0.4438" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="1" /> + </linearGradient> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="XMLID_1753_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop3851" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop3853" /> + <a:midPointStop + style="stop-color:#B2B2B2" + offset="0" /> + <a:midPointStop + style="stop-color:#B2B2B2" + offset="0.5" /> + <a:midPointStop + style="stop-color:#F2F2F2" + offset="1" /> + </linearGradient> + <clipPath + id="XMLID_1751_"> + <use + id="use3837" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_338_" /> + </clipPath> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop3840" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop3842" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop3844" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop3846" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="468.2915" + y1="204.7612" + x2="479.39871" + y2="214.4166" + id="XMLID_1750_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop3830" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop3832" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop3818" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop3820" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <linearGradient + x1="501.0903" + y1="-19.2544" + x2="531.85413" + y2="0.72390002" + id="XMLID_1748_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop3803" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop3805" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop3807" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop3809" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="XMLID_2275_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop9947" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop9949" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop9951" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop9953" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <clipPath + id="XMLID_2273_"> + <use + id="use9933" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_960_" /> + </clipPath> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="XMLID_2274_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop9936" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop9938" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop9940" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop9942" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <linearGradient + x1="478.21341" + y1="-131.9297" + x2="469.85818" + y2="-140.28481" + id="XMLID_2272_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.5592,0.829,-0.829,0.5592,101.3357,-104.791)"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop9917" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop9919" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop9921" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop9923" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <marker + refX="0" + refY="0" + orient="auto" + style="overflow:visible" + id="TriangleInM"> + <path + d="M 5.77,0 L -2.88,5 L -2.88,-5 L 5.77,0 z " + transform="scale(-0.4,-0.4)" + style="fill:#5c5c4f" + id="path3197" /> + </marker> + <linearGradient + x1="200.7363" + y1="100.4028" + x2="211.99519" + y2="89.143997" + id="XMLID_3298_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#bfbfbf;stop-opacity:1" + offset="0" + id="stop20103" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop20105" /> + <a:midPointStop + offset="0" + style="stop-color:#BFBFBF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#BFBFBF" /> + <a:midPointStop + offset="1" + style="stop-color:#F2F2F2" /> + </linearGradient> + <linearGradient + x1="200.7363" + y1="100.4028" + x2="211.99519" + y2="89.143997" + id="linearGradient36592" + xlink:href="#XMLID_3298_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="181.2925" + y1="110.8481" + x2="192.6369" + y2="99.5037" + id="XMLID_3297_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="stop20096" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop20098" /> + <a:midPointStop + offset="0" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="181.2925" + y1="110.8481" + x2="192.6369" + y2="99.5037" + id="linearGradient36595" + xlink:href="#XMLID_3297_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="211.77589" + y1="105.7749" + x2="212.6619" + y2="108.2092" + id="XMLID_3296_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#0f6124;stop-opacity:1" + offset="0" + id="stop20087" /> + <stop + style="stop-color:#219630;stop-opacity:1" + offset="1" + id="stop20089" /> + <a:midPointStop + offset="0" + style="stop-color:#0F6124" /> + <a:midPointStop + offset="0.5" + style="stop-color:#0F6124" /> + <a:midPointStop + offset="1" + style="stop-color:#219630" /> + </linearGradient> + <linearGradient + x1="211.77589" + y1="105.7749" + x2="212.6619" + y2="108.2092" + id="linearGradient36677" + xlink:href="#XMLID_3296_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="208.9834" + y1="116.8296" + x2="200.0811" + y2="96.834602" + id="XMLID_3295_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop20076" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.5" + id="stop20078" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop20080" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="208.9834" + y1="116.8296" + x2="200.0811" + y2="96.834602" + id="linearGradient36604" + xlink:href="#XMLID_3295_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="195.5264" + y1="97.911102" + x2="213.5213" + y2="115.9061" + id="XMLID_3294_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="0" + id="stop20069" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop20071" /> + <a:midPointStop + offset="0" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="0.5" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="195.5264" + y1="97.911102" + x2="213.5213" + y2="115.9061" + id="linearGradient36607" + xlink:href="#XMLID_3294_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="186.1938" + y1="109.1343" + x2="206.6881" + y2="88.639999" + id="XMLID_3293_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop20056" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.16850001" + id="stop20058" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.23029999" + id="stop20060" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.2809" + id="stop20062" /> + <stop + style="stop-color:#c2c2c2;stop-opacity:1" + offset="0.5" + id="stop20064" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.1685" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.2303" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.2809" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#C2C2C2" /> + </linearGradient> + <linearGradient + x1="186.1938" + y1="109.1343" + x2="206.6881" + y2="88.639999" + id="linearGradient36610" + xlink:href="#XMLID_3293_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <linearGradient + x1="184.8569" + y1="112.2676" + x2="211.94099" + y2="89.541397" + id="XMLID_3292_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop20043" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.16850001" + id="stop20045" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.23029999" + id="stop20047" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0.2809" + id="stop20049" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop20051" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.1685" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.2303" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.2809" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="184.8569" + y1="112.2676" + x2="211.94099" + y2="89.541397" + id="linearGradient36613" + xlink:href="#XMLID_3292_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.029078,0,0,1,-183.2624,-79.44655)" /> + <marker + refX="0" + refY="0" + orient="auto" + style="overflow:visible" + id="TriangleOutM"> + <path + d="M 5.77,0 L -2.88,5 L -2.88,-5 L 5.77,0 z " + transform="scale(0.4,0.4)" + style="fill:#5c5c4f;fill-rule:evenodd;stroke-width:1pt;marker-start:none" + id="path3238" /> + </marker> + <linearGradient + x1="165.3" + y1="99.5" + x2="165.3" + y2="115.9" + id="XMLID_3457_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#999;stop-opacity:1" + offset="0" + id="stop8309" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0.30000001" + id="stop8311" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="1" + id="stop8313" /> + <a:midPointstop + offset="0" + style="stop-color:#999999" /> + <a:midPointstop + offset="0.5" + style="stop-color:#999999" /> + <a:midPointstop + offset="0.3" + style="stop-color:#B2B2B2" /> + <a:midPointstop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointstop + offset="1" + style="stop-color:#B2B2B2" /> + </linearGradient> + <linearGradient + x1="165.3" + y1="99.5" + x2="165.3" + y2="115.9" + id="lg1997" + xlink:href="#XMLID_3457_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="175" + y1="99.800003" + x2="175" + y2="112.5" + id="XMLID_3456_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="0" + id="stop8300" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="0.60000002" + id="stop8302" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="1" + id="stop8304" /> + <a:midPointstop + offset="0" + style="stop-color:#737373" /> + <a:midPointstop + offset="0.5" + style="stop-color:#737373" /> + <a:midPointstop + offset="0.6" + style="stop-color:#191919" /> + <a:midPointstop + offset="0.5" + style="stop-color:#191919" /> + <a:midPointstop + offset="1" + style="stop-color:#191919" /> + </linearGradient> + <linearGradient + x1="175" + y1="99.800003" + x2="175" + y2="112.5" + id="lg2000" + xlink:href="#XMLID_3456_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="168.8" + y1="107.1" + x2="164.5" + y2="110" + id="XMLID_3455_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#666;stop-opacity:1" + offset="0" + id="stop8291" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="0.69999999" + id="stop8293" /> + <stop + style="stop-color:#191919;stop-opacity:1" + offset="1" + id="stop8295" /> + <a:midPointstop + offset="0" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.5" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.7" + style="stop-color:#191919" /> + <a:midPointstop + offset="0.5" + style="stop-color:#191919" /> + <a:midPointstop + offset="1" + style="stop-color:#191919" /> + </linearGradient> + <linearGradient + x1="168.8" + y1="107.1" + x2="164.5" + y2="110" + id="lg2003" + xlink:href="#XMLID_3455_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + id="lg63694"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop63696" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="stop63698" /> + </linearGradient> + <linearGradient + x1="458" + y1="483" + x2="465.20001" + y2="271.39999" + id="lg2006" + xlink:href="#lg63694" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(6.3e-2,0,0,6.3e-2,-1.3,-9.8)" /> + <linearGradient + x1="176.3" + y1="110.1" + x2="158.7" + y2="105" + id="XMLID_3453_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#666;stop-opacity:1" + offset="0" + id="stop8271" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="0.2" + id="stop8273" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop8275" /> + <a:midPointstop + offset="0" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.5" + style="stop-color:#666666" /> + <a:midPointstop + offset="0.2" + style="stop-color:#737373" /> + <a:midPointstop + offset="0.5" + style="stop-color:#737373" /> + <a:midPointstop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="176.3" + y1="110.1" + x2="158.7" + y2="105" + id="lg2009" + xlink:href="#XMLID_3453_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="173.60001" + y1="118.9" + x2="172.8" + y2="128.2" + id="XMLID_3449_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8232" /> + <stop + style="stop-color:#fff95e;stop-opacity:1" + offset="0.60000002" + id="stop8234" /> + <stop + style="stop-color:#ecd600;stop-opacity:1" + offset="1" + id="stop8236" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.6" + style="stop-color:#FFF95E" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFF95E" /> + <a:midPointstop + offset="1" + style="stop-color:#ECD600" /> + </linearGradient> + <linearGradient + x1="173.60001" + y1="118.9" + x2="172.8" + y2="128.2" + id="lg2016" + xlink:href="#XMLID_3449_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <radialGradient + cx="284.60001" + cy="172.60001" + r="6.5" + fx="284.60001" + fy="172.60001" + id="XMLID_3448_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4,0,0,1.4,-237.3,-126.8)"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8219" /> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0.30000001" + id="stop8221" /> + <stop + style="stop-color:#c96b00;stop-opacity:1" + offset="0.89999998" + id="stop8223" /> + <stop + style="stop-color:#9a5500;stop-opacity:1" + offset="1" + id="stop8225" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.3" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.9" + style="stop-color:#C96B00" /> + <a:midPointstop + offset="0.5" + style="stop-color:#C96B00" /> + <a:midPointstop + offset="1" + style="stop-color:#9A5500" /> + </radialGradient> + <radialGradient + cx="284.60001" + cy="172.60001" + r="6.5" + fx="284.60001" + fy="172.60001" + id="rg2020" + xlink:href="#XMLID_3448_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.513992,0,0,2.347576,-689.1621,-378.5717)" /> + <linearGradient + x1="158.10001" + y1="123" + x2="164.2" + y2="126.6" + id="XMLID_3447_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecd600;stop-opacity:1" + offset="0" + id="stop8204" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.30000001" + id="stop8206" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop8208" /> + <a:midPointstop + offset="0" + style="stop-color:#ECD600" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECD600" /> + <a:midPointstop + offset="0.3" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="158.10001" + y1="123" + x2="164.2" + y2="126.6" + id="lg2026" + xlink:href="#XMLID_3447_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <radialGradient + cx="280.89999" + cy="163.7" + r="10.1" + fx="280.89999" + fy="163.7" + id="XMLID_3446_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4,0,0,1.4,-237.3,-126.8)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop8197" /> + <stop + style="stop-color:#fff95e;stop-opacity:1" + offset="1" + id="stop8199" /> + <a:midPointstop + offset="0" + style="stop-color:#FFFFFF" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointstop + offset="1" + style="stop-color:#FFF95E" /> + </radialGradient> + <radialGradient + cx="280.89999" + cy="163.7" + r="10.1" + fx="280.89999" + fy="163.7" + id="rg2029" + xlink:href="#XMLID_3446_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.7,0,0,1.7,-457.5,-266.8)" /> + <linearGradient + x1="156.5" + y1="122.7" + x2="180.10001" + y2="122.7" + id="XMLID_3445_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8184" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.2" + id="stop8186" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.30000001" + id="stop8188" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.40000001" + id="stop8190" /> + <stop + style="stop-color:#d68100;stop-opacity:1" + offset="1" + id="stop8192" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.2" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.3" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.4" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="1" + style="stop-color:#D68100" /> + </linearGradient> + <linearGradient + x1="156.5" + y1="122.7" + x2="180.10001" + y2="122.7" + id="lg2032" + xlink:href="#XMLID_3445_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="156.39999" + y1="115.4" + x2="180.10001" + y2="115.4" + id="XMLID_3444_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ecb300;stop-opacity:1" + offset="0" + id="stop8171" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.2" + id="stop8173" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.30000001" + id="stop8175" /> + <stop + style="stop-color:#ffe900;stop-opacity:1" + offset="0.40000001" + id="stop8177" /> + <stop + style="stop-color:#d68100;stop-opacity:1" + offset="1" + id="stop8179" /> + <a:midPointstop + offset="0" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.5" + style="stop-color:#ECB300" /> + <a:midPointstop + offset="0.2" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.3" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFFFB3" /> + <a:midPointstop + offset="0.4" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="0.5" + style="stop-color:#FFE900" /> + <a:midPointstop + offset="1" + style="stop-color:#D68100" /> + </linearGradient> + <linearGradient + x1="156.39999" + y1="115.4" + x2="180.10001" + y2="115.4" + id="lg2035" + xlink:href="#XMLID_3444_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2,0,0,1.2,-175.9,-114.6)" /> + <linearGradient + x1="379.70001" + y1="167.89999" + x2="383.89999" + y2="172.89999" + id="lg4286_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8,0.2,-0.2,0.8,78.8,38.1)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s16159" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.1" + id="s16161" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="1" + id="s16163" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.1" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#737373" + offset="1" /> + </linearGradient> + <linearGradient + x1="379.60001" + y1="167.8" + x2="383.79999" + y2="172" + id="lg6416" + xlink:href="#lg4286_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.622156,0.623859,-0.623859,2.62182,-882.9706,-673.7921)" /> + <linearGradient + x1="384.20001" + y1="169.8" + x2="384.79999" + y2="170.39999" + id="lg4285_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8,0.2,-0.2,0.8,78.8,38.1)"> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="0" + id="s16152" /> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="1" + id="s16154" /> + <ns:midPointStop + style="stop-color:#737373" + offset="0" /> + <ns:midPointStop + style="stop-color:#737373" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#D9D9D9" + offset="1" /> + </linearGradient> + <linearGradient + x1="384.20001" + y1="169.8" + x2="384.79999" + y2="170.39999" + id="lg6453" + xlink:href="#lg4285_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.6,0.6,-0.6,2.6,-883,-673.8)" /> + <linearGradient + x1="380.5" + y1="172.60001" + x2="382.79999" + y2="173.7" + id="lg4284_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8,0.2,-0.2,0.8,78.8,38.1)"> + <stop + style="stop-color:gray;stop-opacity:1" + offset="0" + id="s16145" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="1" + id="s16147" /> + <ns:midPointStop + style="stop-color:#808080" + offset="0" /> + <ns:midPointStop + style="stop-color:#808080" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#E5E5E5" + offset="1" /> + </linearGradient> + <linearGradient + x1="380.5" + y1="172.60001" + x2="382.79999" + y2="173.7" + id="lg6456" + xlink:href="#lg4284_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.6,0.6,-0.6,2.6,-883,-673.8)" /> + <radialGradient + cx="347.29999" + cy="244.5" + r="5.1999998" + fx="347.29999" + fy="244.5" + id="lg4282_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)"> + <stop + style="stop-color:#333;stop-opacity:1" + offset="0" + id="s16135" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="s16137" /> + <ns:midPointStop + style="stop-color:#333333" + offset="0" /> + <ns:midPointStop + style="stop-color:#333333" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#999999" + offset="1" /> + </radialGradient> + <linearGradient + x1="310.39999" + y1="397.70001" + x2="310.89999" + y2="399.5" + id="lg4280_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.7,-0.7,0.7,0.7,-153.4,180.6)"> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="0" + id="s16111" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.60000002" + id="s16113" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="1" + id="s16115" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.6" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="1" /> + </linearGradient> + <linearGradient + x1="310.39999" + y1="397.70001" + x2="310.89999" + y2="399.5" + id="lg6467" + xlink:href="#lg4280_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.4,-2.4,2.4,2.4,-1663.6,-195)" /> + <linearGradient + x1="310.89999" + y1="395.79999" + x2="313.29999" + y2="403.10001" + id="lg4279_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.7,-0.7,0.7,0.7,-153.4,180.6)"> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0" + id="s16100" /> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0.40000001" + id="s16102" /> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="0.89999998" + id="s16104" /> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="1" + id="s16106" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.4" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0.9" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="310.89999" + y1="395.79999" + x2="313.29999" + y2="403.10001" + id="lg6465" + xlink:href="#lg4279_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.4,-2.4,2.4,2.4,-1663.6,-195)" /> + <linearGradient + x1="307.79999" + y1="395.20001" + x2="313.79999" + y2="413.60001" + id="lg4278_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.7,-0.7,0.7,0.7,-153.4,180.6)"> + <stop + style="stop-color:#ffffb3;stop-opacity:1" + offset="0" + id="s16091" /> + <stop + style="stop-color:#fcd72f;stop-opacity:1" + offset="0.40000001" + id="s16093" /> + <stop + style="stop-color:#ffcd00;stop-opacity:1" + offset="1" + id="s16095" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFB3" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FCD72F" + offset="0.4" /> + <ns:midPointStop + style="stop-color:#FCD72F" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFCD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="306.5" + y1="393" + x2="309" + y2="404" + id="lg6400" + xlink:href="#lg4278_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.4,-2.4,2.4,2.4,-1663.6,-195)" /> + <linearGradient + x1="352.10001" + y1="253.60001" + x2="348.5" + y2="237.8" + id="lg4276_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)"> + <stop + style="stop-color:#ffff87;stop-opacity:1" + offset="0" + id="s16077" /> + <stop + style="stop-color:#ffad00;stop-opacity:1" + offset="1" + id="s16079" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFAD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="335.60001" + y1="354.79999" + x2="337.89999" + y2="354.79999" + id="lg4275_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9,-0.5,0.5,0.9,-121.7,105.1)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="s16057" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.80000001" + id="s16059" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="s16061" /> + <ns:midPointStop + style="stop-color:#D9D9D9" + offset="0" /> + <ns:midPointStop + style="stop-color:#D9D9D9" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.8" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="1" /> + </linearGradient> + <linearGradient + x1="335.60001" + y1="354.79999" + x2="337.89999" + y2="354.79999" + id="lg6463" + xlink:href="#lg4275_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.9,-1.7,1.7,2.9,-1557,-448.7)" /> + <linearGradient + x1="337.39999" + y1="353.10001" + x2="339.39999" + y2="357.10001" + id="lg4274_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9,-0.5,0.5,0.9,-121.7,105.1)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s16048" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.1" + id="s16050" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s16052" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.1" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="337.39999" + y1="353.10001" + x2="339.39999" + y2="357.10001" + id="lg6461" + xlink:href="#lg4274_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.9,-1.7,1.7,2.9,-1557,-448.7)" /> + <linearGradient + x1="334.39999" + y1="355.5" + x2="335.5" + y2="356.79999" + id="lg4273_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9,-0.5,0.5,0.9,-121.7,105.1)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s16041" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s16043" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="5.6e-003" /> + <ns:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="334.39999" + y1="355.5" + x2="335.5" + y2="356.79999" + id="lg6381" + xlink:href="#lg4273_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.9,-1.7,1.7,2.9,-1557,-448.7)" /> + <linearGradient + x1="348.39999" + y1="247.39999" + x2="354.10001" + y2="242" + id="lg4271_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)"> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0" + id="s16025" /> + <stop + style="stop-color:#9e9e9e;stop-opacity:1" + offset="0.40000001" + id="s16027" /> + <stop + style="stop-color:black;stop-opacity:1" + offset="1" + id="s16029" /> + <ns:midPointStop + style="stop-color:#F2F2F2" + offset="0" /> + <ns:midPointStop + style="stop-color:#F2F2F2" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#000000" + offset="1" /> + </linearGradient> + <linearGradient + x1="351.29999" + y1="257.29999" + x2="346.29999" + y2="235.5" + id="lg4270_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ffff87;stop-opacity:1" + offset="0" + id="s16007" /> + <stop + style="stop-color:#ffad00;stop-opacity:1" + offset="1" + id="s16009" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0" /> + <ns:midPointStop + style="stop-color:#FFFF87" + offset="0.5" /> + <ns:midPointStop + style="stop-color:#FFAD00" + offset="1" /> + </linearGradient> + <linearGradient + x1="351.29999" + y1="257.29999" + x2="346.29999" + y2="235.5" + id="lg6459" + xlink:href="#lg4270_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.4,0,0,3.4,-1148,-802)" /> + <linearGradient + x1="43.799999" + y1="32.5" + x2="63.299999" + y2="66.400002" + id="XMLID_2708_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="stop75318" /> + <stop + style="stop-color:#fffcea;stop-opacity:1" + offset="1" + id="stop75320" /> + <a:midPointStop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointStop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointStop + style="stop-color:#FFFCEA" + offset="1" /> + </linearGradient> + <linearGradient + x1="43.799999" + y1="32.5" + x2="63.299999" + y2="66.400002" + id="lg1907" + xlink:href="#XMLID_2708_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)" /> + <linearGradient + x1="52.5" + y1="40.400002" + x2="58.200001" + y2="64" + id="XMLID_2707_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#ffdea0;stop-opacity:1" + offset="0" + id="stop75305" /> + <stop + style="stop-color:#ffd89e;stop-opacity:1" + offset="0.30000001" + id="stop75307" /> + <stop + style="stop-color:#ffd79e;stop-opacity:1" + offset="0.30000001" + id="stop75309" /> + <stop + style="stop-color:#dbaf6d;stop-opacity:1" + offset="0.69999999" + id="stop75311" /> + <stop + style="stop-color:#6f4c24;stop-opacity:1" + offset="1" + id="stop75313" /> + <a:midPointStop + style="stop-color:#FFDEA0" + offset="0" /> + <a:midPointStop + style="stop-color:#FFDEA0" + offset="0.6" /> + <a:midPointStop + style="stop-color:#FFD79E" + offset="0.3" /> + <a:midPointStop + style="stop-color:#FFD79E" + offset="0.5" /> + <a:midPointStop + style="stop-color:#DBAF6D" + offset="0.7" /> + <a:midPointStop + style="stop-color:#DBAF6D" + offset="0.5" /> + <a:midPointStop + style="stop-color:#6F4C24" + offset="1" /> + </linearGradient> + <linearGradient + x1="52.5" + y1="40.400002" + x2="58.200001" + y2="64" + id="lg1910" + xlink:href="#XMLID_2707_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)" /> + <linearGradient + x1="58" + y1="73.199997" + x2="44.5" + y2="19" + id="XMLID_2704_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)"> + <stop + style="stop-color:#d4a96c;stop-opacity:1" + offset="0.5" + id="stop75284" /> + <stop + style="stop-color:#dcb273;stop-opacity:1" + offset="0.60000002" + id="stop75286" /> + <stop + style="stop-color:#f0ca87;stop-opacity:1" + offset="0.80000001" + id="stop75288" /> + <stop + style="stop-color:#ffdc96;stop-opacity:1" + offset="0.69999999" + id="stop75290" /> + <stop + style="stop-color:#c18a42;stop-opacity:1" + offset="1" + id="stop75292" /> + <a:midPointStop + style="stop-color:#D4A96C" + offset="0.5" /> + <a:midPointStop + style="stop-color:#D4A96C" + offset="0.6" /> + <a:midPointStop + style="stop-color:#FFDC96" + offset="0.7" /> + <a:midPointStop + style="stop-color:#FFDC96" + offset="0.5" /> + <a:midPointStop + style="stop-color:#C18A42" + offset="1" /> + </linearGradient> + <linearGradient + x1="53.700001" + y1="32" + x2="53.700001" + y2="64.599998" + id="XMLID_2703_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e5c9b0;stop-opacity:1" + offset="0" + id="stop75268" /> + <stop + style="stop-color:#e5c9b0;stop-opacity:1" + offset="0.40000001" + id="stop75270" /> + <stop + style="stop-color:#c0aa94;stop-opacity:1" + offset="1" + id="stop75272" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0.5" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0.4" /> + <a:midPointStop + style="stop-color:#E5C9B0" + offset="0.5" /> + <a:midPointStop + style="stop-color:#C0AA94" + offset="1" /> + </linearGradient> + <linearGradient + x1="53.700001" + y1="32" + x2="53.700001" + y2="64.599998" + id="lg1916" + xlink:href="#XMLID_2703_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-29,-22.6)" /> + <linearGradient + x1="224.31" + y1="19.450001" + x2="214.33" + y2="11.46" + id="XMLID_419_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#404040;stop-opacity:1" + offset="0" + id="s1903" /> + <stop + style="stop-color:#6d6d6d;stop-opacity:1" + offset="0.33000001" + id="s1905" /> + <stop + style="stop-color:#e9e9e9;stop-opacity:1" + offset="1" + id="s1907" /> + <a:midPointStop + offset="0" + style="stop-color:#404040" /> + <a:midPointStop + offset="0.5" + style="stop-color:#404040" /> + <a:midPointStop + offset="0.33" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="0.5" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="1" + style="stop-color:#E9E9E9" /> + </linearGradient> + <linearGradient + x1="221.84" + y1="32.779999" + x2="212.2" + y2="20.27" + id="lg1988" + xlink:href="#XMLID_419_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.33,0,0,1.31,-274.2,-5.2)" /> + <linearGradient + x1="228.35001" + y1="33.279999" + x2="215.42999" + y2="33.279999" + id="lg1900" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s1902" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="s1906" /> + <a:midPointStop + style="stop-color:#575757" + offset="0" /> + <a:midPointStop + style="stop-color:#575757" + offset="0.5" /> + <a:midPointStop + style="stop-color:#6D6D6D" + offset="0.33" /> + <a:midPointStop + style="stop-color:#6D6D6D" + offset="0.5" /> + <a:midPointStop + style="stop-color:#D3D3D3" + offset="1" /> + </linearGradient> + <linearGradient + x1="234.81" + y1="33.279999" + x2="228.27" + y2="33.279999" + id="lg1908" + xlink:href="#lg1900" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.33,0,0,1.31,-274.2,-5.2)" /> + <linearGradient + x1="228.35001" + y1="33.279999" + x2="215.42999" + y2="33.279999" + id="XMLID_416_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#575757;stop-opacity:1" + offset="0" + id="s1874" /> + <stop + style="stop-color:#6d6d6d;stop-opacity:1" + offset="0.33000001" + id="s1876" /> + <stop + style="stop-color:#d3d3d3;stop-opacity:1" + offset="1" + id="s1878" /> + <a:midPointStop + offset="0" + style="stop-color:#575757" /> + <a:midPointStop + offset="0.5" + style="stop-color:#575757" /> + <a:midPointStop + offset="0.33" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="0.5" + style="stop-color:#6D6D6D" /> + <a:midPointStop + offset="1" + style="stop-color:#D3D3D3" /> + </linearGradient> + <linearGradient + x1="228.35001" + y1="33.279999" + x2="215.42999" + y2="33.279999" + id="lg1991" + xlink:href="#XMLID_416_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.33,0,0,1.31,-274.2,-5.2)" /> + <radialGradient + cx="603.19" + cy="230.77" + r="1.67" + fx="603.19" + fy="230.77" + id="x5010_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.1,0,0,1.1,-54.33,-75.4)"> + <stop + style="stop-color:#c9ffc9;stop-opacity:1" + offset="0" + id="stop29201" /> + <stop + style="stop-color:#23a11f;stop-opacity:1" + offset="1" + id="stop29203" /> + <a:midPointStop + offset="0" + style="stop-color:#C9FFC9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#C9FFC9" /> + <a:midPointStop + offset="1" + style="stop-color:#23A11F" /> + </radialGradient> + <radialGradient + cx="603.19" + cy="230.77" + r="1.67" + fx="603.19" + fy="230.77" + id="radialGradient5711" + xlink:href="#x5010_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.23,0,0,1.23,-709.93,-245.02)" /> + <linearGradient + x1="592.31" + y1="162.60001" + x2="609.32001" + y2="145.59" + id="lg5722" + xlink:href="#x5003_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="601.48999" + y1="170.16" + x2="613.84003" + y2="170.16" + id="x5002_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop29134" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="0.2" + id="stop29136" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="stop29138" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.20" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#FFFFFF" /> + <a:midPointStop + offset="1" + style="stop-color:#999999" /> + </linearGradient> + <linearGradient + x1="601.48999" + y1="170.16" + x2="613.84003" + y2="170.16" + id="lg5725" + xlink:href="#x5002_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.23" + id="x5004_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop29157" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop29159" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.23" + id="lg5728" + xlink:href="#x5004_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="592.31" + y1="162.60001" + x2="609.32001" + y2="145.59" + id="x5003_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0" + id="stop29143" /> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="1" + id="stop29145" /> + <a:midPointStop + offset="0" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="1" + style="stop-color:#E5E5E5" /> + </linearGradient> + <linearGradient + x1="592.31" + y1="162.60001" + x2="609.32001" + y2="145.59" + id="lg5732" + xlink:href="#x5003_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.24001" + id="x5000_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop29124" /> + <stop + style="stop-color:white;stop-opacity:1" + offset="1" + id="stop29126" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="1" + style="stop-color:#FFFFFF" /> + </linearGradient> + <linearGradient + x1="592.20001" + y1="156.45" + x2="609.98999" + y2="174.24001" + id="lg5735" + xlink:href="#x5000_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.12,0,0,1.12,-649.08,-160.62)" /> + <linearGradient + x1="308.54999" + y1="149.89999" + x2="299.72" + y2="148.83" + id="XMLID_2433_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d6d6d6;stop-opacity:1" + offset="0" + id="71615" /> + <stop + style="stop-color:#a5a5a5;stop-opacity:1" + offset="1" + id="71617" /> + <a:midPointStop + offset="0" + style="stop-color:#D6D6D6" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D6D6D6" /> + <a:midPointStop + offset="1" + style="stop-color:#A5A5A5" /> + </linearGradient> + <linearGradient + x1="308.54999" + y1="149.89999" + x2="299.72" + y2="148.83" + id="lg1952" + xlink:href="#XMLID_2433_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.03,0,0,1.03,-279.57,-124.36)" /> + <radialGradient + cx="307.39999" + cy="121" + r="23.35" + fx="307.39999" + fy="121" + id="XMLID_2432_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.98,0,0,0.98,2.88,2.75)"> + <stop + style="stop-color:#d2d2d2;stop-opacity:1" + offset="0.19" + id="71592" /> + <stop + style="stop-color:#cfcfcf;stop-opacity:1" + offset="0.44999999" + id="71594" /> + <stop + style="stop-color:#c7c7c7;stop-opacity:1" + offset="0.60000002" + id="71596" /> + <stop + style="stop-color:#b9b9b9;stop-opacity:1" + offset="0.74000001" + id="71598" /> + <stop + style="stop-color:#a4a4a4;stop-opacity:1" + offset="0.86000001" + id="71600" /> + <stop + style="stop-color:#8a8a8a;stop-opacity:1" + offset="0.95999998" + id="71602" /> + <stop + style="stop-color:gray;stop-opacity:1" + offset="1" + id="71604" /> + <a:midPointStop + offset="0.19" + style="stop-color:#D2D2D2" /> + <a:midPointStop + offset="0.8" + style="stop-color:#D2D2D2" /> + <a:midPointStop + offset="1" + style="stop-color:#808080" /> + </radialGradient> + <radialGradient + cx="307.39999" + cy="121" + r="23.35" + fx="307.39999" + fy="121" + id="radialGradient2331" + xlink:href="#XMLID_2432_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-276.62,-121.54)" /> + <linearGradient + x1="294.13" + y1="127.07" + x2="294.13" + y2="142.2" + id="XMLID_2430_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#b5d8ff;stop-opacity:1" + offset="0" + id="71582" /> + <stop + style="stop-color:black;stop-opacity:1" + offset="1" + id="71584" /> + <a:midPointStop + offset="0" + style="stop-color:#B5D8FF" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B5D8FF" /> + <a:midPointStop + offset="1" + style="stop-color:#000000" /> + </linearGradient> + <linearGradient + x1="294.13" + y1="127.07" + x2="294.13" + y2="142.2" + id="lg2820" + xlink:href="#XMLID_2430_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.03,0,0,1.03,-279.57,-124.36)" /> + <linearGradient + x1="279.10999" + y1="148.03" + x2="309.16" + y2="148.03" + id="XMLID_2429_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e1e1e1;stop-opacity:1" + offset="0" + id="71564" /> + <stop + style="stop-color:#e1e1e1;stop-opacity:1" + offset="0.25" + id="71566" /> + <stop + style="stop-color:#a5a5a5;stop-opacity:1" + offset="0.44" + id="71568" /> + <stop + style="stop-color:#a5a5a5;stop-opacity:1" + offset="1" + id="71570" /> + <a:midPointStop + offset="0" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.25" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E1E1E1" /> + <a:midPointStop + offset="0.44" + style="stop-color:#A5A5A5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#A5A5A5" /> + <a:midPointStop + offset="1" + style="stop-color:#A5A5A5" /> + </linearGradient> + <linearGradient + x1="279.10999" + y1="148.03" + x2="309.16" + y2="148.03" + id="lg2818" + xlink:href="#XMLID_2429_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.03,0,0,1.03,-279.57,-124.36)" /> + <radialGradient + cx="622.34302" + cy="14.449" + r="26.496" + fx="622.34302" + fy="14.449" + id="lg3499_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.851,0,0,0.849,69.297,51.658)"> + <stop + style="stop-color:#23468e;stop-opacity:1" + offset="0" + id="stop10972" /> + <stop + style="stop-color:#012859;stop-opacity:1" + offset="1" + id="stop10974" /> + <a:midPointStop + offset="0" + style="stop-color:#23468E" /> + <a:midPointStop + offset="0.5" + style="stop-color:#23468E" /> + <a:midPointStop + offset="1" + style="stop-color:#012859" /> + </radialGradient> + <radialGradient + cx="622.34302" + cy="14.449" + r="26.496" + fx="622.34302" + fy="14.449" + id="rg5791" + xlink:href="#lg3499_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.858,0,0,0.857,-511.7,9.02)" /> + <linearGradient + x1="616.112" + y1="76.247002" + x2="588.14099" + y2="60.742001" + id="lg3497_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#01326e;stop-opacity:1" + offset="0" + id="stop10962" /> + <stop + style="stop-color:#012859;stop-opacity:1" + offset="1" + id="stop10964" /> + <a:midPointStop + offset="0" + style="stop-color:#01326E" /> + <a:midPointStop + offset="0.5" + style="stop-color:#01326E" /> + <a:midPointStop + offset="1" + style="stop-color:#012859" /> + </linearGradient> + <linearGradient + x1="617.698" + y1="82.445999" + x2="585.95203" + y2="54.848999" + id="lg3496_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="stop10950" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop10952" /> + <a:midPointStop + offset="0" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="0.5" + style="stop-color:#E5E5E5" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="617.698" + y1="82.445999" + x2="585.95203" + y2="54.848999" + id="lg5794" + xlink:href="#lg3496_" + gradientUnits="userSpaceOnUse" /> + <linearGradient + x1="601.39001" + y1="55.341" + x2="588.29199" + y2="71.515999" + id="lg3495_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop10941" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.52200001" + id="stop10943" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop10945" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.522" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="601.39001" + y1="55.341" + x2="588.29199" + y2="71.515999" + id="lg5771" + xlink:href="#lg3495_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.009,0,0,1.009,-581.615,-43.098)" /> + <linearGradient + x1="611.34601" + y1="55.279999" + x2="590.39001" + y2="81.157997" + id="lg3494_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="stop10932" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.52200001" + id="stop10934" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="stop10936" /> + <a:midPointStop + offset="0" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.5" + style="stop-color:#D9D9D9" /> + <a:midPointStop + offset="0.522" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#F2F2F2" /> + <a:midPointStop + offset="1" + style="stop-color:#CCCCCC" /> + </linearGradient> + <linearGradient + x1="611.34601" + y1="55.279999" + x2="590.39001" + y2="81.157997" + id="lg5774" + xlink:href="#lg3494_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.009,0,0,1.009,-581.616,-43.098)" /> + <linearGradient + x1="798.72998" + y1="69.839996" + x2="799.04999" + y2="70.709999" + id="g3302_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#005e00;stop-opacity:1" + offset="0" + id="s6504" /> + <stop + style="stop-color:#23a11f;stop-opacity:1" + offset="1" + id="s6506" /> + <a:midPointstop + style="stop-color:#005E00" + offset="0" /> + <a:midPointstop + style="stop-color:#005E00" + offset="0.5" /> + <a:midPointstop + style="stop-color:#23A11F" + offset="1" /> + </linearGradient> + <linearGradient + x1="798.72998" + y1="69.839996" + x2="799.04999" + y2="70.709999" + id="lg5851" + xlink:href="#g3302_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,-60.001)" /> + <linearGradient + x1="779.19" + y1="122.73" + x2="811.69" + y2="149.74001" + id="g3301_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,129.19)"> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0" + id="s6483" /> + <stop + style="stop-color:#eee;stop-opacity:1" + offset="0.17" + id="s6485" /> + <stop + style="stop-color:#e3e3e3;stop-opacity:1" + offset="0.34" + id="s6487" /> + <stop + style="stop-color:#cfcfcf;stop-opacity:1" + offset="0.50999999" + id="s6489" /> + <stop + style="stop-color:#b4b4b4;stop-opacity:1" + offset="0.67000002" + id="s6491" /> + <stop + style="stop-color:#919191;stop-opacity:1" + offset="0.83999997" + id="s6493" /> + <stop + style="stop-color:#666;stop-opacity:1" + offset="1" + id="s6495" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.71" /> + <a:midPointstop + style="stop-color:#666666" + offset="1" /> + </linearGradient> + <linearGradient + x1="779.19" + y1="122.73" + x2="811.69" + y2="149.74001" + id="lg5855" + xlink:href="#g3301_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,-0.316,0,1.263,-926.036,103.123)" /> + <clipPath + id="g3299_"> + <use + id="use6469" + x="0" + y="0" + width="1005.92" + height="376.97" + xlink:href="#g101_" /> + </clipPath> + <radialGradient + cx="1189.9301" + cy="100.05" + r="40.400002" + fx="1189.9301" + fy="100.05" + id="g3300_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.34,-8.46e-2,0,0.34,394.16,137.13)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s6472" /> + <stop + style="stop-color:white;stop-opacity:0" + offset="1" + id="s6474" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointstop + style="stop-color:#000000" + offset="1" /> + </radialGradient> + <radialGradient + cx="1199.74" + cy="97.150002" + r="40.400002" + fx="1199.74" + fy="97.150002" + id="rg5860" + xlink:href="#g3300_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.409,-0.107,0,0.429,-451.489,113.149)" /> + <linearGradient + x1="796.38" + y1="67.580002" + x2="781.28003" + y2="58.549999" + id="g3298_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#4c8bca;stop-opacity:1" + offset="0" + id="s6462" /> + <stop + style="stop-color:#b7e9ff;stop-opacity:1" + offset="1" + id="s6464" /> + <a:midPointstop + style="stop-color:#4C8BCA" + offset="0" /> + <a:midPointstop + style="stop-color:#4C8BCA" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B7E9FF" + offset="1" /> + </linearGradient> + <linearGradient + x1="800.97998" + y1="140.72" + x2="777.71997" + y2="121.76" + id="g3297_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,129.19)"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="s6448" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s6450" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0.5" /> + <a:midPointstop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="800.97998" + y1="140.72" + x2="777.71997" + y2="121.76" + id="lg5890" + xlink:href="#g3297_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,129.19)" /> + <linearGradient + x1="790.03998" + y1="-16.33" + x2="779.84003" + y2="-3.73" + id="g3296_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,70.17)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="s6439" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.51999998" + id="s6441" /> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="1" + id="s6443" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0.5" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.52" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.5" /> + <a:midPointstop + style="stop-color:#CCCCCC" + offset="1" /> + </linearGradient> + <linearGradient + x1="790.03998" + y1="-16.33" + x2="779.84003" + y2="-3.73" + id="lg5866" + xlink:href="#g3296_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,28.6)" /> + <linearGradient + x1="785.84003" + y1="72.989998" + x2="785.26001" + y2="76.279999" + id="g3293_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s6412" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="1" + id="s6414" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointstop + style="stop-color:#737373" + offset="1" /> + </linearGradient> + <linearGradient + x1="785.84003" + y1="72.989998" + x2="785.26001" + y2="76.279999" + id="lg5871" + xlink:href="#g3293_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,-60.001)" /> + <linearGradient + x1="789.37" + y1="69.879997" + x2="791.03998" + y2="77.120003" + id="g3292_" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#999;stop-opacity:1" + offset="0" + id="s6403" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="0.28" + id="s6405" /> + <stop + style="stop-color:#666;stop-opacity:1" + offset="1" + id="s6407" /> + <a:midPointstop + style="stop-color:#999999" + offset="0" /> + <a:midPointstop + style="stop-color:#999999" + offset="0.5" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.28" /> + <a:midPointstop + style="stop-color:#F2F2F2" + offset="0.5" /> + <a:midPointstop + style="stop-color:#666666" + offset="1" /> + </linearGradient> + <linearGradient + x1="789.37" + y1="69.879997" + x2="791.03998" + y2="77.120003" + id="lg5874" + xlink:href="#g3292_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,0,0,1.263,-926.036,-60.001)" /> + <linearGradient + x1="786.65997" + y1="136.12" + x2="786.71002" + y2="134.33" + id="g3290_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,-0.25,0,1,0,137.29)"> + <stop + style="stop-color:#d9d9d9;stop-opacity:1" + offset="0" + id="s6380" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="1" + id="s6382" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0" /> + <a:midPointstop + style="stop-color:#D9D9D9" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="1" /> + </linearGradient> + <linearGradient + x1="786.65997" + y1="136.12" + x2="786.71002" + y2="134.33" + id="lg5878" + xlink:href="#g3290_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.204,-0.316,0,1.263,-926.036,113.351)" /> + <radialGradient + cx="1458.77" + cy="-5.0999999" + r="35.130001" + fx="1458.77" + fy="-5.0999999" + id="g3289_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.42,0,0,0.42,167.09,79.84)"> + <stop + style="stop-color:white;stop-opacity:1" + offset="0" + id="s6371" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="s6373" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0" /> + <a:midPointstop + style="stop-color:#FFFFFF" + offset="0.5" /> + <a:midPointstop + style="stop-color:#999999" + offset="1" /> + </radialGradient> + <radialGradient + cx="1458.77" + cy="-5.0999999" + r="35.130001" + fx="1458.77" + fy="-5.0999999" + id="rg5881" + xlink:href="#g3289_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.505,0,0,0.53,-724.957,40.636)" /> + <radialGradient + cx="1612.98" + cy="-4.4699998" + r="36.580002" + fx="1612.98" + fy="-4.4699998" + id="g3288_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.34,0,0,0.36,238.56,86.87)"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="s6362" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0.63999999" + id="s6364" /> + <stop + style="stop-color:#737373;stop-opacity:1" + offset="1" + id="s6366" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.64" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.5" /> + <a:midPointstop + style="stop-color:#737373" + offset="1" /> + </radialGradient> + <radialGradient + cx="1612.98" + cy="-4.4699998" + r="36.580002" + fx="1612.98" + fy="-4.4699998" + id="rg5884" + xlink:href="#g3288_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.408,0,0,0.448,-638.943,49.495)" /> + <radialGradient + cx="1470.5" + cy="-10.21" + r="33.290001" + fx="1470.5" + fy="-10.21" + id="g3287_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.42,0,0,0.42,167.09,79.84)"> + <stop + style="stop-color:#e5e5e5;stop-opacity:1" + offset="0" + id="s6347" /> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0.38999999" + id="s6349" /> + <stop + style="stop-color:#b1b1b1;stop-opacity:1" + offset="0.75" + id="s6351" /> + <stop + style="stop-color:#aaa;stop-opacity:1" + offset="0.88" + id="s6353" /> + <stop + style="stop-color:#9e9e9e;stop-opacity:1" + offset="0.97000003" + id="s6355" /> + <stop + style="stop-color:#999;stop-opacity:1" + offset="1" + id="s6357" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0" /> + <a:midPointstop + style="stop-color:#E5E5E5" + offset="0.5" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.39" /> + <a:midPointstop + style="stop-color:#B2B2B2" + offset="0.87" /> + <a:midPointstop + style="stop-color:#999999" + offset="1" /> + </radialGradient> + <radialGradient + cx="1470.5" + cy="-10.21" + r="33.290001" + fx="1470.5" + fy="-10.21" + id="rg5887" + xlink:href="#g3287_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.505,0,0,0.53,-724.957,40.636)" /> + <pattern + patternTransform="matrix(0.592927,0,0,0.592927,78,462)" + id="cream-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-365.3146,-513.505)" + id="g3047"> + id="path2858" /> + <path + inkscape:label="#path2854" + sodipodi:nodetypes="czzzz" + style="fill:#e3dcc0" + id="path3060" + d="M 390.31462,529.50504 C 390.31462,534.47304 386.28262,538.50504 381.31462,538.50504 C 376.34662,538.50504 372.31462,534.47304 372.31462,529.50504 C 372.31462,524.53704 376.34662,520.50504 381.31462,520.50504 C 386.28262,520.50504 390.31462,524.53704 390.31462,529.50504 z " /> +</g> + </pattern> + <pattern + patternTransform="matrix(0.733751,0,0,0.733751,67,367)" + id="dark-cream-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-408.0946,-513.505)" + id="dark-cream-spot" + inkscape:label="#g3043"> + <path + sodipodi:nodetypes="czzzz" + style="fill:#c8c5ac" + d="M 433.09458,529.50504 C 433.09458,534.47304 429.06258,538.50504 424.09458,538.50504 C 419.12658,538.50504 415.09458,534.47304 415.09458,529.50504 C 415.09458,524.53704 419.12658,520.50504 424.09458,520.50504 C 429.06258,520.50504 433.09458,524.53704 433.09458,529.50504 z " + id="path2953" /> + </g> + </pattern> + <pattern + patternTransform="matrix(0.375,0,0,0.375,379,400)" + id="white-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-484.3997,-513.505)" + id="white-spot" + inkscape:label="#g3035"> + <path + style="opacity:0.25;fill:white" + id="path3033" + d="M 509.39967,529.50504 C 509.39967,534.47304 505.36767,538.50504 500.39967,538.50504 C 495.43167,538.50504 491.39967,534.47304 491.39967,529.50504 C 491.39967,524.53704 495.43167,520.50504 500.39967,520.50504 C 505.36767,520.50504 509.39967,524.53704 509.39967,529.50504 z " + sodipodi:nodetypes="czzzz" /> + </g> + </pattern> + <pattern + patternTransform="matrix(0.455007,0,0,0.455007,-5e-5,1.9e-5)" + id="black-spots" + height="32" + width="32" + patternUnits="userSpaceOnUse"> + <g + transform="translate(-448.3997,-513.505)" + id="black-spot" + inkscape:label="#g3039"> + <path + sodipodi:nodetypes="czzzz" + d="M 473.39967,529.50504 C 473.39967,534.47304 469.36767,538.50504 464.39967,538.50504 C 459.43167,538.50504 455.39967,534.47304 455.39967,529.50504 C 455.39967,524.53704 459.43167,520.50504 464.39967,520.50504 C 469.36767,520.50504 473.39967,524.53704 473.39967,529.50504 z " + id="path2961" + style="opacity:0.25;fill:black" /> + </g> + </pattern> + <linearGradient + x1="501.0903" + y1="-19.2544" + x2="531.85413" + y2="0.72390002" + id="linearGradient17334" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop17336" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop17338" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop17340" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop17342" /> + <a:midPointStop + offset="0" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.5112" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B4DAEA" /> + <a:midPointStop + offset="0.6461" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="1" + style="stop-color:#16336E" /> + </linearGradient> + <linearGradient + x1="415.73831" + y1="11.854" + x2="418.13361" + y2="18.8104" + id="linearGradient17426" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8362,0.5206,-1.1904,0.992,147.62,-30.9374)"> + <stop + style="stop-color:#ccc;stop-opacity:1" + offset="0" + id="stop17428" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop17430" /> + <a:midPointStop + offset="0" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="0.5" + style="stop-color:#CCCCCC" /> + <a:midPointStop + offset="1" + style="stop-color:#F2F2F2" /> + </linearGradient> + <linearGradient + x1="478.21341" + y1="-131.9297" + x2="469.85818" + y2="-140.28481" + id="linearGradient17434" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.5592,0.829,-0.829,0.5592,101.3357,-104.791)"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop17436" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop17438" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop17440" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop17442" /> + <a:midPointStop + offset="0" + style="stop-color:#F3403F" /> + <a:midPointStop + offset="0.4213" + style="stop-color:#F3403F" /> + <a:midPointStop + offset="1" + style="stop-color:#A6100C" /> + </linearGradient> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17709" + xlink:href="#XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)" /> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17711" + xlink:href="#XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="linearGradient17713" + xlink:href="#XMLID_1753_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17715" + xlink:href="#XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="500.70749" + y1="-13.2441" + x2="513.46442" + y2="-2.1547" + id="linearGradient17717" + xlink:href="#XMLID_1757_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="linearGradient17721" + xlink:href="#XMLID_2274_" + gradientUnits="userSpaceOnUse" /> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="linearGradient17723" + xlink:href="#XMLID_2275_" + gradientUnits="userSpaceOnUse" /> + <linearGradient + x1="500.70749" + y1="-13.2441" + x2="513.46442" + y2="-2.1547" + id="linearGradient17416" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop17418" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop17420" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <defs + id="defs9929"> + <path + d="M 489.21,209.35 L 485.35,203.63 C 483.63,204.25 473.47,208.93 471.5,210.18 C 470.57,210.77 470.17,211.16 469.72,212.48 C 470.93,212.31 471.72,212.49 473.42,213.04 C 473.26,214.77 473.24,215.74 473.57,218.2 C 474.01,216.88 474.41,216.49 475.34,215.9 C 477.33,214.65 487.49,209.97 489.21,209.35 z " + id="XMLID_960_" /> + </defs> + <clipPath + id="clipPath17448"> + <use + id="use17450" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_960_" /> + </clipPath> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="linearGradient17452" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop17454" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop17456" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop17458" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop17460" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="linearGradient17463" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#f3403f;stop-opacity:1" + offset="0" + id="stop17465" /> + <stop + style="stop-color:#d02a28;stop-opacity:1" + offset="0.37889999" + id="stop17467" /> + <stop + style="stop-color:#b21714;stop-opacity:1" + offset="0.77649999" + id="stop17469" /> + <stop + style="stop-color:#a6100c;stop-opacity:1" + offset="1" + id="stop17471" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0" /> + <a:midPointStop + style="stop-color:#F3403F" + offset="0.4213" /> + <a:midPointStop + style="stop-color:#A6100C" + offset="1" /> + </linearGradient> + <linearGradient + x1="481.23969" + y1="212.5742" + x2="472.92981" + y2="207.4967" + id="linearGradient17807" + xlink:href="#XMLID_2275_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-177.1654,35.43307)" /> + <linearGradient + x1="473.7681" + y1="209.17529" + x2="486.98099" + y2="213.2001" + id="linearGradient17810" + xlink:href="#XMLID_2274_" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-177.1654,35.43307)" /> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17812" + xlink:href="#XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)" /> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17814" + xlink:href="#XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="linearGradient17816" + xlink:href="#XMLID_1753_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17818" + xlink:href="#XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17347" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,11.0227,-35.6159)"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop17349" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop17351" /> + <a:midPointStop + offset="0" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="0.5" + style="stop-color:#5387BA" /> + <a:midPointStop + offset="1" + style="stop-color:#96BAD6" /> + </linearGradient> + <linearGradient + x1="516.57672" + y1="-15.769" + x2="516.57672" + y2="0.84280002" + id="linearGradient17379" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b2b2b2;stop-opacity:1" + offset="0" + id="stop17381" /> + <stop + style="stop-color:#f2f2f2;stop-opacity:1" + offset="1" + id="stop17383" /> + <a:midPointStop + offset="0" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="0.5" + style="stop-color:#B2B2B2" /> + <a:midPointStop + offset="1" + style="stop-color:#F2F2F2" /> + </linearGradient> + <linearGradient + x1="502.70749" + y1="115.3013" + x2="516.39001" + y2="127.1953" + id="linearGradient17862" + xlink:href="#XMLID_1749_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9703,0.2419,-0.2419,0.9703,-166.1427,-0.18283)" /> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17864" + xlink:href="#XMLID_1756_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <defs + id="defs3859"> + <polygon + points="465.54,213.52 481.94,217.46 482.74,216.71 487.46,198.05 471.08,194.07 470.26,194.83 465.54,213.52 " + id="XMLID_343_" /> + </defs> + <linearGradient + x1="471.0806" + y1="201.07761" + x2="481.91711" + y2="210.4977" + id="linearGradient17389" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#6498c1;stop-opacity:1" + offset="0.005618" + id="stop17391" /> + <stop + style="stop-color:#79a9cc;stop-opacity:1" + offset="0.2332" + id="stop17393" /> + <stop + style="stop-color:#a4cde2;stop-opacity:1" + offset="0.74049997" + id="stop17395" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="1" + id="stop17397" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="5.618000e-003" /> + <a:midPointStop + style="stop-color:#6498C1" + offset="0.4438" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="1" /> + </linearGradient> + <clipPath + id="clipPath17400"> + <use + id="use17402" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_343_" /> + </clipPath> + <linearGradient + x1="505.62939" + y1="-14.9526" + x2="527.49402" + y2="-0.7536" + id="linearGradient17404" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop17406" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop17408" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop17410" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop17412" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17882" + xlink:href="#XMLID_1752_" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)" /> + <defs + id="defs3826"> + <polygon + points="463.52,216.14 480.56,220.24 481.36,219.5 483.03,202.04 469.05,196.69 468.24,197.45 463.52,216.14 " + id="XMLID_338_" /> + </defs> + <linearGradient + x1="468.2915" + y1="204.7612" + x2="479.39871" + y2="214.4166" + id="linearGradient17357" + gradientUnits="userSpaceOnUse"> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0" + id="stop17359" /> + <stop + style="stop-color:#96bad6;stop-opacity:1" + offset="1" + id="stop17361" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#96BAD6" + offset="1" /> + </linearGradient> + <clipPath + id="clipPath17364"> + <use + id="use17366" + x="0" + y="0" + width="744.09448" + height="600" + xlink:href="#XMLID_338_" /> + </clipPath> + <linearGradient + x1="506.09909" + y1="-11.5137" + x2="527.99609" + y2="2.7063999" + id="linearGradient17368" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6868,0.4269,-0.9821,0.821,111.6149,-5.7901)"> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0" + id="stop17370" /> + <stop + style="stop-color:#b4daea;stop-opacity:1" + offset="0.51120001" + id="stop17372" /> + <stop + style="stop-color:#5387ba;stop-opacity:1" + offset="0.64609998" + id="stop17374" /> + <stop + style="stop-color:#16336e;stop-opacity:1" + offset="1" + id="stop17376" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5112" /> + <a:midPointStop + style="stop-color:#B4DAEA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.6461" /> + <a:midPointStop + style="stop-color:#5387BA" + offset="0.5" /> + <a:midPointStop + style="stop-color:#16336E" + offset="1" /> + </linearGradient> + <linearGradient + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" + id="linearGradient2387" + xlink:href="#linearGradient2381" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" /> + <linearGradient + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" + id="linearGradient5105" + xlink:href="#linearGradient2381" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" /> + <linearGradient + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" + id="linearGradient5145" + xlink:href="#linearGradient2381" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2381" + id="linearGradient2371" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90776,0,0,0.90776,24.35648,49.24131)" + x1="296.4996" + y1="188.81061" + x2="317.32471" + y2="209.69398" /> + </defs> + <g + transform="matrix(0.437808,-0.437808,0.437808,0.437808,-220.8237,43.55311)" + id="g5089"> + <path + d="M 8.4382985,-6.28125 C 7.8309069,-6.28125 4.125,-0.33238729 4.125,1.96875 L 4.125,28.6875 C 4.125,29.533884 4.7068159,29.8125 5.28125,29.8125 L 30.84375,29.8125 C 31.476092,29.8125 31.968751,29.319842 31.96875,28.6875 L 31.96875,23.46875 L 32.25,23.46875 C 32.74684,23.46875 33.156249,23.059339 33.15625,22.5625 L 33.15625,-5.375 C 33.15625,-5.8718398 32.74684,-6.28125 32.25,-6.28125 L 8.4382985,-6.28125 z " + transform="translate(282.8327,227.1903)" + style="fill:#5c5c4f;stroke:black;stroke-width:3.23021388;stroke-miterlimit:4;stroke-dasharray:none" + id="path5091" /> + <rect + width="27.85074" + height="29.369793" + rx="1.1414107" + ry="1.1414107" + x="286.96509" + y="227.63805" + style="fill:#032c87" + id="rect5093" /> + <path + d="M 288.43262,225.43675 L 313.67442,225.43675 L 313.67442,254.80655 L 287.29827,254.83069 L 288.43262,225.43675 z " + style="fill:white" + id="rect5095" /> + <path + d="M 302.44536,251.73726 C 303.83227,259.59643 301.75225,263.02091 301.75225,263.02091 C 303.99609,261.41329 305.71651,259.54397 306.65747,257.28491 C 307.62455,259.47755 308.49041,261.71357 310.9319,263.27432 C 310.9319,263.27432 309.33686,256.07392 309.22047,251.73726 L 302.44536,251.73726 z " + style="fill:#a70000;fill-opacity:1;stroke-width:2" + id="path5097" /> + <rect + width="25.241802" + height="29.736675" + rx="0.89682275" + ry="0.89682275" + x="290.73544" + y="220.92249" + style="fill:#809cc9" + id="rect5099" /> + <path + d="M 576.47347,725.93939 L 582.84431,726.35441 L 583.25121,755.8725 C 581.35919,754.55465 576.39694,752.1117 574.98889,754.19149 L 574.98889,727.42397 C 574.98889,726.60151 575.65101,725.93939 576.47347,725.93939 z " + transform="matrix(0.499065,-0.866565,0,1,0,0)" + style="fill:#4573b3;fill-opacity:1" + id="rect5101" /> + <path + d="M 293.2599,221.89363 L 313.99908,221.89363 C 314.45009,221.89363 314.81318,222.25673 314.81318,222.70774 C 315.02865,229.0361 295.44494,244.47124 292.44579,240.30491 L 292.44579,222.70774 C 292.44579,222.25673 292.80889,221.89363 293.2599,221.89363 z " + style="opacity:0.65536726;fill:url(#linearGradient2371);fill-opacity:1" + id="path5103" /> + </g> +</svg> diff --git a/doc/Tapset_Reference_Guide/manpager.sh b/doc/Tapset_Reference_Guide/manpager.sh new file mode 100644 index 00000000..2b9873b7 --- /dev/null +++ b/doc/Tapset_Reference_Guide/manpager.sh @@ -0,0 +1,131 @@ +#!/bin/bash +# This script builds the man pages from comments in tapsets. As such, the man page content +# generated herein should be in sync with Tapset Reference Guide + +# cleanup +rm -rf workingdir + +# create working directory +mkdir workingdir ; + +# create list of man pages to generate; should be in sync with Tapset Reference Guide +cat ../SystemTap_Tapset_Reference/tapsets.tmpl | grep ^\!Itapset > manpageus ; +sed -i -e 's/\!Itapset\///g' manpageus ; + +# copy list of man pages into working directory +for i in `cat manpageus` ; do cp ../../tapset/$i workingdir ; done ; + +# enter workdir +cd workingdir ; + +# copy tapsetdescriptions, then clean +for i in `cat ../manpageus`; do +sed -n '/\/\/ <tapsetdescription>/,/\/\/ <\/tapsetdescription>/ s/.*/&/w temp' < $i ; +mv temp $i.tapsetdescription ; +sed -i -e 's/\/\/ <tapsetdescription>//g' $i.tapsetdescription ; +sed -i -e 's/\/\/ <\/tapsetdescription>//g' $i.tapsetdescription ; +sed -i -e 's/\/\///g' $i.tapsetdescription ; +done + +# strip all tapset files to just comments; but all comments must be exactly 1 space before and after "*" +for i in `cat ../manpageus` ; do sed -i -e 's/^ \*/ \*/g' $i; +sed -i -e 's/^ \* / \* /g' $i; +# mark the start of each probe entry (sub "/**") +perl -p -i -e 's|^/\*\*| *probestart|g' $i; +sed -i -e '/^ \*/!d' $i; +# rename all tapsets (remove .stp filename suffix), create templates +echo $i > tempname ; +sed -i -e 's/.stp//g' tempname ; +mv $i `cat tempname` ; mv tempname $i ; +done ; +# clean all tapsetdescriptions (remove excess spaces) +# for i in `ls | grep tapsetdescription` ; do perl -p -i -e 's|^\n||g' $i ; done ; + +# create man page headers +for i in `ls | grep -v .stp | grep -v tapsetdescription` ; do +#echo ".\" -*- nroff -*-" >> $i.template ; +echo ".TH STAPPROBES."$i" 5 @DATE@ "IBM"" >> $i.template ; +echo ".SH NAME" >> $i.template ; +echo "stapprobes."`cat $i.stp`" \- systemtap "`cat $i.stp`" probe points" >> $i.template ; +echo " " >> $i.template ; +echo ".SH DESCRIPTION" >> $i.template ; +cat $i.stp.tapsetdescription >> $i.template ; +echo " " >> $i.template ; +#echo " " >> $i.template ; +echo ".SH PROBES" >> $i.template ; +echo ".br" >> $i.template ; +echo ".P" >> $i.template ; +echo ".TP" >> $i.template ; +done + +# MOST IMPORTANT: clean man page body! +for i in `ls | grep -v .stp | grep -v tapsetdescription | grep -v template` ; +do cp $i $i.tmp ; +perl -p -i -e 's| \* sfunction|.BR|g' $i.tmp ; +perl -p -i -e 's| \* probe|.BR|g' $i.tmp ; +perl -p -i -e 's| -|\ninitlinehere|g' $i.tmp ; +perl -p -i -e 's|^initlinehere([^\n]*)\n|\n.br\n$1\n\n.B Arguments:|g' $i.tmp ; +perl -p -i -e 's| \* @([^:]*):|\n.I $1\n.br\n|g' $i.tmp ; +perl -p -i -e 's| \* ([^:]*):|\n.BR $1:\n.br\n|g' $i.tmp ; +perl -p -i -e 's|\*probestart|\n.P\n.TP|g' $i.tmp ; +perl -p -i -e 's|\.I|\n\n.I|g' $i.tmp ; +# special formatting for Arguments header +perl -p -i -e 's|.B Arguments: \*\/||g' $i.tmp ; +perl -p -i -e 's|.B Arguments: \*|.B Description:|g' $i.tmp ; + +cat $i.tmp | +perl -p -e 'undef $/;s|.B Arguments:\n.B|.B|msg' | +perl -p -e 'undef $/;s|\n\n\n|\n\n|msg' > $i.manpagebody ; +done + +# generate footer template +mv ../manpageus . +sed -i -e 's/.stp//g' manpageus +echo ".SH SEE ALSO" >> footer +echo ".IR stap (1)," >> footer +echo ".IR stapprobes (5)," >> footer +for i in `cat manpageus`; do echo ".IR stapprobes."$i" (5)," >> footer ; done + +# assemble parts +for i in `cat manpageus`; do +cat $i.template >> $i.5 ; +cat $i.manpagebody >> $i.5 ; +cat footer >> $i.5 ; +done + +# cleanup +for i in `cat manpageus`; do +# context.stp +perl -p -i -e 's|.B Description:/|\n.P\n.TP|g' $i.5 ; +perl -p -i -e 's|.B Description:|.B Description:\n\n |g' $i.5 ; +# convert tags +perl -p -i -e 's|</[^>]*>([^.])|$1\n|g' $i.5 ; +perl -p -i -e 's|<[^>]*>|\n.B |g' $i.5 ; +cat $i.5 | +perl -p -e 'undef $/;s|\.B Arguments:\n\n\.B |.B|msg' | +# for tagged commands followed by periods +perl -p -e 'undef $/;s|\n\.B \.|.\n|msg' | +perl -p -e 'undef $/;s|\n \* | |msg' > stapprobes.$i.5.in ; +# cleanup all remaining stars, excess initial whitespace, and trailing "/" per line +perl -p -i -e 's|^ \*||g' stapprobes.$i.5.in; +perl -p -i -e 's|^[ ]*||g' stapprobes.$i.5.in; +perl -p -i -e 's|^/||g' stapprobes.$i.5.in; +# cleanup remaining excess whitespace +perl -p -i -e 's|\t\t| |g' stapprobes.$i.5.in; +perl -p -i -e 's|^ ||g' stapprobes.$i.5.in; +sed -i -e 's/ / /g' stapprobes.$i.5.in; +done + +# file cleanup +rm `ls | grep -v stapprobes` +#mv workingdir final_manpages +# perl -p -i -e 's|||g' stapprobes.$i.5.in ; + +# perl -p -i -e 's|||g' $i.manpagebody +# use to move marked strings. +# sed -n '/\/\/ <tapsetdescription>/,/\/\/ <\/tapsetdescription>/ s/.*/&/w bleh' < ioscheduler +# remove excess initial whitespace for each line +# perl -p -i -e 's|^ ||g' stapprobes.$i.5.in; +# convert tags +# perl -p -i -e 's|</[^>]*>|\n|g' stapprobes.$i.5.in ; +# perl -p -i -e 's|<[^>]*>|\n.B |g' stapprobes.$i.5.in ;
\ No newline at end of file diff --git a/doc/Tapset_Reference_Guide/publicanize.sh b/doc/Tapset_Reference_Guide/publicanize.sh index 96c20a11..d4da6e02 100755 --- a/doc/Tapset_Reference_Guide/publicanize.sh +++ b/doc/Tapset_Reference_Guide/publicanize.sh @@ -1,10 +1,15 @@ #!/bin/bash #copy the automated tapsets.xml -cp ../SystemTap_Tapset_Reference/tapsets.xml en-US/Tapset_Reference_Guide.xml ; +cp ../SystemTap_Tapset_Reference/tapsets.xml temp.xml ; #remove all excess whitespace -sed -i -e 's/^\s*//g' en-US/Tapset_Reference_Guide.xml ; +sed -i -e 's/^\s*//g' temp.xml ; + +#remove marked Intro (starthere to endhere), then copy it to en-US +sed '/starthere/,/endhere/d' temp.xml > Tapset_Reference_Guide.xml +cp Tapset_Reference_Guide.xml en-US/Tapset_Reference_Guide.xml; +rm Tapset_Reference_Guide.xml #re-convert programlisting tags sed -i -e 's/<programlisting>/<programlisting>/g' en-US/Tapset_Reference_Guide.xml; @@ -22,15 +27,24 @@ perl -p -e 'undef $/;s|<para>\nYou should have received a copy of the GNU Genera perl -p -e 'undef $/;s|<para>\nFor more details see the file COPYING in the source\ndistribution of Linux.\n</para>\n</legalnotice>\n</bookinfo>||msg' | perl -p -e 'undef $/;s|<toc></toc>||msg' | perl -p -e 'undef $/;s|\n\n\n\n\n\n\n\n\n\n\n\n\n\n||msg' | -perl -p -e 'undef $/;s|<programlisting>\n|<programlisting>\n<emphasis>(sfunction) <\/emphasis>|msg' | +perl -p -e 'undef $/;s|\n\n\n\n\n\n\n\n\n\n\n||msg' | +perl -p -e 'undef $/;s|<programlisting>\n|<programlisting>\n<emphasis>function <\/emphasis>|msg' | perl -p -e 'undef $/;s|<para>\n</para>||msg' | perl -p -e 'undef $/;s|<para>\n\n</para>||msg' | perl -p -e 'undef $/;s|<para>\n<programlisting>|<programlisting>|msg' | perl -p -e 'undef $/;s|</programlisting>\n</para>|</programlisting>|msg' > clean.xml +#replace Intro with my own +perl -p -i -e 's|<!--markerforxi-->|<xi:include href="Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />\n<xi:include href="Tapset_Dev_Guide.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />|g' clean.xml + +#for tapset name format section +#perl -p -i -e 'undef $/;s|<screen>\nname:return \(parameters\)\ndefinition\n</screen>|<screen>\n<replaceable>function/probe</replaceable> tapset_name:return \(parameters\)\n</screen>|msg' clean.xml +#perl -p -i -e 's|<para>In this guide, tapset definitions appear in the following format:</para>|<para>In this guide, the synopsis of each tapset appears in the following format:</para>|g' clean.xml +#perl -p -i -e 's|<!-- markerforxi pls dont remove -->|<xi:include href="tapsetnameformat-lastpara.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />\n<xi:include href="refentry-example.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />|g' clean.xml + cp clean.xml en-US/Tapset_Reference_Guide.xml rm clean.xml - + # statements change synopsis tags, as they are still currently unfixed in publican-redhat sed -i -e 's/refsynopsisdiv>/refsect1>/g' en-US/Tapset_Reference_Guide.xml; sed -i -e 's/refsect1>/refsection>/g' en-US/Tapset_Reference_Guide.xml; @@ -45,4 +59,7 @@ sed -i -e 's/<remark>/<remark>/g' en-US/Tapset_Reference_Guide.xml; sed -i -e 's/<\/remark>/<\/remark>/g' en-US/Tapset_Reference_Guide.xml; sed -i -e 's/<command>/<command>/g' en-US/Tapset_Reference_Guide.xml; -sed -i -e 's/<\/command>/<\/command>/g' en-US/Tapset_Reference_Guide.xml;
\ No newline at end of file +sed -i -e 's/<\/command>/<\/command>/g' en-US/Tapset_Reference_Guide.xml; + +#useful marker script; moves content between starthere and endhere to file target +#sed -n '/starthere/,/endhere/ s/.*/&/w target' Tapset_Reference_Guide.xml
\ No newline at end of file @@ -73,6 +73,15 @@ class provider: self.h.write ('#define %s(arg1,arg2,arg3,arg4,arg5) STAP_PROBE%d(provider,%s,arg1,arg2,arg3,arg4,arg5)\n' % (this_probe_canon, c+1, this_probe)) elif (c == 5): self.h.write ('#define %s(arg1,arg2,arg3,arg4,arg5,arg6) STAP_PROBE%d(provider,%s,arg1,arg2,arg3,arg4,arg5,arg6)\n' % (this_probe_canon, c+1, this_probe)) + elif (c == 6): + self.h.write ('#define %s(arg1,arg2,arg3,arg4,arg5,arg6,arg7) STAP_PROBE%d(provider,%s,arg1,arg2,arg3,arg4,arg5,arg6,arg7)\n' % (this_probe_canon, c+1, this_probe)) + elif (c == 7): + self.h.write ('#define %s(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) STAP_PROBE%d(provider,%s,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)\n' % (this_probe_canon, c+1, this_probe)) + elif (c == 8): + self.h.write ('#define %s(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) STAP_PROBE%d(provider,%s,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)\n' % (this_probe_canon, c+1, this_probe)) + elif (c == 9): + self.h.write('// X %d %s\n' % (c+1,this_probe_canon)) + self.h.write ('#define %s(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) STAP_PROBE%d(provider,%s,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10)\n' % (this_probe_canon, c+1, this_probe)) self.h.write ('#define %s_ENABLED() 1\n' % this_probe_canon) def get(self, arg): diff --git a/elaborate.cxx b/elaborate.cxx index 0a00ebf2..34e6ab16 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1448,6 +1448,7 @@ systemtap_session::systemtap_session (): timer_derived_probes(0), profile_derived_probes(0), mark_derived_probes(0), + tracepoint_derived_probes(0), hrtimer_derived_probes(0), perfmon_derived_probes(0), procfs_derived_probes(0), diff --git a/elaborate.h b/elaborate.h index 1e05444f..0ad5b4b2 100644 --- a/elaborate.h +++ b/elaborate.h @@ -124,6 +124,8 @@ struct derived_probe: public probe virtual void join_group (systemtap_session& s) = 0; virtual probe_point* sole_location () const; virtual void printsig (std::ostream &o) const; + //for print arguments of probe if there + virtual void printargs (std::ostream &o) const {} void printsig_nested (std::ostream &o) const; virtual void collect_derivation_chain (std::vector<probe*> &probes_list); diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h index d68fed6c..d6c90192 100644 --- a/includes/sys/sdt.h +++ b/includes/sys/sdt.h @@ -1,22 +1,24 @@ -// Copyright (C) 2005-2009 Red Hat Inc. -// Copyright (C) 2006 Intel Corporation. -// -// This file is part of systemtap, and is free software. You can -// redistribute it and/or modify it under the terms of the GNU General -// Public License (GPL); either version 2, or (at your option) any -// later version. +/* Copyright (C) 2005-2009 Red Hat Inc. + Copyright (C) 2006 Intel Corporation. + + This file is part of systemtap, and is free software. You can + redistribute it and/or modify it under the terms of the GNU General + Public License (GPL); either version 2, or (at your option) any + later version. +*/ #ifndef _SYS_SDT_H #define _SYS_SDT_H 1 #include <string.h> +#include <sys/types.h> #if _LP64 #define STAP_PROBE_STRUCT_ARG(arg) \ - __uint64_t arg; + __uint64_t arg #else #define STAP_PROBE_STRUCT_ARG(arg) \ - long arg __attribute__ ((aligned(8))); + long arg __attribute__ ((aligned(8))) #endif #define STAP_SENTINEL 0x31425250 @@ -28,126 +30,192 @@ struct _probe_ ## probe \ STAP_PROBE_STRUCT_ARG (probe_name); \ STAP_PROBE_STRUCT_ARG (probe_arg); \ }; \ -static char probe ## _ ## probe_name [strlen(#probe)+1] \ +static char probe ## _ ## probe_name [] \ __attribute__ ((section (".probes"))) \ = #probe; \ -static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {STAP_SENTINEL,(size_t)& probe ## _ ## probe_name[0],argc}; +__extension__ static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {STAP_SENTINEL,(size_t)& probe ## _ ## probe_name[0],argc}; -#define STAP_LABEL_REF(probe) \ +/* The goto _probe_ prevents the label from "drifting" */ +#define STAP_LABEL_REF(probe, label) \ if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__); + goto label; +/* These baroque macros are used to create a unique label */ #define STAP_CONCAT(a,b) a ## b -#define STAP_LABEL(p,n) \ - STAP_CONCAT(_stapprobe1_ ## p ## _, n) - -// The goto _probe_ prevents the label from "drifting" -#define STAP_PROBE(provider,probe) \ - { \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop"); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe) \ -} - +#define STAP_LABEL_PREFIX(p) _stapprobe1_ ## p +/* __COUNTER__ is not present in gcc 4.1 */ +#if __GNUC__ == 4 && __GNUC_MINOR__ >= 3 +#define STAP_COUNTER STAP_CONCAT(__,COUNTER__) +#else +#define STAP_COUNTER STAP_CONCAT(__,LINE__) +#endif +#define STAP_LABEL(a,b) STAP_CONCAT(a,b) + +#define STAP_PROBE_(probe,label) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + STAP_LABEL_REF(probe,label); \ +label: \ + __asm__ volatile ("nop"); \ + } while (0) + +#define STAP_PROBE1_(probe,label,parm1) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ +label: \ + __asm__ volatile ("nop /* %0 */" :: "X"( arg1)); \ + STAP_LABEL_REF(probe,label); \ + } while (0) + +#define STAP_PROBE2_(probe,label,parm1,parm2) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ +label: \ + __asm__ volatile ("nop /* %0 %1 */" :: "X"(arg1), "X"(arg2)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE3_(probe,label,parm1,parm2,parm3) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ +label: \ + __asm__ volatile ("nop /* %0 %1 %2 */" :: "X"(arg1), "X"(arg2), "X"(arg3)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE4_(probe,label,parm1,parm2,parm3,parm4) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ + volatile __typeof__((parm4)) arg4 __attribute__ ((unused)) = parm4; \ +label: \ + __asm__ volatile ("nop /* %0 %1 %2 %3 */" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE5_(probe,label,parm1,parm2,parm3,parm4,parm5) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ + volatile __typeof__((parm4)) arg4 __attribute__ ((unused)) = parm4; \ + volatile __typeof__((parm5)) arg5 __attribute__ ((unused)) = parm5; \ +label: \ + __asm__ volatile ("nop /* %0 %1 %2 %3 %4 */" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE6_(probe,label,parm1,parm2,parm3,parm4,parm5,parm6) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ + volatile __typeof__((parm4)) arg4 __attribute__ ((unused)) = parm4; \ + volatile __typeof__((parm5)) arg5 __attribute__ ((unused)) = parm5; \ + volatile __typeof__((parm6)) arg6 __attribute__ ((unused)) = parm6; \ +label: \ + __asm__ volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE7_(probe,label,parm1,parm2,parm3,parm4,parm5,parm6,parm7) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ + volatile __typeof__((parm4)) arg4 __attribute__ ((unused)) = parm4; \ + volatile __typeof__((parm5)) arg5 __attribute__ ((unused)) = parm5; \ + volatile __typeof__((parm6)) arg6 __attribute__ ((unused)) = parm6; \ + volatile __typeof__((parm7)) arg7 __attribute__ ((unused)) = parm7; \ +label: \ + __asm__ volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6), "X"(arg7)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE8_(probe,label,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ + volatile __typeof__((parm4)) arg4 __attribute__ ((unused)) = parm4; \ + volatile __typeof__((parm5)) arg5 __attribute__ ((unused)) = parm5; \ + volatile __typeof__((parm6)) arg6 __attribute__ ((unused)) = parm6; \ + volatile __typeof__((parm7)) arg7 __attribute__ ((unused)) = parm7; \ + volatile __typeof__((parm8)) arg8 __attribute__ ((unused)) = parm8; \ +label: \ + __asm__ volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6), "X"(arg7), "X"(arg8)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE9_(probe,label,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ + volatile __typeof__((parm4)) arg4 __attribute__ ((unused)) = parm4; \ + volatile __typeof__((parm5)) arg5 __attribute__ ((unused)) = parm5; \ + volatile __typeof__((parm6)) arg6 __attribute__ ((unused)) = parm6; \ + volatile __typeof__((parm7)) arg7 __attribute__ ((unused)) = parm7; \ + volatile __typeof__((parm8)) arg8 __attribute__ ((unused)) = parm8; \ + volatile __typeof__((parm9)) arg9 __attribute__ ((unused)) = parm9; \ +label: \ + __asm__ volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6), "X"(arg7), "X"(arg8), "X"(arg9)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE10_(probe,label,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10) \ +do { \ + STAP_PROBE_STRUCT(probe,(size_t)&& label) \ + volatile __typeof__((parm1)) arg1 __attribute__ ((unused)) = parm1; \ + volatile __typeof__((parm2)) arg2 __attribute__ ((unused)) = parm2; \ + volatile __typeof__((parm3)) arg3 __attribute__ ((unused)) = parm3; \ + volatile __typeof__((parm4)) arg4 __attribute__ ((unused)) = parm4; \ + volatile __typeof__((parm5)) arg5 __attribute__ ((unused)) = parm5; \ + volatile __typeof__((parm6)) arg6 __attribute__ ((unused)) = parm6; \ + volatile __typeof__((parm7)) arg7 __attribute__ ((unused)) = parm7; \ + volatile __typeof__((parm8)) arg8 __attribute__ ((unused)) = parm8; \ + volatile __typeof__((parm9)) arg9 __attribute__ ((unused)) = parm9; \ + volatile __typeof__((parm10)) arg10 __attribute__ ((unused)) = parm10; \ +label: \ + __asm__ volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6), "X"(arg7), "X"(arg8), "X"(arg9), "X"(arg10)); \ + STAP_LABEL_REF(probe,label); \ +} while (0) + +#define STAP_PROBE(provider,probe) \ + STAP_PROBE_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER)) #define STAP_PROBE1(provider,probe,parm1) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop /* %0 */" :: "g"( arg1)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE2(provider,probe,parm1,parm2) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop /* %0 %1 */" :: "g"(arg1), "g"(arg2)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE3(provider,probe,parm1,parm2,parm3) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop /* %0 %1 %2 */" :: "g"(arg1), "g"(arg2), "g"(arg3)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ - volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop /* %0 %1 %2 %3 */" :: "g"(arg1), "g"(arg2), "g"(arg3), "g"(arg4)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ - volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ - volatile typeof((parm5)) arg5 __attribute__ ((unused)) = parm5; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop /* %0 %1 %2 %3 %4 */" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE6(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ - volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ - volatile typeof((parm5)) arg5 __attribute__ ((unused)) = parm5; \ - volatile typeof((parm6)) arg6 __attribute__ ((unused)) = parm6; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ - volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ - volatile typeof((parm5)) arg5 __attribute__ ((unused)) = parm5; \ - volatile typeof((parm6)) arg6 __attribute__ ((unused)) = parm6; \ - volatile typeof((parm7)) arg7 __attribute__ ((unused)) = parm7; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6), "X"(arg7)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE8(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ - volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ - volatile typeof((parm5)) arg5 __attribute__ ((unused)) = parm5; \ - volatile typeof((parm6)) arg6 __attribute__ ((unused)) = parm6; \ - volatile typeof((parm7)) arg7 __attribute__ ((unused)) = parm7; \ - volatile typeof((parm8)) arg8 __attribute__ ((unused)) = parm8; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6), "X"(arg7), "X"(arg8)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} - -#define STAP_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ - volatile typeof((parm4)) arg4 __attribute__ ((unused)) = parm4; \ - volatile typeof((parm5)) arg5 __attribute__ ((unused)) = parm5; \ - volatile typeof((parm6)) arg6 __attribute__ ((unused)) = parm6; \ - volatile typeof((parm7)) arg7 __attribute__ ((unused)) = parm7; \ - volatile typeof((parm8)) arg8 __attribute__ ((unused)) = parm8; \ - volatile typeof((parm9)) arg9 __attribute__ ((unused)) = parm9; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "X"(arg1), "X"(arg2), "X"(arg3), "X"(arg4), "X"(arg5), "X"(arg6), "X"(arg7), "X"(arg8), "X"(arg9)); \ - STAP_PROBE_STRUCT(probe,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - STAP_LABEL_REF(probe);} + STAP_PROBE1_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1)) +#define STAP_PROBE2(provider,probe,parm1,parm2) \ + STAP_PROBE2_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2)) +#define STAP_PROBE3(provider,probe,parm1,parm2,parm3) \ + STAP_PROBE3_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3)) +#define STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ + STAP_PROBE4_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3),(parm4)) +#define STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \ + STAP_PROBE5_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3),(parm4),(parm5)) +#define STAP_PROBE6(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) \ + STAP_PROBE6_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3),(parm4),(parm5),(parm6)) +#define STAP_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) \ + STAP_PROBE7_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3),(parm4),(parm5),(parm6),(parm7)) +#define STAP_PROBE8(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) \ + STAP_PROBE8_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3),(parm4),(parm5),(parm6),(parm7),(parm8)) +#define STAP_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) \ + STAP_PROBE9_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3),(parm4),(parm5),(parm6),(parm7),(parm8),(parm9)) +#define STAP_PROBE10(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10) \ + STAP_PROBE10_(probe,STAP_LABEL(STAP_LABEL_PREFIX(probe),STAP_COUNTER),(parm1),(parm2),(parm3),(parm4),(parm5),(parm6),(parm7),(parm8),(parm9),(parm10)) #define DTRACE_PROBE(provider,probe) \ STAP_PROBE(provider,probe) @@ -169,5 +237,5 @@ STAP_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) STAP_PROBE8(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) #define DTRACE_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) \ STAP_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) - #endif /* sys/sdt.h */ + @@ -134,6 +134,8 @@ usage (systemtap_session& s, int exitcode) #endif // Formerly present --ignore-{vmlinux,dwarf} options are for testsuite use // only, and don't belong in the eyesight of a plain user. + << " --skip-badvars" << endl + << " overlook context of bad $ variables" << endl << endl ; @@ -187,13 +189,16 @@ printscript(systemtap_session& s, ostream& o) { o << pp; // Print the locals for -L mode only - if (s.unoptimized) + if (s.unoptimized) { for (unsigned j=0; j<p->locals.size(); j++) { o << " "; vardecl* v = p->locals[j]; v->printsig (o); } + // Print arguments of probe if there + p->printargs(o); + } o << endl; seen.insert (pp); } @@ -428,12 +433,14 @@ main (int argc, char * const argv []) #define LONG_OPT_IGNORE_VMLINUX 3 #define LONG_OPT_IGNORE_DWARF 4 #define LONG_OPT_VERBOSE_PASS 5 +#define LONG_OPT_SKIP_BADVARS 6 // NB: also see find_hash(), usage(), switch stmt below, stap.1 man page static struct option long_options[] = { { "kelf", 0, &long_opt, LONG_OPT_KELF }, { "kmap", 2, &long_opt, LONG_OPT_KMAP }, { "ignore-vmlinux", 0, &long_opt, LONG_OPT_IGNORE_VMLINUX }, { "ignore-dwarf", 0, &long_opt, LONG_OPT_IGNORE_DWARF }, + { "skip-badvars", 0, &long_opt, LONG_OPT_SKIP_BADVARS }, { "vp", 1, &long_opt, LONG_OPT_VERBOSE_PASS }, { NULL, 0, NULL, 0 } }; @@ -695,6 +702,9 @@ main (int argc, char * const argv []) // NB: we don't do this: s.last_pass = strlen(optarg); break; } + case LONG_OPT_SKIP_BADVARS: + s.skip_badvars = true; + break; default: cerr << "Internal error parsing command arguments." << endl; usage(s, 1); diff --git a/runtime/alloc.c b/runtime/alloc.c index 89d16612..439e8a7e 100644 --- a/runtime/alloc.c +++ b/runtime/alloc.c @@ -233,30 +233,14 @@ static void *_stp_vmalloc(unsigned long size) } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) static void *_stp_alloc_percpu(size_t size) { -#ifdef DEBUG_MEM +#ifdef STAPCONF_ALLOC_PERCPU_ALIGN void *ret = __alloc_percpu(size, 8); - if (likely(ret)) { - struct _stp_mem_entry *m = kmalloc(sizeof(struct _stp_mem_entry), STP_ALLOC_FLAGS); - if (unlikely(m == NULL)) { - free_percpu(ret); - return NULL; - } - _stp_mem_debug_percpu(m, ret, size); - _stp_allocated_memory += size * num_online_cpus(); - } - return ret; #else - return __alloc_percpu(size, 8); + void *ret = __alloc_percpu(size); #endif -} -#else -static void *_stp_alloc_percpu(size_t size) -{ #ifdef DEBUG_MEM - void *ret = __alloc_percpu(size); if (likely(ret)) { struct _stp_mem_entry *m = kmalloc(sizeof(struct _stp_mem_entry), STP_ALLOC_FLAGS); if (unlikely(m == NULL)) { @@ -266,12 +250,9 @@ static void *_stp_alloc_percpu(size_t size) _stp_mem_debug_percpu(m, ret, size); _stp_allocated_memory += size * num_online_cpus(); } - return ret; -#else - return __alloc_percpu(size); #endif + return ret; } -#endif /* LINUX_VERSION_CODE */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12) #define _stp_kmalloc_node(size,node) _stp_kmalloc(size) diff --git a/runtime/autoconf-alloc-percpu-align.c b/runtime/autoconf-alloc-percpu-align.c new file mode 100644 index 00000000..158d579c --- /dev/null +++ b/runtime/autoconf-alloc-percpu-align.c @@ -0,0 +1,6 @@ +#include <linux/percpu.h> + +/* kernel commit f2a8205c */ +void foo (void) { + (void) __alloc_percpu(sizeof(int), 8); +} diff --git a/runtime/autoconf-save-stack-trace.c b/runtime/autoconf-save-stack-trace.c new file mode 100644 index 00000000..39ded684 --- /dev/null +++ b/runtime/autoconf-save-stack-trace.c @@ -0,0 +1,22 @@ +#include <linux/string.h> +#include <linux/sched.h> +#include <linux/stacktrace.h> +#include <asm/stacktrace.h> + +void foo(struct task_struct *foo) +{ + struct stack_trace trace; + unsigned long backtrace[20]; + memset(&trace, 0, sizeof(trace)); + trace.entries = &backtrace[0]; + trace.max_entries = 20; + trace.skip = 0; + save_stack_trace_tsk(tsk, &trace); +} + +static const struct stacktrace_ops print_stack_ops; + +void dumper(struct task_struct *foo) +{ + dump_trace(foo, 0, 0, 0, &print_stack_ops, 0); +} diff --git a/runtime/itrace.c b/runtime/itrace.c index df18a400..ed32b0bc 100644 --- a/runtime/itrace.c +++ b/runtime/itrace.c @@ -1,6 +1,6 @@ /* * user space instruction tracing - * Copyright (C) 2005, 2006, 2007, 2008 IBM Corp. + * Copyright (C) 2005, 2006, 2007, 2008, 2009 IBM Corp. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -18,8 +18,6 @@ #include <linux/rcupdate.h> #include <linux/utrace.h> #include <asm/string.h> -#include <asm/tracehook.h> -#include <asm/ptrace.h> #include "uprobes/uprobes.h" #ifndef put_task_struct @@ -65,10 +63,81 @@ static struct itrace_info *create_itrace_info( struct task_struct *tsk, u32 step_flag, struct stap_itrace_probe *itrace_probe); -static u32 usr_itrace_report_signal(struct utrace_attached_engine *engine, +/* + * The kernel's access_process_vm is not exported in kernel.org kernels, although + * some distros export it on some architectures. To workaround this inconsistency, + * we copied and pasted it here. Fortunately, everything it calls is exported. + */ +#include <linux/pagemap.h> +#include <asm/cacheflush.h> +static int __access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write) +{ + struct mm_struct *mm; + struct vm_area_struct *vma; + struct page *page; + void *old_buf = buf; + + mm = get_task_mm(tsk); + if (!mm) + return 0; + + down_read(&mm->mmap_sem); + /* ignore errors, just check how much was sucessfully transfered */ + while (len) { + int bytes, ret, offset; + void *maddr; + + ret = get_user_pages(tsk, mm, addr, 1, + write, 1, &page, &vma); + if (ret <= 0) + break; + + bytes = len; + offset = addr & (PAGE_SIZE-1); + if (bytes > PAGE_SIZE-offset) + bytes = PAGE_SIZE-offset; + + maddr = kmap(page); + if (write) { + copy_to_user_page(vma, page, addr, + maddr + offset, buf, bytes); + set_page_dirty_lock(page); + } else { + copy_from_user_page(vma, page, addr, + buf, maddr + offset, bytes); + } + kunmap(page); + page_cache_release(page); + len -= bytes; + buf += bytes; + addr += bytes; + } + up_read(&mm->mmap_sem); + mmput(mm); + + return buf - old_buf; +} + +static u32 usr_itrace_report_quiesce(enum utrace_resume_action action, + struct utrace_attached_engine *engine, + struct task_struct *tsk, + unsigned long event) +{ + int status; + struct itrace_info *ui; + + ui = rcu_dereference(engine->data); + WARN_ON(!ui); + + return (event == 0 ? ui->step_flag : UTRACE_RESUME); +} + + +static u32 usr_itrace_report_signal(u32 action, + struct utrace_attached_engine *engine, struct task_struct *tsk, struct pt_regs *regs, - u32 action, siginfo_t *info, + siginfo_t *info, const struct k_sigaction *orig_ka, struct k_sigaction *return_ka) { @@ -83,12 +152,10 @@ static u32 usr_itrace_report_signal(struct utrace_attached_engine *engine, WARN_ON(!ui); if (info->si_signo != SIGTRAP || !ui) - return UTRACE_ACTION_RESUME; - - /* normal case: continue stepping, hide this trap from other engines */ - return_flags = ui->step_flag | UTRACE_ACTION_HIDE | UTRACE_SIGNAL_IGN | - UTRACE_ACTION_NEWSTATE; + return UTRACE_RESUME; + /* normal case: continue stepping */ + return_flags = ui->step_flag | UTRACE_SIGNAL_IGN; #ifdef CONFIG_PPC if (ui->ppc_atomic_ss.step_over_atomic) { remove_atomic_ss_breakpoint(tsk, &ui->ppc_atomic_ss.end_bpt); @@ -99,8 +166,7 @@ static u32 usr_itrace_report_signal(struct utrace_attached_engine *engine, } if (handle_ppc_atomic_seq(tsk, regs, &ui->ppc_atomic_ss)) - return_flags = UTRACE_ACTION_RESUME | UTRACE_ACTION_NEWSTATE | - UTRACE_SIGNAL_IGN; + return_flags = UTRACE_RESUME | UTRACE_SIGNAL_IGN; #endif enter_itrace_probe(ui->itrace_probe, regs, (void *)&data); @@ -108,24 +174,26 @@ static u32 usr_itrace_report_signal(struct utrace_attached_engine *engine, return return_flags; } -static u32 usr_itrace_report_clone(struct utrace_attached_engine *engine, +static u32 usr_itrace_report_clone(enum utrace_resume_action action, + struct utrace_attached_engine *engine, struct task_struct *parent, unsigned long clone_flags, struct task_struct *child) { - return UTRACE_ACTION_RESUME; + return UTRACE_RESUME; } static u32 usr_itrace_report_death(struct utrace_attached_engine *e, - struct task_struct *tsk) + struct task_struct *tsk, bool group_dead, int signal) { struct itrace_info *ui = rcu_dereference(e->data); WARN_ON(!ui); - return (UTRACE_ACTION_NEWSTATE | UTRACE_ACTION_DETACH); + return (UTRACE_DETACH); } static const struct utrace_engine_ops utrace_ops = { + .report_quiesce = usr_itrace_report_quiesce, .report_signal = usr_itrace_report_signal, .report_clone = usr_itrace_report_clone, .report_death = usr_itrace_report_death @@ -137,6 +205,7 @@ static struct itrace_info *create_itrace_info( struct stap_itrace_probe *itrace_probe) { struct itrace_info *ui; + int status; if (debug) printk(KERN_INFO "create_itrace_info: tid=%d\n", tsk->pid); @@ -154,20 +223,34 @@ static struct itrace_info *create_itrace_info( /* push ui onto usr_itrace_info */ spin_lock(&itrace_lock); list_add(&ui->link, &usr_itrace_info); + spin_unlock(&itrace_lock); /* attach a single stepping engine */ - ui->engine = utrace_attach(ui->tsk, UTRACE_ATTACH_CREATE, &utrace_ops, ui); + ui->engine = utrace_attach_task(ui->tsk, UTRACE_ATTACH_CREATE, &utrace_ops, ui); if (IS_ERR(ui->engine)) { printk(KERN_ERR "utrace_attach returns %ld\n", PTR_ERR(ui->engine)); - ui = NULL; - } else { - utrace_set_flags(tsk, ui->engine, ui->engine->flags | - ui->step_flag | - UTRACE_EVENT(CLONE) | UTRACE_EVENT_SIGNAL_ALL | - UTRACE_EVENT(DEATH)); + return NULL; } - spin_unlock(&itrace_lock); + status = utrace_set_events(tsk, ui->engine, ui->engine->flags | + UTRACE_EVENT(QUIESCE) | + UTRACE_EVENT(CLONE) | UTRACE_EVENT_SIGNAL_ALL | + UTRACE_EVENT(DEATH)); + if (status < 0) { + printk(KERN_ERR "utrace_attach returns %d\n", status); + return NULL; + } + + status = utrace_control(tsk, ui->engine, UTRACE_STOP); + if (status == 0) { + status = utrace_control(tsk, ui->engine, step_flag); + if (status < 0) { + printk(KERN_ERR "utrace_control(%d) returns %d\n", + step_flag, status); + return NULL; + } + } + return ui; } @@ -193,7 +276,7 @@ static int usr_itrace_init(int single_step, pid_t tid, struct stap_itrace_probe struct task_struct *tsk; rcu_read_lock(); - tsk = find_task_by_pid(tid); + tsk = find_task_by_vpid(tid); if (!tsk) { printk(KERN_ERR "usr_itrace_init: Cannot find process %d\n", tid); rcu_read_unlock(); @@ -203,7 +286,7 @@ static int usr_itrace_init(int single_step, pid_t tid, struct stap_itrace_probe get_task_struct(tsk); ui = create_itrace_info(tsk, (single_step ? - UTRACE_ACTION_SINGLESTEP : UTRACE_ACTION_BLOCKSTEP), p); + UTRACE_SINGLESTEP : UTRACE_BLOCKSTEP), p); if (!ui) return 1; @@ -223,6 +306,7 @@ static int usr_itrace_init(int single_step, pid_t tid, struct stap_itrace_probe void static remove_usr_itrace_info(struct itrace_info *ui) { struct itrace_info *tmp; + int status; if (!ui) return; @@ -232,7 +316,11 @@ void static remove_usr_itrace_info(struct itrace_info *ui) spin_lock(&itrace_lock); if (ui->tsk && ui->engine) { - (void) utrace_detach(ui->tsk, ui->engine); + status = utrace_control(ui->tsk, ui->engine, UTRACE_DETACH); + if (status < 0 && status != -ESRCH && status != -EALREADY) + printk(KERN_ERR + "utrace_control(UTRACE_DETACH) returns %d\n", + status); } list_del(&ui->link); spin_unlock(&itrace_lock); @@ -292,7 +380,7 @@ static void insert_atomic_ss_breakpoint (struct task_struct *tsk, cur_instr = get_instr(bpt->addr, "insert_atomic_ss_breakpoint"); if (cur_instr != BPT_TRAP) { bpt->instr = cur_instr; - WARN_ON(access_process_vm(tsk, bpt->addr, &bp_instr, INSTR_SZ, 1) != + WARN_ON(__access_process_vm(tsk, bpt->addr, &bp_instr, INSTR_SZ, 1) != INSTR_SZ); } } @@ -300,7 +388,7 @@ static void insert_atomic_ss_breakpoint (struct task_struct *tsk, static void remove_atomic_ss_breakpoint (struct task_struct *tsk, struct bpt_info *bpt) { - WARN_ON(access_process_vm(tsk, bpt->addr, &bpt->instr, INSTR_SZ, 1) != + WARN_ON(__access_process_vm(tsk, bpt->addr, &bpt->instr, INSTR_SZ, 1) != INSTR_SZ); } diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h index 0af19edc..16ddb950 100644 --- a/runtime/loc2c-runtime.h +++ b/runtime/loc2c-runtime.h @@ -186,37 +186,34 @@ */ #define kread(ptr) ({ \ - typeof(*(ptr)) _v; \ - if (probe_kernel_read((void *)&_v, (void *)(ptr), sizeof(*(ptr)))) \ - DEREF_FAULT(ptr); \ + typeof(*(ptr)) _v = 0; \ + if (lookup_bad_addr((unsigned long)(ptr)) || \ + probe_kernel_read((void *)&_v, (void *)(ptr), sizeof(*(ptr)))) \ + DEREF_FAULT(ptr); \ _v; \ }) #define kwrite(ptr, value) ({ \ typeof(*(ptr)) _v; \ _v = (typeof(*(ptr)))(value); \ - if (probe_kernel_write((void *)(ptr), (void *)&_v, sizeof(*(ptr)))) \ - STORE_DEREF_FAULT(ptr); \ + if (lookup_bad_addr((unsigned long)addr) || \ + probe_kernel_write((void *)(ptr), (void *)&_v, sizeof(*(ptr)))) \ + STORE_DEREF_FAULT(ptr); \ }) #define deref(size, addr) ({ \ - intptr_t _i; \ - if (lookup_bad_addr((unsigned long)addr)) \ - __deref_bad(); \ + intptr_t _i = 0; \ switch (size) { \ case 1: _i = kread((u8 *)(addr)); break; \ case 2: _i = kread((u16 *)(addr)); break; \ case 4: _i = kread((u32 *)(addr)); break; \ case 8: _i = kread((u64 *)(addr)); break; \ default: __deref_bad(); \ - /* uninitialized _i should also be caught by -Werror */ \ } \ _i; \ }) #define store_deref(size, addr, value) ({ \ - if (lookup_bad_addr((unsigned long)addr)) \ - __store_deref_bad(); \ switch (size) { \ case 1: kwrite((u8 *)(addr), (value)); break; \ case 2: kwrite((u16 *)(addr), (value)); break; \ @@ -237,7 +234,7 @@ extern void __store_deref_bad(void); ({ \ int _bad = 0; \ u8 _b; u16 _w; u32 _l; \ - intptr_t _v; \ + intptr_t _v = 0; \ if (lookup_bad_addr((unsigned long)addr)) \ _bad = 1; \ else \ @@ -277,7 +274,7 @@ extern void __store_deref_bad(void); ({ \ int _bad = 0; \ u8 _b; u16 _w; u32 _l; u64 _q; \ - intptr_t _v; \ + intptr_t _v = 0; \ if (lookup_bad_addr((unsigned long)addr)) \ _bad = 1; \ else \ @@ -394,7 +391,7 @@ extern void __store_deref_bad(void); #define deref(size, addr) \ ({ \ int _bad = 0; \ - intptr_t _v; \ + intptr_t _v = 0; \ if (lookup_bad_addr((unsigned long)addr)) \ _bad = 1; \ else \ diff --git a/runtime/sduprobes.c b/runtime/sduprobes.c deleted file mode 100644 index 83bc8e72..00000000 --- a/runtime/sduprobes.c +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2005-2008 Red Hat Inc. -// Copyright (C) 2006 Intel Corporation. -// -// This file is part of systemtap, and is free software. You can -// redistribute it and/or modify it under the terms of the GNU General -// Public License (GPL); either version 2, or (at your option) any -// later version. - -#include <stddef.h> -#define unused __attribute__ ((unused)) - -int -_stap_probe_0 (char* probe unused) -{ - return 1; -} - -int -_stap_probe_1 (char* probe unused, - size_t arg1 unused) -{ - return 1; -} - -int -_stap_probe_2 (char* probe unused , - size_t arg1 unused, - size_t arg2 unused) -{ - return 1; -} - -int -_stap_probe_3 (char* probe unused, - size_t arg1 unused, - size_t arg2 unused, - size_t arg3 unused) -{ - return 1; -} - -int -_stap_probe_4 (char* probe unused, - size_t arg1 unused, - size_t arg2 unused, - size_t arg3 unused, - size_t arg4 unused) -{ - return 1; -} - -int -_stap_probe_5 (char* probe unused, - size_t arg1 unused, - size_t arg2 unused, - size_t arg3 unused, - size_t arg4 unused, - size_t arg5 unused) -{ - return 1; -} diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c index 206801d8..5a18c9d8 100644 --- a/runtime/stack-i386.c +++ b/runtime/stack-i386.c @@ -14,7 +14,7 @@ static int _stp_valid_stack_ptr(unsigned long context, unsigned long p) } /* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */ -#if ! (defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) +#if !defined(STAPCONF_KERNEL_STACKTRACE) static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels) { unsigned long addr; diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 183de0a0..03d88ef0 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -10,7 +10,7 @@ /* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */ -#if ! (defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) +#if !defined(STAPCONF_KERNEL_STACKTRACE) static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels) { unsigned long addr; diff --git a/runtime/stack.c b/runtime/stack.c index aa0e6d65..f6b1cd08 100644 --- a/runtime/stack.c +++ b/runtime/stack.c @@ -27,8 +27,7 @@ #define MAXBACKTRACE 20 -#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26) -// XXX: PR9866: hacky temporarily restriction to recent kernels +#if defined(STAPCONF_KERNEL_STACKTRACE) #include <linux/stacktrace.h> #include <asm/stacktrace.h> #endif @@ -51,7 +50,7 @@ static void _stp_stack_print_fallback(unsigned long, int, int); #error "Unsupported architecture" #endif -#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26) +#if defined(STAPCONF_KERNEL_STACKTRACE) struct print_stack_data { @@ -161,7 +160,7 @@ static void _stp_ustack_print(char *str) void _stp_stack_print_tsk(struct task_struct *tsk, int verbose, int levels) { -#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26) +#if defined(STAPCONF_KERNEL_STACKTRACE) int i; unsigned long backtrace[MAXBACKTRACE]; struct stack_trace trace; diff --git a/runtime/staprun/mainloop.c b/runtime/staprun/mainloop.c index 29eb4f1f..db6ef6b7 100644 --- a/runtime/staprun/mainloop.c +++ b/runtime/staprun/mainloop.c @@ -477,6 +477,14 @@ int stp_main_loop(void) cleanup_and_exit(0); break; } + case STP_REQUEST_EXIT: + { + /* module asks us to start exiting, so send STP_EXIT */ + dbug(2, "got STP_REQUEST_EXIT\n"); + int32_t rc, btype = STP_EXIT; + rc = write(control_channel, &btype, sizeof(btype)); + break; + } case STP_START: { struct _stp_msg_start *t = (struct _stp_msg_start *)data; diff --git a/runtime/sym.h b/runtime/sym.h index e642cab4..586b10ca 100644 --- a/runtime/sym.h +++ b/runtime/sym.h @@ -25,6 +25,7 @@ struct _stp_section { struct _stp_module { const char* name; + const char* path; /* canonical path used for runtime matching. */ struct _stp_section *sections; unsigned num_sections; diff --git a/runtime/task_finder.c b/runtime/task_finder.c index ae381a41..38f9145d 100644 --- a/runtime/task_finder.c +++ b/runtime/task_finder.c @@ -72,7 +72,7 @@ static int __stp_tf_vm_cb(struct stap_task_finder_target *tgt, struct _stp_module *module = NULL; if (vm_path != NULL) for (i = 0; i < _stp_num_modules; i++) - if (strcmp(vm_path, _stp_modules[i]->name) == 0) + if (strcmp(vm_path, _stp_modules[i]->path) == 0) { #ifdef DEBUG_TASK_FINDER_VMA _stp_dbug(__FUNCTION__, __LINE__, diff --git a/runtime/time.c b/runtime/time.c index ad7cef9d..58c23e57 100644 --- a/runtime/time.c +++ b/runtime/time.c @@ -223,6 +223,7 @@ _stp_kill_time(void) #endif _stp_free_percpu(stp_time); + stp_time = NULL; } } @@ -232,6 +233,8 @@ _stp_init_time(void) { int ret = 0; + _stp_kill_time(); + stp_time = _stp_alloc_percpu(sizeof(stp_time_t)); if (unlikely(stp_time == 0)) return -1; @@ -263,7 +266,7 @@ _stp_init_time(void) } } #endif - if (ret) + if (ret) _stp_kill_time(); return ret; } @@ -278,6 +281,9 @@ _stp_gettimeofday_ns(void) stp_time_t *time; int i = 0; + if (!stp_time) + return -1; + preempt_disable(); time = per_cpu_ptr(stp_time, smp_processor_id()); diff --git a/runtime/transport/control.c b/runtime/transport/control.c index edde244d..680d7306 100644 --- a/runtime/transport/control.c +++ b/runtime/transport/control.c @@ -13,6 +13,8 @@ static _stp_mempool_t *_stp_pool_q; static struct list_head _stp_ctl_ready_q; static DEFINE_SPINLOCK(_stp_ctl_ready_lock); +static void _stp_cleanup_and_exit(int send_exit); + static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { u32 type; @@ -46,7 +48,7 @@ static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, siz } break; case STP_EXIT: - _stp_exit_flag = 1; + _stp_cleanup_and_exit(1); break; case STP_BULK: #ifdef STP_BULKMODE @@ -93,6 +95,9 @@ static void _stp_ctl_write_dbug(int type, void *data, int len) case STP_TRANSPORT: _dbug("sending STP_TRANSPORT\n"); break; + case STP_REQUEST_EXIT: + _dbug("sending STP_REQUEST_EXIT\n"); + break; default: _dbug("ERROR: unknown message type: %d\n", type); break; diff --git a/runtime/transport/debugfs.c b/runtime/transport/debugfs.c index dc651a56..85ee604d 100644 --- a/runtime/transport/debugfs.c +++ b/runtime/transport/debugfs.c @@ -9,6 +9,8 @@ * later version. */ +#include <linux/debugfs.h> + #define STP_DEFAULT_BUFFERS 50 inline static int _stp_ctl_write_fs(int type, void *data, unsigned len) diff --git a/runtime/transport/relayfs.h b/runtime/transport/relayfs.h index c33e9b08..e984b05b 100644 --- a/runtime/transport/relayfs.h +++ b/runtime/transport/relayfs.h @@ -9,7 +9,6 @@ # include <linux/relayfs_fs.h> #elif defined (CONFIG_RELAY) # include <linux/relay.h> -# include <linux/debugfs.h> #else # undef STP_RELAYFS #endif diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index 0755781e..762c0a92 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -25,7 +25,6 @@ static struct utt_trace *_stp_utt = NULL; static unsigned int utt_seq = 1; static int _stp_probes_started = 0; static pid_t _stp_target = 0; -static int _stp_exit_called = 0; static int _stp_exit_flag = 0; #include "control.h" #ifdef STP_OLD_TRANSPORT @@ -89,13 +88,14 @@ static void _stp_handle_start(struct _stp_msg_start *st) /* when someone does /sbin/rmmod on a loaded systemtap module. */ static void _stp_cleanup_and_exit(int send_exit) { - if (!_stp_exit_called) { + static int called = 0; + if (!called) { int failures; dbug_trans(1, "cleanup_and_exit (%d)\n", send_exit); _stp_exit_flag = 1; /* we only want to do this stuff once */ - _stp_exit_called = 1; + called = 1; if (_stp_probes_started) { dbug_trans(1, "calling probe_exit\n"); @@ -119,6 +119,18 @@ static void _stp_cleanup_and_exit(int send_exit) } } +static void _stp_request_exit(void) +{ + static int called = 0; + if (!called) { + /* we only want to do this once */ + called = 1; + dbug_trans(1, "ctl_send STP_REQUEST_EXIT\n"); + _stp_ctl_send(STP_REQUEST_EXIT, NULL, 0); + dbug_trans(1, "done with ctl_send STP_REQUEST_EXIT\n"); + } +} + /* * Called when stapio closes the control channel. */ @@ -169,7 +181,7 @@ static void _stp_work_queue(void *data) /* if exit flag is set AND we have finished with probe_start() */ if (unlikely(_stp_exit_flag && _stp_probes_started)) - _stp_cleanup_and_exit(1); + _stp_request_exit(); if (likely(_stp_attached)) queue_delayed_work(_stp_wq, &_stp_work, STP_WORK_TIMER); } @@ -188,7 +200,6 @@ static void _stp_transport_close() _stp_unregister_ctl_channel(); if (_stp_utt) utt_trace_remove(_stp_utt); - _stp_kill_time(); /* Go to a beach. Drink a beer. */ _stp_print_cleanup(); /* free print buffers */ _stp_mem_debug_done(); dbug_trans(1, "---- CLOSED ----\n"); @@ -244,10 +255,6 @@ static int _stp_transport_init(void) dbug_trans(1, "Using %d subbufs of size %d\n", _stp_nsubbufs, _stp_subbuf_size); } - /* initialize timer code */ - if (_stp_init_time()) - return -1; - #if !defined (STP_OLD_TRANSPORT) || defined (STP_BULKMODE) /* open utt (relayfs) channel to send data to userspace */ _stp_utt = _stp_utt_open(); @@ -286,7 +293,6 @@ err1: if (_stp_utt) utt_trace_remove(_stp_utt); err0: - _stp_kill_time(); return -1; } diff --git a/runtime/transport/transport_msgs.h b/runtime/transport/transport_msgs.h index 596f4925..0d9a5983 100644 --- a/runtime/transport/transport_msgs.h +++ b/runtime/transport/transport_msgs.h @@ -21,19 +21,20 @@ struct _stp_trace { enum { STP_START, - STP_EXIT, + STP_EXIT, STP_OOB_DATA, STP_SYSTEM, STP_TRANSPORT, STP_CONNECT, - STP_DISCONNECT, + STP_DISCONNECT, STP_BULK, STP_READY, - STP_RELOCATION, + STP_RELOCATION, /** deprecated STP_OLD_TRANSPORT **/ STP_BUF_INFO, STP_SUBBUFS_CONSUMED, STP_REALTIME_DATA, + STP_REQUEST_EXIT, STP_MAX_CMD }; @@ -52,6 +53,7 @@ static const char *_stp_command_name[] = { "STP_BUF_INFO", "STP_SUBBUFS_CONSUMED", "STP_REALTIME_DATA", + "STP_REQUEST_EXIT", }; #endif /* DEBUG_TRANS */ @@ -37,6 +37,7 @@ struct task_finder_derived_probe_group; struct timer_derived_probe_group; struct profile_derived_probe_group; struct mark_derived_probe_group; +struct tracepoint_derived_probe_group; struct hrtimer_derived_probe_group; struct perfmon_derived_probe_group; struct procfs_derived_probe_group; @@ -122,6 +123,9 @@ struct systemtap_session bool ignore_vmlinux; bool ignore_dwarf; + // Skip bad $ vars + bool skip_badvars; + // temporary directory for module builds etc. // hazardous - it is "rm -rf"'d at exit std::string tmpdir; @@ -162,9 +166,12 @@ struct systemtap_session timer_derived_probe_group* timer_derived_probes; profile_derived_probe_group* profile_derived_probes; mark_derived_probe_group* mark_derived_probes; + tracepoint_derived_probe_group* tracepoint_derived_probes; hrtimer_derived_probe_group* hrtimer_derived_probes; perfmon_derived_probe_group* perfmon_derived_probes; procfs_derived_probe_group* procfs_derived_probes; + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (elaborate.cxx). // unparser data translator_output* op; diff --git a/stap-client b/stap-client index e2d95ada..70271b9a 100755 --- a/stap-client +++ b/stap-client @@ -1020,7 +1020,7 @@ function terminate { kill -s SIGTERM '%?staprun' 2>/dev/null # Kill any stap-client-connect job - kill -s SIGTERM '%${exec_prefix}stap-client-connect' + kill -s SIGTERM '%${exec_prefix}stap-client-connect' 2>/dev/null exit 1 } @@ -1037,7 +1037,7 @@ function interrupt { # Kill any stap-client-connect job # SIGINT won't do it. - kill -s SIGTERM '%${exec_prefix}stap-client-connect' + kill -s SIGTERM '%${exec_prefix}stap-client-connect' 2>/dev/null # If staprun was not running, then exit. cleanup diff --git a/stap-find-servers b/stap-find-servers index 3038c54e..fde7d9ef 100755 --- a/stap-find-servers +++ b/stap-find-servers @@ -2,7 +2,7 @@ # Find compile servers for systemtap # -# Copyright (C) 2008 Red Hat Inc. +# Copyright (C) 2008, 2009 Red Hat Inc. # # This file is part of systemtap, and is free software. You can # redistribute it and/or modify it under the terms of the GNU General @@ -18,6 +18,7 @@ # function: configuration function configuration { avahi_service_tag=_stap._tcp + timeout=10 # seconds } # function: initialization @@ -30,13 +31,32 @@ function initialization { fi } -# function: find_and_connect_to_server +# function: find_servers # -# Find and establish connection with a compatibale stap server. +# Find and establish connection with a compatible stap server. function find_servers { - # Find a server - avahi-browse $avahi_service_tag --terminate -r 2>/dev/null | match_server - rc=$? + # Create a temp file for the list of servers. We do this instead + # of using a pipe so that we can kill avahi-browse if it + # takes more than a minute. + tmpfile=`mktemp -t stap-serversXXXXXX` || \ + fatal "Cannot create temporary file " $tmpfile + + # Find servers + avahi-browse $avahi_service_tag --terminate -r 2>/dev/null > $tmpfile & + + for ((attempt=0; $attempt < $timeout; ++attempt)) + do + if ! jobs '%avahi-browse' >/dev/null 2>&1; then + break + fi + sleep 1 + done + + # Kill avahi-browse, if it's still running + test $attempt = $timeout && kill -s SIGTERM '%avahi-browse' 2>/dev/null + + match_server < $tmpfile + rm -fr $tmpfile } # function: match_server @@ -47,10 +67,11 @@ function match_server { local server_name local server_sysinfo local server_port - local rc=1 # not found yet + + rc=1 # not found yet # Loop over the avahi service descriptors. - read || exit $rc + read -t $timeout || return while test "X$REPLY" != "X" do server_name= @@ -61,14 +82,14 @@ function match_server { # Examine the next service descriptor # Is it a stap server? if ! echo $REPLY | grep -q "=.* .* IPv4 .*_stap"; then - read || exit $rc + read -t $timeout || return continue fi REPLY= # Get the details of the service local service_tag equal service_data - while read service_tag equal service_data + while read -t $timeout service_tag equal service_data do case $service_tag in hostname ) @@ -113,8 +134,6 @@ function match_server { echo "$server_name $server_ip $server_port '$server_sysinfo'" rc=0 done - - exit $rc } # function client_sysinfo @@ -128,6 +147,15 @@ function client_sysinfo { echo sysinfo=$sysinfo_client } +# function: fatal [ MESSAGE ] +# +# Fatal error +# Prints its arguments to stderr and exits +function fatal { + echo "$0: ERROR:" "$@" >&2 + exit 1 +} + #----------------------------------------------------------------------------- # Beginning of main line execution. #----------------------------------------------------------------------------- diff --git a/stap-report b/stap-report index 8551dc74..944609cf 100755 --- a/stap-report +++ b/stap-report @@ -1,26 +1,21 @@ -#!/usr/bin/python +#! /bin/sh -import sys -import time -import subprocess +run(){ + echo "== $1 ==" + sh -c "$@" +} -ofile = sys.stdout - -def run(command): - ofile.write("== " + command + " ==\n") - ofile.flush() - p = subprocess.Popen(command, shell=True, stdout=ofile, stderr=ofile) - p.wait() - ofile.write("\n") - -if __name__ == "__main__": - run("stap -V") - run("which stap") - run("ls -ald `locate -r '/stap$'` `locate -r '/staprun$'`") - run("printenv | egrep '^PATH=|^LD_LIBRARY_PATH=|^SYSTEMTAP_.*='") - run("gcc -v") - run("uname -a") - run("dmesg | egrep 'stap|systemtap' | tail -n 10") - run("cat /proc/cpuinfo | egrep 'processor|vendor_id|model name'") - run(r"rpm -qa --qf %{name}-%{version}-%{release}.%{arch}\\n | egrep 'systemtap|elfutils|kernel|gcc' | sort") - run(r"egrep 'PROBE|TRACE|MARKER|_DEBUG_' /lib/modules/`uname -r`/build/.config | grep -v not.set | sort | fmt -w 80") +run "stap -V" +run "which stap" +run "locate --regex '/stap(run)?$' | xargs ls -ald" +run "printenv | egrep '^PATH=|^LD_LIBRARY_PATH=|^SYSTEMTAP_.*='" +run "gcc -v" +run "uname -a" +run "dmesg | egrep 'stap|systemtap' | tail -n 10" +run "cat /proc/cpuinfo | egrep 'processor|vendor_id|model name'" +if [ -x /usr/bin/dpkg ]; then + run "dpkg --list | egrep 'systemtap|elfutils|kernel|gcc' | awk '{print \$2,\$3}' | sort" +else + run "rpm -qa --qf '%{name}-%{version} %{release}.%{arch}\\n' | egrep 'systemtap|elfutils|kernel|gcc' | sort" +fi +run "egrep 'PROBE|TRACE|MARKER|_DEBUG_' /lib/modules/`uname -r`/build/.config | grep -v not.set | sort | fmt -w 80" diff --git a/stap-start-server b/stap-start-server index f1f02d2f..d718ed30 100755 --- a/stap-start-server +++ b/stap-start-server @@ -25,17 +25,20 @@ server_pid=$! # Make sure the server is started for ((attempt=0; $attempt < 10; ++attempt)) do - if test $EUID = 0; then - if ! test -f $sysconfdir/systemtap/ssl/server/stap-server.cert; then - sleep 1 - continue; - fi - elif ! test -f $HOME/.systemtap/ssl/server/stap-server.cert; then + # Has the server started? + if ! (ps -a | grep $server_pid) >/dev/null 2>&1; then sleep 1 continue fi - (ps -a | grep $server_pid) >/dev/null 2>&1 && echo $server_pid && exit 0 - sleep 1 + # Is avahi advertizing the server? + if ! (ps -fa | grep avahi-publish-service | grep $server_pid) > /dev/null 2>&1; then + sleep 1 + continue + fi + + # The server is ready + echo $server_pid + exit 0 done exit 1 # server did not start @@ -230,6 +230,9 @@ nor the kernel debugging information can be found. .TP .B \-\-ignore\-dwarf For testing, act as though vmlinux and modules lack debugging information. +.TP +.B \-\-skip\-badvars +Ignore out of context variables and substitute with literal 0. .SH ARGUMENTS @@ -1039,10 +1042,10 @@ Maximum number of soft errors before an exit is triggered, default 0, which means that the first error will exit the script. .TP MAXSKIPPED -.TP Maximum number of skipped probes before an exit is triggered, default 100. Running systemtap with \-t (timing) mode gives more details about skipped probes. +.TP MINSTACKSPACE Minimum number of free kernel stack bytes required in order to run a probe handler, default 1024. This number should be large enough @@ -1053,8 +1056,20 @@ Maximum number of concurrently armed user-space probes (uprobes), default 100 times the number of user-space probe points named in the script. This pool is large because individual uprobe objects are allocated for each process for each script-level probe. + .PP -Multipule scripts can write data into a relay buffer concurrently. A host +With scripts that contain probes on any interrupt path, it is possible that +those interrupts may occur in the middle of another probe handler. The probe +in the interrupt handler would be skipped in this case to avoid reentrance. +To work around this issue, execute stap with the option +.BR \-DINTERRUPTIBLE=0 +to mask interrupts throughout the probe handler. This does add some extra +overhead to the probes, but it may prevent reentrance for common problem +cases. However, probes in NMI handlers and in the callpath of the stap +runtime may still be skipped due to reentrance. + +.PP +Multiple scripts can write data into a relay buffer concurrently. A host script provides an interface for accessing its relay buffer to guest scripts. Then, the output of the guests are merged into the output of the host. To run a script as a host, execute stap with @@ -1096,16 +1111,16 @@ using symbols read from vmlinux and/or the modules in /lib/modules. Systemtap can also read the kernel symbol table from a text file such as /boot/System.map or /proc/kallsyms. See the -.B \-\--kelf +.B \-\-kelf and -.B \-\--kmap +.B \-\-kmap options. .PP If systemtap finds relevant debugging information, it will use it even if you specify -.B \-\--kelf +.B \-\-kelf or -.BR \-\--kmap . +.BR \-\-kmap . .PP Without debugging information, systemtap cannot support the following types of language constructs: diff --git a/stapprobes.5.in b/stapprobes.5.in index 0854be53..70d045c4 100644 --- a/stapprobes.5.in +++ b/stapprobes.5.in @@ -548,6 +548,42 @@ The marker format string associated with a marker is available in And also the marker name string is avalable in .BR $name . +.SS TRACEPOINTS + +This family of probe points hooks up to static probing tracepoints +inserted into the kernel or modules. As with markers, these +tracepoints are special macro calls inserted by kernel developers to +make probing faster and more reliable than with DWARF-based probes, +and DWARF debugging information is not required to probe tracepoints. +Tracepoints have an extra advantage of more strongly-typed parameters +than markers. + +Tracepoint probes begin with +.BR kernel . +The next part names the tracepoint itself: +.BR trace("name") . +The tracepoint name string, which may contain the usual wildcard +characters, is matched against the names defined by the kernel +developers in the tracepoint header files. + +The handler associated with a tracepoint-based probe may read the +optional parameters specified at the macro call site. These are +named according to the declaration by the tracepoint author. For +example, the tracepoint probe +.BR kernel.trace("sched_switch") +provides the parameters +.BR $rq ", " $prev ", and " $next . +If the parameter is a complex type, as in a struct pointer, then a +script can access fields with the same syntax as DWARF $target +variables. Also, tracepoint parameters cannot be modified, but in +guru-mode a script may modify fields of parameters. + +The name of the tracepoint is available in +.BR $$name , +and a string of name=value pairs for all parameters of the tracepoint +is available in +.BR $$vars " or " $$parms . + .SS PERFORMANCE MONITORING HARDWARE The perfmon family of probe points is used to access the performance diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 42b2abf8..d2e43903 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1790,6 +1790,7 @@ function _struct_sigaction_u:string(uaddr:long) function _struct_sigaction32_u:string(uaddr:long) %{ /* pure */ +#ifdef CONFIG_COMPAT #include <linux/compat.h> // There seems to be no public cross arch header that defines this. @@ -1831,4 +1832,5 @@ function _struct_sigaction32_u:string(uaddr:long) else strlcpy (THIS->__retvalue, "UNKNOWN", MAXSTRINGLEN); } +#endif %} diff --git a/tapset/context-symbols.stp b/tapset/context-symbols.stp index bd9a93b9..4c200aa8 100644 --- a/tapset/context-symbols.stp +++ b/tapset/context-symbols.stp @@ -6,20 +6,25 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// Context functions provide additional information about where an event occurred. These functions can +//provide information such as a backtrace to where the event occured and the current register values for the +//processor. +// </tapsetdescription> %{ #ifndef STP_NEED_SYMBOL_DATA #define STP_NEED_SYMBOL_DATA 1 #endif %} - +// weirdness with print_stack, argument appears in build as undescribed /** - * sfunction print_stack - Print out stack from string + * sfunction print_stack - Print out stack from string. * @stk: String with list of hexidecimal addresses. (FIXME) * * Perform a symbolic lookup of the addresses in the given string, - * which is assumed to be the result of a prior call to - * backtrace(). + * which is assumed to be the result of a prior call to + * <command>backtrace()</command>. + * * Print one line per address, including the address, the * name of the function containing the address, and an estimate of * its position within that function. Return nothing. @@ -36,9 +41,7 @@ function print_stack(stk:string) %{ %} /** - * sfunction probefunc - Function probed - * - * Return the probe point's function name, if known. + * sfunction probefunc - Return the probe point's function name, if known. */ function probefunc:string () %{ /* pure */ char *ptr, *start; @@ -72,9 +75,7 @@ function probefunc:string () %{ /* pure */ %} /** - * sfunction probemod - Module probed - * - * Return the probe point's module name, if known. + * sfunction probemod - Return the probe point's module name, if known. */ function probemod:string () %{ /* pure */ char *ptr, *start; diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp index 7c96b7e2..a976f8b6 100644 --- a/tapset/context-unwind.stp +++ b/tapset/context-unwind.stp @@ -6,7 +6,11 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// Context functions provide additional information about where an event occurred. These functions can +//provide information such as a backtrace to where the event occured and the current register values for the +//processor. +// </tapsetdescription> %{ #ifndef STP_NEED_UNWIND_DATA #define STP_NEED_UNWIND_DATA 1 @@ -19,7 +23,7 @@ /** * sfunction print_backtrace - Print stack back trace * - * Equivalent to <command>print_stack(backtrace())</command>, + * Equivalent to <command>print_stack(backtrace())</command>, * except that deeper stack nesting may be supported. Return nothing. */ function print_backtrace () %{ @@ -33,8 +37,8 @@ function print_backtrace () %{ /** * sfunction backtrace - Hex backtrace of current stack * - * Return a string of hex addresses that are a backtrace of the - * stack. It may be truncated due to maximum string length. + * Return a string of hex addresses that are a backtrace of the + * stack. Output may be truncated as per maximum string length. */ function backtrace:string () %{ /* pure */ if (CONTEXT->regs) @@ -46,7 +50,7 @@ function backtrace:string () %{ /* pure */ /** * sfunction caller - Return name and address of calling function * - * Return the address and name of the calling function. + * Return the address and name of the calling function. * <emphasis>Works only for return probes at this time.</emphasis> */ function caller:string() %{ /* pure */ @@ -61,7 +65,7 @@ function caller:string() %{ /* pure */ /** * sfunction caller_addr - Return caller address * - * Return the address of the calling function. + * Return the address of the calling function. * <emphasis> Works only for return probes at this time.</emphasis> */ function caller_addr:long () %{ /* pure */ diff --git a/tapset/context.stp b/tapset/context.stp index 7fd961c8..9f4be0e6 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -6,7 +6,11 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// Context functions provide additional information about where an event occurred. These functions can +//provide information such as a backtrace to where the event occured and the current register values for the +//processor. +// </tapsetdescription> /** * sfunction print_regs - Print a register dump. */ @@ -17,37 +21,28 @@ function print_regs () %{ %} /** - * sfunction execname - Execname of current processes - * - * Return the name of the current process. + * sfunction execname - Returns the execname of a target process (or group of processes). */ function execname:string () %{ /* pure */ strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN); %} /** - * sfunction pid - Process ID of current process - * - * - * Return the id of the current process. + * sfunction pid - Returns the ID of a target process. */ function pid:long () %{ /* pure */ THIS->__retvalue = current->tgid; %} /** - * sfunction tid - Thread ID of current process - * - * Return the id of the current thread. + * sfunction tid - Returns the thread ID of a target process. */ function tid:long () %{ /* pure */ THIS->__retvalue = current->pid; %} /** - * sfunction ppid - Parent Process ID of current process - * - * Return the id of the parent process. + * sfunction ppid - Returns the process ID of a target process's parent process. */ function ppid:long () %{ /* pure */ #if defined(STAPCONF_REAL_PARENT) @@ -58,9 +53,7 @@ function ppid:long () %{ /* pure */ %} /** - * sfunction pexecname - Execname of the parent process. - * - * Return the name of the parent process. + * sfunction pexecname - Returns the execname of a target process's parent process. */ function pexecname:string () %{ /* pure */ #if defined(STAPCONF_REAL_PARENT) @@ -71,9 +64,7 @@ function pexecname:string () %{ /* pure */ %} /** - * sfunction gid - Group ID of current process - * - * Return the gid of the current process. + * sfunction gid - Returns the group ID of a target process. */ function gid:long () %{ /* pure */ #ifdef STAPCONF_TASK_UID @@ -84,9 +75,7 @@ function gid:long () %{ /* pure */ %} /** - * sfunction egid - Effective gid of the current process. - * - * Return the effective gid of the current process. + * sfunction egid - Returns the effective gid of a target process. */ function egid:long () %{ /* pure */ #ifdef STAPCONF_TASK_UID @@ -97,9 +86,7 @@ function egid:long () %{ /* pure */ %} /** - * sfunction uid -User ID of the current process. - * - * Return the uid of the current process. + * sfunction uid - Returns the user ID of a target process. */ function uid:long () %{ /* pure */ #ifdef STAPCONF_TASK_UID @@ -110,9 +97,7 @@ function uid:long () %{ /* pure */ %} /** - * sfunction euid - Effective User ID of the current process. - * - * Return the effective uid of the current process. + * sfunction euid - Return the effective uid of a target process. */ function euid:long () %{ /* pure */ #ifdef STAPCONF_TASK_UID @@ -128,26 +113,24 @@ function cpuid:long () %{ /* pure */ %} /** - * sfunction cpu - The current cpu number. - * - * Return the current cpu number. + * sfunction cpu - Returns the current cpu number. */ function cpu:long () %{ /* pure */ THIS->__retvalue = smp_processor_id(); %} /** - * sfunction pp - Current probe point - * - * Return the probe point associated with the currently running - * probe handler, including alias and wildcard expansion effects. + * sfunction pp - Return the probe point associated with the currently running probe handler, + * including alias and wildcard expansion effects + * Context: + * The current probe point. */ function pp:string () %{ /* pure */ strlcpy (THIS->__retvalue, CONTEXT->probe_point, MAXSTRINGLEN); %} /** - * sfunction registers_valid - Register information valid + * sfunction registers_valid - Determines validity of <command>register()</command> and <command>u_register()</command> in current context. * * Return 1 if register() and u_register() can be used * in the current context, or 0 otherwise. @@ -159,7 +142,7 @@ function registers_valid:long () %{ /* pure */ %} /** - * sfunction user_mode - User Mode + * sfunction user_mode - Determines if probe point occurs in user-mode. * * Return 1 if the probe point occurred in user-mode. */ @@ -176,7 +159,7 @@ function user_mode:long () %{ /* pure */ /* currently a user-mode address? */ %} /** - * sfunction is_return - Is return probe + * sfunction is_return - Determines if probe point is a return probe. * * Return 1 if the probe point is a return probe. * <emphasis>Deprecated.</emphasis> @@ -189,9 +172,7 @@ function is_return:long () %{ /* pure */ %} /** - * sfunction target - Target pid - * - * Return the pid of the target process. + * sfunction target - Return the process ID of the target process. */ function target:long () %{ /* pure */ THIS->__retvalue = _stp_target; @@ -220,18 +201,16 @@ function stp_pid:long () %{ /* pure */ %} /** - * sfunction stack_size - Size of kernel stack - * - * Return the size of the kernel stack. + * sfunction stack_size - Return the size of the kernel stack. */ function stack_size:long () %{ /* pure */ THIS->__retvalue = THREAD_SIZE; %} /** - * sfunction stack_used - Current amount of kernel stack used + * sfunction stack_used - Returns the amount of kernel stack used. * - * Return how many bytes are currently used in the kernel stack. + * Determines how many bytes are currently used in the kernel stack. */ function stack_used:long () %{ /* pure */ char a; @@ -239,9 +218,9 @@ function stack_used:long () %{ /* pure */ %} /** - * sfunction stack_unused - Amount of kernel stack currently available + * sfunction stack_unused - Returns the amount of kernel stack currently available. * - * Return how many bytes are currently available in the kernel stack. + * Determines how many bytes are currently available in the kernel stack. */ function stack_unused:long () %{ /* pure */ char a; diff --git a/tapset/i686/registers.stp b/tapset/i686/registers.stp index b9eaba5b..a6e5694e 100644 --- a/tapset/i686/registers.stp +++ b/tapset/i686/registers.stp @@ -26,6 +26,16 @@ function _stp_register_regs() { function _stp_get_register_by_offset:long (offset:long) %{ /* pure */ long value; + if (!CONTEXT->regs) { + CONTEXT->last_error = "No registers available in this context"; + return; + } + if (THIS->offset < 0 || THIS->offset > sizeof(struct pt_regs) - sizeof(long)) { + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), + "Bad register offset: %lld", THIS->offset); + CONTEXT->last_error = CONTEXT->error_buffer; + return; + } memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value)); THIS->__retvalue = value; %} diff --git a/tapset/inet_sock.stp b/tapset/inet_sock.stp index 59ce7fea..33de9775 100644 --- a/tapset/inet_sock.stp +++ b/tapset/inet_sock.stp @@ -1,42 +1,42 @@ // inet_sock information tapset // Copyright (C) 2006 IBM Corp. // Copyright (C) 2006 Intel Corporation. +// Copyright (C) 2009 Red Hat, Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. -%{ -#include <linux/version.h> -#include <net/sock.h> -#include <net/tcp.h> -#include <net/ip.h> - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) -#define LPORT (inet->inet.num) -#define DADDR (&inet->inet.daddr) -#else -#define LPORT (inet->num) -#define DADDR (&inet->daddr) -#endif -%} - -// Get local port number +// Get local port number given a pointer to a kernel socket, +// as for example kernel.function("tcp_accept").return will +// return. function inet_get_local_port:long(sock:long) -%{ /* pure */ - struct inet_sock *inet = (struct inet_sock *) (long) THIS->sock; - THIS->__retvalue = kread(&(LPORT)); - CATCH_DEREF_FAULT(); -%} +{ +%(kernel_v < "2.6.11" %? + port = @cast(sock, "inet_sock", "kernel")->inet->num; +%: + port = @cast(sock, "inet_sock", "kernel")->num; +%) + return port; +} -// Get IP source address string +// Get IP source address string given a pointer to a kernel socket. function inet_get_ip_source:string(sock:long) +{ +%(kernel_v < "2.6.11" %? + daddr = @cast(sock, "inet_sock", "kernel")->inet->daddr; +%: + daddr = @cast(sock, "inet_sock", "kernel")->daddr; +%) + return daddr_to_string(daddr); +} + +// Turns a daddr as found in an inet_sock into a dotted ip string. +function daddr_to_string:string(daddr:long) %{ /* pure */ - struct inet_sock *inet = (struct inet_sock *) (long) THIS->sock; union { __u32 d; unsigned char addr[4]; } u; - u.d = kread(DADDR); + u.d = THIS->daddr; sprintf(THIS->__retvalue, "%d.%d.%d.%d", u.addr[0], u.addr[1], u.addr[2], u.addr[3]); - CATCH_DEREF_FAULT(); %} diff --git a/tapset/ioscheduler.stp b/tapset/ioscheduler.stp index d7a71aca..a79ae752 100644 --- a/tapset/ioscheduler.stp +++ b/tapset/ioscheduler.stp @@ -5,15 +5,17 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// This family of probe points is used to probe IO scheduler activities. +// </tapsetdescription> %{ #include <linux/blkdev.h> #include <linux/elevator.h> %} /** - * probe ioscheduler.elv_next_request - Retrieve request from request queue - * @elevator_name: The elevator name + * probe ioscheduler.elv_next_request - Fires when a request is retrieved from the request queue + * @elevator_name: The type of I/O elevator currently enabled */ probe ioscheduler.elv_next_request = kernel.function("elv_next_request") @@ -26,7 +28,7 @@ probe ioscheduler.elv_next_request } /** - * probe ioscheduler.elv_next_request.return - Return from retrieving a request + * probe ioscheduler.elv_next_request.return - Fires when a request retrieval issues a return signal * @req: Address of the request * @req_flags: Request flags * @disk_major: Disk major number of the request @@ -58,14 +60,14 @@ probe ioscheduler.elv_next_request.return } /** - * probe ioscheduler.elv_add_request - Add a request into request queue - * @elevator_name: The elevator name + * probe ioscheduler.elv_add_request - A request was added to the request queue + * @elevator_name: The type of I/O elevator currently enabled * @req: Address of the request * @req_flags: Request flags * @disk_major: Disk major number of the request * @disk_minor: Disk minor number of the request */ -/* when a request is added to the request queue */ +// when a request is added to the request queue probe ioscheduler.elv_add_request = kernel.function("__elv_add_request") { @@ -96,8 +98,8 @@ probe ioscheduler.elv_add_request } /** - * probe ioscheduler.elv_completed_request - Request is completed - * @elevator_name: The elevator name + * probe ioscheduler.elv_completed_request - Fires when a request is completed + * @elevator_name: The type of I/O elevator currently enabled * @req: Address of the request * @req_flags: Request flags * @disk_major: Disk major number of the request diff --git a/tapset/memory.stp b/tapset/memory.stp index 961cca38..83875aa4 100644 --- a/tapset/memory.stp +++ b/tapset/memory.stp @@ -6,6 +6,9 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. +// <tapsetdescription> +// This family of probe points is used to probe memory-related events. +// </tapsetdescription> %{ #include <linux/mm.h> %} @@ -53,7 +56,7 @@ function vm_fault_contains:long (value:long, test:long) /** * probe vm.pagefault - Records that a page fault occurred. * @address: The address of the faulting memory access; i.e. the address that caused the page fault. - * @write_access: Indicates whether this was a write or read access; <command>1</command> indicates a write, + * @write_access: Indicates whether this was a write or read access; <command>1</command> indicates a write, * while <command>0</command> indicates a read. * * Context: The process which triggered the fault @@ -97,7 +100,7 @@ function addr_to_node:long(addr:long) %{ /* pure */ } %} -/* Return whether a page to be copied is a zero page. */ +// Return whether a page to be copied is a zero page. function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */ THIS->__retvalue = (THIS->from == (long) ZERO_PAGE(THIS->vaddr)); %} @@ -110,8 +113,8 @@ function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */ * Context: * The context is the process attempting the write. * - * Fires when a process attempts to write to a shared page. - * If a copy is necessary, this will be followed by a + * Fires when a process attempts to write to a shared page. + * If a copy is necessary, this will be followed by a * <command>vm.write_shared_copy</command>. */ probe vm.write_shared = kernel.function("do_wp_page") { @@ -119,7 +122,7 @@ probe vm.write_shared = kernel.function("do_wp_page") { } /** - * probe vm.write_shared_copy- Page copy for shared page write. + * probe vm.write_shared_copy - Page copy for shared page write. * @address: The address of the shared write. * @zero: Boolean indicating whether it is a zero page * (can do a clear instead of a copy). diff --git a/tapset/networking.stp b/tapset/networking.stp index d6e90259..f6d78536 100644 --- a/tapset/networking.stp +++ b/tapset/networking.stp @@ -5,11 +5,9 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - -%{ -#include <linux/netdevice.h> -%} - +// <tapsetdescription> +// This family of probe points is used to probe the activities of the network device. +// </tapsetdescription> /** * probe netdev.receive - Data recieved from network device. * @dev_name: The name of the device. e.g: eth0, ath1. @@ -53,7 +51,7 @@ /// /// </variablelist> ///</para> -/* Main device receive routine, be called when packet arrives on network device */ +// Main device receive routine, be called when packet arrives on network device probe netdev.receive = kernel.function("netif_receive_skb") { @@ -71,7 +69,7 @@ probe netdev.receive * @truesize: The size of the the data to be transmitted. * */ -/* Queue a buffer for transmission to a network device */ +// Queue a buffer for transmission to a network device probe netdev.transmit = kernel.function("dev_queue_xmit") { diff --git a/tapset/nfs.stp b/tapset/nfs.stp index 474b091f..6752747f 100644 --- a/tapset/nfs.stp +++ b/tapset/nfs.stp @@ -135,69 +135,50 @@ function __nfs_wpages:long(inode:long) %{ /* pure */ %} /*Get struct inode from struct page*/ -function __p2i :long(page:long) %{ /* pure */ - struct page *page = (struct page *)((long)THIS->page); - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - - if (mapping == NULL) - THIS->__retvalue = 0; - else - THIS->__retvalue = (long)kread(&(mapping->host)); - CATCH_DEREF_FAULT(); -%} +function __p2i :long(page:long) +{ + mapping = page? @cast(page, "page", "kernel:nfs")->mapping : 0 + if (mapping == 0) + return 0 + return @cast(mapping, "address_space", "kernel:nfs")->host +} /*Get i_flags from struct page*/ -function __p2i_flag : long (page:long) %{ /* pure */ - struct page *page = (struct page *)((long)THIS->page); - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - struct inode *host = mapping? kread(&(mapping->host)) : NULL; - - if (host == NULL) - THIS->__retvalue = -1; - else - THIS->__retvalue = kread(&(host->i_flags)); - CATCH_DEREF_FAULT(); -%} +function __p2i_flag : long (page:long) +{ + host = __p2i(page) + if (host == 0) + return -1 + return @cast(host, "inode", "kernel:nfs")->i_flags +} /*Get i_state from struct page*/ -function __p2i_state :long (page:long) %{ /* pure */ - struct page *page = (struct page *)((long)THIS->page); - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - struct inode *host = mapping? kread(&(mapping->host)) : NULL; - - if (host == NULL) - THIS->__retvalue = -1; - else - THIS->__retvalue = kread(&(host->i_state)); - CATCH_DEREF_FAULT(); -%} +function __p2i_state :long (page:long) +{ + host = __p2i(page) + if (host == 0) + return -1 + return @cast(host, "inode", "kernel:nfs")->i_state +} /*Get i_size from struct page*/ -function __p2i_size :long (page:long) %{ /* pure */ - struct page *page = (struct page *)((long)THIS->page); - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - struct inode *host = mapping? kread(&(mapping->host)) : NULL; - - if (host == NULL) - THIS->__retvalue = -1; - else - THIS->__retvalue = kread(&(host->i_size)); - CATCH_DEREF_FAULT(); -%} +function __p2i_size :long (page:long) +{ + host = __p2i(page) + if (host == 0) + return -1 + return @cast(host, "inode", "kernel:nfs")->i_size +} /*Get s_flags from struct page*/ -function __p2sb_flag:long (page:long) %{ /* pure */ - struct page *page = (struct page *)((long)THIS->page); - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - struct inode *host = mapping? kread(&(mapping->host)) : NULL; - struct super_block *i_sb = host? kread(&(host->i_sb)) : NULL; - - if (i_sb == NULL) - THIS->__retvalue = -1; - else - THIS->__retvalue = kread(&(i_sb->s_flags)); - CATCH_DEREF_FAULT(); -%} +function __p2sb_flag:long (page:long) +{ + host = __p2i(page) + i_sb = host? @cast(host, "inode", "kernel:nfs")->i_sb : 0 + if (i_sb == 0) + return -1 + return @cast(i_sb, "super_block", "kernel:nfs")->s_flags +} function __d_loff_t :long (ppos :long) %{ /* pure */ loff_t * ppos = (loff_t *) ((long)THIS->ppos); @@ -209,53 +190,47 @@ function __d_loff_t :long (ppos :long) %{ /* pure */ CATCH_DEREF_FAULT(); %} -function __file_inode:long (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - if (dentry == NULL) - THIS->__retvalue = 0; - else - THIS->__retvalue = (long)kread(&(dentry->d_inode)); - CATCH_DEREF_FAULT(); -%} +function __file_inode:long (file:long) +{ +%( kernel_v >= "2.6.20" %? + dentry = file? @cast(file, "file", "kernel:nfs")->f_path->dentry : 0 +%: + dentry = file? @cast(file, "file", "kernel:nfs")->f_dentry : 0 +%) + if (dentry == 0) + return 0 + return @cast(dentry, "dentry", "kernel:nfs")->d_inode +} -function __file_id:long (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - if (dentry == NULL) - THIS->__retvalue = 0; - else { - struct inode *d_inode = kread(&(dentry->d_inode)); - struct super_block *i_sb = kread(&(d_inode->i_sb)); - THIS->__retvalue = (long)&(i_sb->s_id); - } - CATCH_DEREF_FAULT(); -%} +function __file_id:long (file:long) +{ + d_inode = __file_inode(file) + if (d_inode == 0) + return 0 + return @cast(d_inode, "inode", "kernel:nfs")->i_sb->s_id +} -function __file_mode:long (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - if (dentry == NULL) - THIS->__retvalue = 0; - else { - struct inode *d_inode = kread(&(dentry->d_inode)); - THIS->__retvalue = kread(&(d_inode->i_mode)); - } - CATCH_DEREF_FAULT(); -%} +function __file_mode:long (file:long) +{ + d_inode = __file_inode(file) + if (d_inode == 0) + return 0 + return @cast(d_inode, "inode", "kernel:nfs")->i_mode +} -function __file_parentname:string (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - struct dentry *d_parent = dentry? kread(&(dentry->d_parent)) : NULL; - if (d_parent == NULL) - strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN); - else { - const unsigned char *name = kread(&(d_parent->d_name.name)); - deref_string(THIS->__retvalue, name, MAXSTRINGLEN); - } - CATCH_DEREF_FAULT(); -%} +function __file_parentname:string (file:long) +{ +%( kernel_v >= "2.6.20" %? + dentry = file? @cast(file, "file", "kernel:nfs")->f_path->dentry : 0 +%: + dentry = file? @cast(file, "file", "kernel:nfs")->f_dentry : 0 +%) + d_parent = dentry? @cast(dentry, "dentry", "kernel:nfs")->d_parent : 0 + if (d_parent == 0) + return "NULL" + name = @cast(d_parent, "dentry", "kernel:nfs")->d_name->name + return kernel_string(name) +} /* * Combination of generic_segment_checks and iov_length functions @@ -349,8 +324,8 @@ probe nfs.fop.llseek = kernel.function ("nfs_file_llseek") !, { dev = __file_dev($filp) ino = __file_ino($filp) - s_id = __file_id($filp) - devname = kernel_string(s_id) + s_id = __file_id($filp) + devname = kernel_string(s_id) maxbyte = __file_maxbytes($filp) offset = $offset diff --git a/tapset/ppc64/registers.stp b/tapset/ppc64/registers.stp index 6a8ae279..e5decd81 100644 --- a/tapset/ppc64/registers.stp +++ b/tapset/ppc64/registers.stp @@ -64,6 +64,16 @@ function probing_32bit_app() %{ /* pure */ function _stp_get_register_by_offset:long (offset:long) %{ /* pure */ long value; + if (!CONTEXT->regs) { + CONTEXT->last_error = "No registers available in this context"; + return; + } + if (THIS->offset < 0 || THIS->offset > sizeof(struct pt_regs) - sizeof(long)) { + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), + "Bad register offset: %lld", THIS->offset); + CONTEXT->last_error = CONTEXT->error_buffer; + return; + } memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value)); THIS->__retvalue = value; %} diff --git a/tapset/process.stp b/tapset/process.stp index ca49aa67..e39f740a 100644 --- a/tapset/process.stp +++ b/tapset/process.stp @@ -5,7 +5,9 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// This family of probe points is used to probe process-related activities. +// </tapsetdescription> function _IS_ERR:long(ptr:long) %{ /* pure */ THIS->__retvalue = IS_ERR((const void *)(long)THIS->ptr); diff --git a/tapset/rpc.stp b/tapset/rpc.stp index f97117b5..1d47daed 100644 --- a/tapset/rpc.stp +++ b/tapset/rpc.stp @@ -877,60 +877,40 @@ probe sunrpc.sched.delay.return = kernel.function("rpc_delay").return !, *****************************************************************/ function xid_from_clnt:long(clnt:long) -%{ /* pure */ - struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; - if (clnt == NULL) - THIS->__retvalue = 0; - else { - struct rpc_xprt *cl_xprt = kread(&(clnt->cl_xprt)); - THIS->__retvalue = kread(&(cl_xprt->xid)); - } - CATCH_DEREF_FAULT(); -%} +{ + if (clnt == 0) + return 0 + return @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_xprt->xid +} function prog_from_clnt:long(clnt:long) -%{ /* pure */ - struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; - if (clnt == NULL) - THIS->__retvalue = 0; - else { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) - THIS->__retvalue = kread(&(clnt->cl_prog)); -#else - struct rpc_portmap *cl_pmap = kread(&(clnt->cl_pmap)); - THIS->__retvalue = kread(&(cl_pmap->pm_prog)); -#endif - } - CATCH_DEREF_FAULT(); -%} +{ + if (clnt == 0) + return 0 +%(kernel_v >= "2.6.19" %? + return @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_prog +%: + return @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_pmap->pm_prog +%) +} function vers_from_clnt:long(clnt:long) -%{ /* pure */ - struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; - if (clnt == NULL) - THIS->__retvalue = 0; - else { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) - THIS->__retvalue = kread(&(clnt->cl_vers)); -#else - struct rpc_portmap *cl_pmap = kread(&(clnt->cl_pmap)); - THIS->__retvalue = kread(&(cl_pmap->pm_vers)); -#endif - } - CATCH_DEREF_FAULT(); -%} +{ + if (clnt == 0) + return 0 +%(kernel_v >= "2.6.19" %? + return @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_vers +%: + return @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_pmap->pm_vers +%) +} function prot_from_clnt:long(clnt:long) -%{ /* pure */ - struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; - if (clnt == NULL) - THIS->__retvalue = 0; - else { - struct rpc_xprt *cl_xprt = kread(&(clnt->cl_xprt)); - THIS->__retvalue = kread(&(cl_xprt->prot)); - } - CATCH_DEREF_FAULT(); -%} +{ + if (clnt == 0) + return 0 + return @cast(clnt, "rpc_clnt", "kernel:sunrpc")->cl_xprt->prot +} function port_from_clnt:long(clnt:long) %{ /* pure */ @@ -942,12 +922,14 @@ function port_from_clnt:long(clnt:long) struct sockaddr_in *sap = (struct sockaddr_in *) &cl_xprt->addr; THIS->__retvalue = ntohs(kread(&(sap->sin_port))); + } #else if (cl_xprt && kread(&(cl_xprt->addr.sin_family)) == AF_INET) { /* Now consider ipv4 only */ THIS->__retvalue = ntohs(kread(&(cl_xprt->addr.sin_port))); + } #endif - } else + else THIS->__retvalue = 0; CATCH_DEREF_FAULT(); %} @@ -975,16 +957,11 @@ function tasks_from_clnt:long(clnt:long) %} function proc_from_msg:long(msg:long) -%{ /* pure */ - struct rpc_message *msg = (struct rpc_message *)(long)THIS->msg; - if (msg == NULL) - THIS->__retvalue = 0; - else { - struct rpc_procinfo *rpc_proc = kread(&(msg->rpc_proc)); - THIS->__retvalue = kread(&(rpc_proc->p_proc)); - } - CATCH_DEREF_FAULT(); -%} +{ + if (msg == 0) + return 0 + return @cast(msg, "rpc_message", "kernel:sunrpc")->rpc_proc->p_proc +} function vers_from_prog:long(program:long, vers:long) %{ /* pure */ diff --git a/tapset/s390x/registers.stp b/tapset/s390x/registers.stp index 84e28348..37218d14 100644 --- a/tapset/s390x/registers.stp +++ b/tapset/s390x/registers.stp @@ -56,8 +56,18 @@ function _stp_probing_kernel: long () %{ /* pure */ function _stp_get_register_by_offset:long (offset:long) %{ /* pure */ long value; + if (!CONTEXT->regs) { + CONTEXT->last_error = "No registers available in this context"; + return; + } + if (THIS->offset < 0 || THIS->offset > sizeof(struct pt_regs) - sizeof(unsigned short)) { + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), + "Bad register offset: %lld", THIS->offset); + CONTEXT->last_error = CONTEXT->error_buffer; + return; + } - if (THIS->offset <= 152) + if (THIS->offset < sizeof(struct pt_regs) - 2 * sizeof(unsigned short)) memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value)); else { diff --git a/tapset/scsi.stp b/tapset/scsi.stp index 76b9a114..e1457739 100644 --- a/tapset/scsi.stp +++ b/tapset/scsi.stp @@ -5,7 +5,9 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// This family of probe points is used to probe SCSI activities. +// </tapsetdescription> %{ #include <linux/types.h> #include <scsi/scsi_cmnd.h> @@ -21,7 +23,7 @@ * @disk_minor: The minor number of the disk (-1 if no information) * @device_state: The current state of the device. */ -/* FIXME describe the device_state */ +// FIXME describe the device_state probe scsi.ioentry = module("scsi_mod").function("scsi_prep_fn@drivers/scsi/scsi_lib.c")?, kernel.function("scsi_prep_fn@drivers/scsi/scsi_lib.c")? @@ -44,9 +46,9 @@ probe scsi.ioentry * @lun: The lun number * @dev_id: The scsi device id * @device_state: The current state of the device. - * @data_direction: The data_direction specifies whether this command is from/to - * the device. 0 (DMA_BIDIRECTIONAL), 1 (DMA_TO_DEVICE), - * 2 (DMA_FROM_DEVICE), 3 (DMA_NONE) + * @data_direction: The data_direction specifies whether this command is from/to the device. + * 0 (DMA_BIDIRECTIONAL), 1 (DMA_TO_DEVICE), + * 2 (DMA_FROM_DEVICE), 3 (DMA_NONE) * @request_buffer: The request buffer address * @req_bufflen: The request buffer length */ @@ -79,7 +81,7 @@ probe scsi.iodispatching * @dev_id: The scsi device id * @device_state: The current state of the device * @data_direction: The data_direction specifies whether this command is - * from/to the device. + * from/to the device. */ probe scsi.iodone = module("scsi_mod").function("scsi_done@drivers/scsi/scsi.c")?, @@ -104,10 +106,10 @@ probe scsi.iodone * @dev_id: The scsi device id * @device_state: The current state of the device * @data_direction: The data_direction specifies whether this command is from/to - * the device + * the device * @goodbytes: The bytes completed. */ -/* mid-layer processes the completed IO */ +// mid-layer processes the completed IO probe scsi.iocompleted = module("scsi_mod").function("scsi_io_completion@drivers/scsi/scsi_lib.c")?, kernel.function("scsi_io_completion@drivers/scsi/scsi_lib.c")? @@ -136,9 +138,7 @@ function scsi_timer_pending:long(var:long) %} function get_devstate_from_req:long(var:long) -%{ /* pure */ - struct request_queue *q = (struct request_queue *)((long)THIS->var); - struct scsi_device *sdev = (struct scsi_device *)kread(&(q->queuedata)); - THIS->__retvalue = kread(&(sdev->sdev_state)); - CATCH_DEREF_FAULT(); -%} +{ + sdev = @cast(var, "request_queue", "kernel:scsi_mod")->queuedata + return @cast(sdev, "scsi_device", "kernel:scsi_mod")->sdev_state +} diff --git a/tapset/signal.stp b/tapset/signal.stp index f40958e6..711ee70f 100644 --- a/tapset/signal.stp +++ b/tapset/signal.stp @@ -8,16 +8,17 @@ // Public License (GPL); either version 2, or (at your option) any // later version. // -// Note : Since there are so many signals sent to processes at any give -// point, it's better to filter the information according to the -// requirements. For example, filter only for a particular signal -// (if sig==2) or filter only for a particular process -// (if pid_name==stap). // - +// <tapsetdescription> +// This family of probe points is used to probe signal activities. +// Since there are so many signals sent to processes at any given +// point, it is advisable to filter the information according to the +// requirements. For example, filter only for a particular signal +// (if sig==2) or for a particular process (if pid_name==stap). +// </tapsetdescription> /** - * probe signal.send- Fires when a system call or kernel function sends a signal to a process. + * probe signal.send - Signal being sent to a process * Arguments: * @sig: The number of the signal * @sig_name: A string representation of the signal @@ -27,7 +28,8 @@ * @task: A task handle to the signal recipient * @sinfo: The address of <command>siginfo</command> struct * @shared: Indicates whether the signal is shared by the thread group - * @send2queue- Indicates whether the signal is sent to an existing <command>sigqueue</command> + * @send2queue: Indicates whether the signal is sent to an existing + * <command>sigqueue</command> * @name: The name of the function used to send out the signal * * Context: @@ -114,14 +116,14 @@ probe _signal.send.part3 = kernel.function("send_sigqueue") } /** - * probe signal.send.return - Fires when a signal sent to a process returns. + * probe signal.send.return - Signal being sent to a process completed * @retstr: The return value to either <command>__group_send_sig_info</command>, - * <command>specific_send_sig_info</command>, or <command>send_sigqueue</command>. - * Refer to the Description of this probe for more information about the return - * values of each function call. + * <command>specific_send_sig_info</command>, + * or <command>send_sigqueue</command> * @shared: Indicates whether the sent signal is shared by the thread group. - * @send2queue: Indicates whether the sent signal was sent to an existing <command>sigqueue</command> - * @name: The name of the function used to send out the signal. + * @send2queue: Indicates whether the sent signal was sent to an + * existing <command>sigqueue</command> + * @name: The name of the function used to send out the signal * * Context: * The signal's sender. <remark>(correct?)</remark> @@ -129,24 +131,24 @@ probe _signal.send.part3 = kernel.function("send_sigqueue") * Possible <command>__group_send_sig_info</command> and * <command>specific_send_sig_info</command> return values are as follows; * - * <command>0</command> - The signal is sucessfully sent to a process, + * <command>0</command> -- The signal is sucessfully sent to a process, * which means that * <1> the signal was ignored by the receiving process, * <2> this is a non-RT signal and the system already has one queued, and * <3> the signal was successfully added to the <command>sigqueue</command> of the receiving process. * - * <command>-EAGAIN</command> - The <command>sigqueue</command> of the receiving process is + * <command>-EAGAIN</command> -- The <command>sigqueue</command> of the receiving process is * overflowing, the signal was RT, and the signal was sent by a user using something other * than <command>kill()</command> * * Possible <command>send_group_sigqueue</command> and * <command>send_sigqueue</command> return values are as follows; * - * <command>0</command> - The signal was either sucessfully added into the + * <command>0</command> -- The signal was either sucessfully added into the * <command>sigqueue</command> of the receiving process, or a <command>SI_TIMER</command> entry is already * queued (in which case, the overrun count will be simply incremented). * - * <command>1</command> - The signal was ignored by the receiving process. + * <command>1</command> -- The signal was ignored by the receiving process. * * * <command>-1</command> - (<command>send_sigqueue</command> only) The task was marked @@ -232,7 +234,7 @@ probe _signal.send.part3.return = kernel.function("send_sigqueue").return } /** - * probe signal.checkperm - Fires when a permission check is performed on a sent signal + * probe signal.checkperm - Check being performed on a sent signal * @sig: The number of the signal * @sig_name: A string representation of the signal * @sig_pid: The PID of the process receiving the signal @@ -240,7 +242,8 @@ probe _signal.send.part3.return = kernel.function("send_sigqueue").return * @si_code: Indicates the signal type * @task: A task handle to the signal recipient * @sinfo: The address of the <command>siginfo</command> structure - * @name: Name of the probe point; default value is <command>signal.checkperm</command> + * @name: Name of the probe point; default value is + * <command>signal.checkperm</command> */ probe signal.checkperm = kernel.function("check_kill_permission") { @@ -261,6 +264,12 @@ probe signal.checkperm = kernel.function("check_kill_permission") si_code="SI_USER or SI_TIMER or SI_ASYNCIO" } +/** + * probe signal.checkperm.return - Check performed on a sent signal completed + * @name: Name of the probe point; default value is + * <command>signal.checkperm</command> + * @retstr: Return value as a string + */ probe signal.checkperm.return = kernel.function("check_kill_permission").return { name = "signal.checkperm" @@ -269,15 +278,15 @@ probe signal.checkperm.return = kernel.function("check_kill_permission").return /** - * probe signal.wakeup - Wakes up a sleeping process, making it ready for new active signals - * @sig_pid: The PID of the process you wish to wake - * @pid_name: Name of the process you wish to wake - * @resume: Indicates whether to wake up a task in a <command>STOPPED</command> or - * <command>TRACED</command> state + * probe signal.wakeup - Sleeping process being wakened for signal + * @sig_pid: The PID of the process to wake + * @pid_name: Name of the process to wake + * @resume: Indicates whether to wake up a task in a + * <command>STOPPED</command> or <command>TRACED</command> state * @state_mask: A string representation indicating the mask - * of task states you wish to wake. Possible values are <command>TASK_INTERRUPTIBLE</command>, - * <command>TASK_STOPPED</command>, <command>TASK_TRACED</command>, - * and <command>TASK_INTERRUPTIBLE</command>. + * of task states to wake. Possible values are + * <command>TASK_INTERRUPTIBLE</command>, <command>TASK_STOPPED</command>, + * <command>TASK_TRACED</command>, and <command>TASK_INTERRUPTIBLE</command>. */ probe signal.wakeup = kernel.function("signal_wake_up") { @@ -293,8 +302,7 @@ probe signal.wakeup = kernel.function("signal_wake_up") /** - * probe signal.check_ignored - Fires when a system call or kernel function checks whether a - * signal was ignored or not + * probe signal.check_ignored - Checking to see signal is ignored * @sig_pid: The PID of the process receiving the signal * @pid_name: Name of the process receiving the signal * @sig: The number of the signal @@ -308,6 +316,12 @@ probe signal.check_ignored = kernel.function("sig_ignored") sig_name = _signal_name($sig) } +/** + * probe signal.check_ignored.return - Check to see signal is ignored completed + * @name: Name of the probe point; default value is + * <command>signal.checkperm</command> + * @retstr: Return value as a string + */ probe signal.check_ignored.return = kernel.function("sig_ignored").return ? { name = "sig_ignored" @@ -333,8 +347,7 @@ probe signal.handle_stop = kernel.function("handle_stop_signal") /** - * probe signal.force_segv - Fires when a system call, kernel function, or process sent a - * <command>SIGSEGV</command> as a result of problems it encountered while handling a received signal + * probe signal.force_segv - Forcing send of <command>SIGSEGV</command> * @sig_pid: The PID of the process receiving the signal * @pid_name: Name of the process receiving the signal * @sig: The number of the signal @@ -360,6 +373,12 @@ probe _signal.force_segv.part2 = kernel.function("force_sigsegv_info") ? sig_name = _signal_name($sig) } +/** + * probe signal.force_segv.return - Forcing send of <command>SIGSEGV</command> complete + * @name: Name of the probe point; default value is + * <command>force_sigsegv</command> + * @retstr: Return value as a string + */ probe signal.force_segv.return = kernel.function("force_sigsegv").return, kernel.function("force_sigsegv_info").return ? @@ -370,9 +389,8 @@ probe signal.force_segv.return = /** - * probe signal.syskill - Fires when the kernel function <command>sys_kill</command> - * sends a kill signal to a process - * @pid: The PID of the process receiving the kill signal + * probe signal.syskill - Sending kill signal to a process + * @pid: The PID of the process receiving the signal * @sig: The specific signal sent to the process */ probe signal.syskill = syscall.kill @@ -380,33 +398,43 @@ probe signal.syskill = syscall.kill sig_name = _signal_name($sig) } +/** + * probe signal.syskill.return - Sending kill signal completed + */ probe signal.syskill.return = syscall.kill.return { } + /** - * probe signal.sys_tkill - Fires when <command>tkill</command> sends a kill signal - * to a process that is part of a thread group + * probe signal.sys_tkill - Sending a kill signal to a thread * @pid: The PID of the process receiving the kill signal * @sig: The specific signal sent to the process + * @sig_name: The specific signal sent to the process + * * The <command>tkill</command> call is analogous to <command>kill(2)</command>, * except that it also allows a process within a specific thread group to - * be targetted. Such processes are targetted through their unique thread IDs (TID). + * be targetted. Such processes are targetted through their unique + * thread IDs (TID). */ probe signal.systkill = syscall.tkill { sig_name = _signal_name($sig) } +/** + * probe signal.systkill.return - Sending kill signal to a thread completed + */ probe signal.systkill.return = syscall.tkill.return { } /** - * probe signal.sys_tgkill - Fires when the kernel function <command>tgkill</command> - * sends a kill signal to a specific thread group + * probe signal.sys_tgkill - Sending kill signal to a thread group * @pid: The PID of the thread receiving the kill signal * @tgid: The thread group ID of the thread receiving the kill signal * @sig: The specific kill signal sent to the process + * @sig_name: A string representation of the signal + * * The <command>tgkill</command> call is similar to <command>tkill</command>, * except that it also allows the caller to specify the thread group ID of * the thread to be signalled. This protects against TID reuse. @@ -416,12 +444,15 @@ probe signal.systgkill = syscall.tgkill sig_name = _signal_name($sig) } +/** + * probe signal.sys_tgkill.return - Sending kill signal to a thread group completed + */ probe signal.systgkill.return = syscall.tgkill.return { } /** - * probe signal.send_sig_queue - Fires when a signal is queued to a process + * probe signal.send_sig_queue - Queuing a signal to a process * @sig: The queued signal * @sig_name: A string representation of the signal * @sig_pid: The PID of the process to which the signal is queued @@ -439,6 +470,10 @@ probe signal.send_sig_queue = sigqueue_addr = $q } +/** + * probe signal.send_sig_queue.return - Queuing a signal to a process completed + * @retstr: Return value as a string + */ probe signal.send_sig_queue.return = kernel.function("send_sigqueue").return, kernel.function("send_group_sigqueue").return ? @@ -448,25 +483,25 @@ probe signal.send_sig_queue.return = /** - * probe signal.pending - Fires when the <command>SIGPENDING</command> system call is used; - * this normally occurs when the <command>do_sigpending</command> kernel function is executed - * @sigset_add: The address of the user-space signal set (<command>sigset_t</command>) - * @sigset_size: The size of the user-space signal set. - * - * Synopsis: - * <programlisting>long do_sigpending(void __user *set, unsigned long sigsetsize)</programlisting> + * probe signal.pending - Examining pending signal + * @sigset_add: The address of the user-space signal set + * (<command>sigset_t</command>) + * @sigset_size: The size of the user-space signal set * * This probe is used to examine a set of signals pending for delivery - * to a specific thread. + * to a specific thread. This normally occurs when the + * <command>do_sigpending</command> kernel function is executed. */ -// long do_sigpending(void __user *set, unsigned long sigsetsize) - probe signal.pending = kernel.function("do_sigpending") { sigset_add=$set sigset_size=$sigsetsize } +/** + * probe signal.pending.return - Examination of pending signal completed + * @retstr: Return value as a string + */ probe signal.pending.return = kernel.function("do_sigpending").return { retstr = returnstr(1) @@ -474,22 +509,17 @@ probe signal.pending.return = kernel.function("do_sigpending").return /** - * probe signal.handle - Fires when the signal handler is invoked + * probe signal.handle - Signal handler being invoked * @sig: The signal number that invoked the signal handler * @sinfo: The address of the <command>siginfo</command> table - * @sig_code: The <command>si_code</command> value of the <command>siginfo</command> signal - * @ka_addr: The address of the <command>k_sigaction</command> table associated with the signal + * @sig_code: The <command>si_code</command> value of the + * <command>siginfo</command> signal + * @ka_addr: The address of the <command>k_sigaction</command> table + * associated with the signal * @oldset_addr: The address of the bitmask array of blocked signals * @regs: The address of the kernel-mode stack area * @sig_mode: Indicates whether the signal was a user-mode or kernel-mode signal - * - * Synopsis: - * <programlisting>static int handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, - * sigset_t *oldset, struct pt_regs * regs)</programlisting> */ -//static int handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, -// sigset_t *oldset, struct pt_regs * regs) - probe signal.handle = kernel.function("handle_signal") { sig = $sig @@ -508,6 +538,10 @@ probe signal.handle = kernel.function("handle_signal") sig_mode = "Kernel Mode Signal" } +/** + * probe signal.handle.return - Signal handler invocation completed + * @retstr: Return value as a string + */ probe signal.handle.return = kernel.function("handle_signal").return ? { retstr = returnstr(1) @@ -515,11 +549,12 @@ probe signal.handle.return = kernel.function("handle_signal").return ? /** - * probe signal.do_action - Initiates a trace when a thread is about to examine - * and change a signal action + * probe signal.do_action - Examining or changing a signal action * @sig: The signal to be examined/changed - * @sigact_addr: The address of the new <command>sigaction</command> struct associated with the signal - * @oldsigact_addr: The address of the old <command>sigaction</command> struct associated with the signal + * @sigact_addr: The address of the new <command>sigaction</command> + * struct associated with the signal + * @oldsigact_addr: The address of the old <command>sigaction</command> + * struct associated with the signal * @sa_handler: The new handler of the signal * @sa_mask: The new mask of the signal */ @@ -535,6 +570,10 @@ probe signal.do_action = kernel.function("do_sigaction") } } +/** + * probe signal.do_action.return - Examining or changing a signal action completed + * @retstr: Return value as a string + */ probe signal.do_action.return = kernel.function("do_sigaction").return { retstr = returnstr(1) @@ -554,16 +593,17 @@ function __get_action_mask:long(act:long) %{ /* pure */ /** - * probe signal.procmask - Initiates a trace when a thread is about to examine and change blocked signals + * probe signal.procmask - Examining or changing blocked signals * @how: Indicates how to change the blocked signals; possible values are * <command>SIG_BLOCK=0</command> (for blocking signals), * <command>SIG_UNBLOCK=1</command> (for unblocking signals), and * <command>SIG_SETMASK=2</command> for setting the signal mask. - * @sigset_addr: The address of the signal set (<command>sigset_t</command>) to be implemented - * @oldsigset_addr: The old address of the signal set (<command>sigset_t</command>) - * @sigset: The actual value to be set for <command>sigset_t</command> <remark>(correct?)</remark> - * Synopsis: - * <programlisting>int sigprocmask(int how, sigset_t *set, sigset_t *oldset)</programlisting> + * @sigset_addr: The address of the signal set (<command>sigset_t</command>) + * to be implemented + * @oldsigset_addr: The old address of the signal set + * (<command>sigset_t</command>) + * @sigset: The actual value to be set for <command>sigset_t</command> + * <remark>(correct?)</remark> */ probe signal.procmask = kernel.function("sigprocmask") { @@ -591,16 +631,13 @@ probe signal.procmask.return = kernel.function("sigprocmask").return /** - * probe signal.flush - Fires when all pending signals for a task are flushed + * probe signal.flush - Flusing all pending signals for a task * @task: The task handler of the process performing the flush - * @sig_pid: The PID of the process associated with the task performing the flush - * @pid_name: The name of the process associated with the task performing the flush - * - * Synopsis: - * <programlisting>void flush_signals(struct task_struct *t)</programlisting> + * @sig_pid: The PID of the process associated with the task + * performing the flush + * @pid_name: The name of the process associated with the task + * performing the flush */ -//void flush_signals(struct task_struct *t) - probe signal.flush = kernel.function("flush_signals") { task = $t @@ -608,17 +645,15 @@ probe signal.flush = kernel.function("flush_signals") pid_name = kernel_string($t->comm) } -function get_sa_flags:long (act:long) %{ /* pure */ - struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act); - THIS->__retvalue = kread(&act->sa.sa_flags); - CATCH_DEREF_FAULT(); -%} +function get_sa_flags:long (act:long) +{ + return @cast(act, "k_sigaction", "kernel")->sa->sa_flags +} -function get_sa_handler:long (act:long) %{ /* pure */ - struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act); - THIS->__retvalue = (long)kread(&act->sa.sa_handler); - CATCH_DEREF_FAULT(); -%} +function get_sa_handler:long (act:long) +{ + return @cast(act, "k_sigaction", "kernel")->sa->sa_handler +} // sa_mask contains the set of signals to be blocked when executing the // signal handler. This function returns a string, delimited by ",". diff --git a/tapset/socket.stp b/tapset/socket.stp index 842dbfc4..0f01b8d4 100644 --- a/tapset/socket.stp +++ b/tapset/socket.stp @@ -5,7 +5,9 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// This family of probe points is used to probe socket activities. +// </tapsetdescription> %{ #include <net/sock.h> #include <asm/bitops.h> @@ -65,8 +67,8 @@ probe socket.receive = socket.recvmsg.return, ### FUNCTION SPECIFIC SEND/RECEIVE PROBES ### -/* - * probe socket.sendmsg - Message being sent on socket +/** + * probe socket.sendmsg - Message is currently being sent on a socket. * @name: Name of this probe * @size: Message size in bytes * @protocol: Protocol value @@ -93,7 +95,7 @@ probe socket.sendmsg = kernel.function ("sock_sendmsg") } /** - * probe socket.sendmsg.return - Return from Message being sent on socket + * probe socket.sendmsg.return - Return from <command>socket.sendmsg</command>. * @name: Name of this probe * @size: Size of message sent (in bytes) or error code if success = 0 * @protocol: Protocol value @@ -149,7 +151,7 @@ probe socket.recvmsg = kernel.function ("sock_recvmsg") type = $sock->type } -/* +/** * probe socket.recvmsg.return - Return from Message being received on socket * @name: Name of this probe * @size: Size of message received (in bytes) or error code if success = 0 @@ -196,14 +198,14 @@ probe socket.recvmsg.return = kernel.function ("sock_recvmsg").return * Fires at the beginning of sending a message on a socket * via the sock_aio_write() function */ -/* - * 2.6.9~2.6.15: - * static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t size, loff_t pos); - * 2.6.16~2.6.18: - * static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t count, loff_t pos); - * 2.6.19~2.6.26: - * static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos); - */ +// +// 2.6.9~2.6.15: +// static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t size, loff_t pos); +// 2.6.16~2.6.18: +// static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, size_t count, loff_t pos); +// 2.6.19~2.6.26: +// static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos); + probe socket.aio_write = kernel.function ("sock_aio_write") { name = "socket.aio_write" @@ -270,14 +272,14 @@ probe socket.aio_write.return = kernel.function ("sock_aio_write").return * Fires at the beginning of receiving a message on a socket * via the sock_aio_read() function */ -/* - * 2.6.9~2.6.15: - * static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t size, loff_t pos); - * 2.6.16~2.6.18: - * static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t count, loff_t pos); - * 2.6.19~2.6.26: - * static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos); - */ +// +// 2.6.9~2.6.15: +// static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t size, loff_t pos); +// 2.6.16~2.6.18: +// static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, size_t count, loff_t pos); +// 2.6.19~2.6.26: +// static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos); + probe socket.aio_read = kernel.function ("sock_aio_read") { name = "socket.aio_read" @@ -541,18 +543,16 @@ probe socket.close.return = kernel.function ("sock_release").return ####### PROTOCOL HELPER FUNCTIONS ######## -/* - * sock_prot_num2str - * Given a protocol number, return a string representation. +/** + * sfunction sock_prot_num2str - Given a protocol number, return a string representation. */ function sock_prot_num2str:string (proto:long) { return (proto in _prot_num2str ? _prot_num2str[proto] : "UNDEF") } -/* - * sock_prot_str2num - * Given a protocol name (string), return the corresponding protocol number. +/** + * sfunction sock_prot_str2num - Given a protocol name (string), return the corresponding protocol number. */ function sock_prot_str2num:long (proto:string) { @@ -561,18 +561,16 @@ function sock_prot_str2num:long (proto:string) ######### PROTOCOL FAMILY HELPER FUNCTIONS ########### -/* - * sock_fam_num2str - * Given a protocol family number, return a string representation. +/** + * sfunction sock_fam_num2str - Given a protocol family number, return a string representation. */ function sock_fam_num2str:string (family:long) { return (family in _fam_num2str ? _fam_num2str[family] : "UNDEF") } -/* - * sock_fam_str2num - * Given a protocol family name (string), return the corresponding +/** + * sfunction sock_fam_str2num - Given a protocol family name (string), return the corresponding * protocol family number. */ function sock_fam_str2num:long (family:string) @@ -582,18 +580,16 @@ function sock_fam_str2num:long (family:string) ######### SOCKET STATE HELPER FUNCTIONS ########## -/* - * sock_state_num2str - * Given a socket state number, return a string representation. +/** + * sfunction sock_state_num2str - Given a socket state number, return a string representation. */ function sock_state_num2str:string (state:long) { return (state in _state_num2str ? _state_num2str[state] : "UNDEF") } -/* - * sock_state_str2num - * Given a socket state string, return the corresponding state number. +/** + * sfunction sock_state_str2num - Given a socket state string, return the corresponding state number. */ function sock_state_str2num:long (state:string) { @@ -922,53 +918,43 @@ function _get_sock_size:long (iov:long, nr_segs:long) %} function _sock_prot_num:long (sock:long) -%{ /* pure */ - struct socket *sktp = (struct socket *)(long)(THIS->sock); - struct sock *skp = sktp? kread(&(sktp->sk)) : NULL; - if (skp == NULL) - THIS->__retvalue = -1; +{ + skp = sock? @cast(sock, "socket", "kernel")->sk : 0 + if (skp == 0) + return -1 else - THIS->__retvalue = kread(&(skp->sk_protocol)); - CATCH_DEREF_FAULT(); -%} + return @cast(skp, "sock", "kernel")->sk_protocol +} function _sock_fam_num:long (sock:long) -%{ /* pure */ - struct socket *sockp = (struct socket *)(long)(THIS->sock); - const struct proto_ops *ops = sockp? kread(&(sockp->ops)) : NULL; - if (ops == NULL) - THIS->__retvalue = -1; +{ + ops = sock? @cast(sock, "socket", "kernel")->ops : 0 + if (ops == 0) + return -1 else - THIS->__retvalue = kread(&(ops->family)); - CATCH_DEREF_FAULT(); -%} + return @cast(ops, "proto_ops", "kernel")->family +} function _sock_state_num:long (sock:long) -%{ /* pure */ - struct socket *sockp = (struct socket *)(long)(THIS->sock); - if (sockp == NULL) - THIS->__retvalue = -1; +{ + if (sock == 0) + return -1 else - THIS->__retvalue = kread(&(sockp->state)); - CATCH_DEREF_FAULT(); -%} + return @cast(sock, "socket", "kernel")->state +} function _sock_type_num:long (sock:long) -%{ /* pure */ - struct socket *sockp = (struct socket *)(long)(THIS->sock); - if (sockp == NULL) - THIS->__retvalue = -1; - else - THIS->__retvalue = kread(&(sockp->type)); - CATCH_DEREF_FAULT(); -%} +{ + if (sock == 0) + return -1 + else + return @cast(sock, "socket", "kernel")->type +} function _sock_flags_num:long (sock:long) -%{ /* pure */ - struct socket *sockp = (struct socket *)(long)(THIS->sock); - if (sockp == NULL) - THIS->__retvalue = -1; - else - THIS->__retvalue = kread(&(sockp->flags)); - CATCH_DEREF_FAULT(); -%} +{ + if (sock == 0) + return -1 + else + return @cast(sock, "socket", "kernel")->flags +} diff --git a/tapset/syscalls.stp b/tapset/syscalls.stp index 4744412a..256174d3 100644 --- a/tapset/syscalls.stp +++ b/tapset/syscalls.stp @@ -28,28 +28,32 @@ # accept _____________________________________________________ # long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, # int __user *upeer_addrlen) -probe syscall.accept = kernel.function("sys_accept") ? { +probe syscall.accept = kernel.function("SyS_accept") !, + kernel.function("sys_accept") ? { name = "accept" sockfd = $fd addr_uaddr = $upeer_sockaddr addrlen_uaddr = $upeer_addrlen argstr = sprintf("%d, %p, %p", $fd, $upeer_sockaddr, $upeer_addrlen) } -probe syscall.accept.return = kernel.function("sys_accept").return ? { +probe syscall.accept.return = kernel.function("SyS_accept").return !, + kernel.function("sys_accept").return ? { name = "accept" retstr = returnstr(1) } # access _____________________________________________________ # long sys_access(const char __user * filename, int mode) -probe syscall.access = kernel.function("sys_access") { +probe syscall.access = kernel.function("SyS_access") !, + kernel.function("sys_access") { name = "access" pathname = user_string($filename) mode = $mode mode_str = _access_mode_str($mode) argstr = sprintf("%s, %s", user_string_quoted($filename), mode_str) } -probe syscall.access.return = kernel.function("sys_access").return { +probe syscall.access.return = kernel.function("SyS_access").return !, + kernel.function("sys_access").return { name = "access" retstr = returnstr(1) } @@ -73,7 +77,8 @@ probe syscall.acct.return = kernel.function("sys_acct").return ? { # size_t plen, # key_serial_t ringid) # -probe syscall.add_key = kernel.function("sys_add_key") ? { +probe syscall.add_key = kernel.function("SyS_add_key") !, + kernel.function("sys_add_key") ? { name = "add_key" type_uaddr = $_type description_auddr = $_description @@ -86,14 +91,16 @@ probe syscall.add_key = kernel.function("sys_add_key") ? { text_strn(user_string($_payload),syscall_string_trunc,1), $plen, $ringid) } -probe syscall.add_key.return = kernel.function("sys_add_key").return ? { +probe syscall.add_key.return = kernel.function("SyS_add_key").return !, + kernel.function("sys_add_key").return ? { name = "add_key" retstr = returnstr(1) } # adjtimex ___________________________________________________ # long sys_adjtimex(struct timex __user *txc_p) -probe syscall.adjtimex = kernel.function("sys_adjtimex") { +probe syscall.adjtimex = kernel.function("SyS_adjtimex") !, + kernel.function("sys_adjtimex") { name = "adjtimex" /* @@ -111,7 +118,8 @@ probe syscall.adjtimex = kernel.function("sys_adjtimex") { */ argstr = sprintf("%p", $txc_p) } -probe syscall.adjtimex.return = kernel.function("sys_adjtimex").return { +probe syscall.adjtimex.return = kernel.function("SyS_adjtimex").return !, + kernel.function("sys_adjtimex").return { name = "adjtimex" retstr = _adjtimex_return_str($return) } @@ -130,16 +138,18 @@ probe syscall.compat_adjtimex.return = kernel.function("compat_sys_adjtimex").re # long sys32_alarm(unsigned int seconds) # probe syscall.alarm = - kernel.function("sys_alarm") ?, - kernel.function("sys32_alarm") ? + kernel.function("sys32_alarm") ?, + kernel.function("SyS_alarm") !, + kernel.function("sys_alarm") ? { name = "alarm" seconds = $seconds argstr = sprint($seconds) } probe syscall.alarm.return = - kernel.function("sys_alarm").return ?, - kernel.function("sys32_alarm").return ? + kernel.function("sys32_alarm").return ?, + kernel.function("SyS_alarm").return !, + kernel.function("sys_alarm").return ? { name = "alarm" retstr = returnstr(1) @@ -147,7 +157,8 @@ probe syscall.alarm.return = # bdflush ____________________________________________________ # long sys_bdflush(int func,long data) -probe syscall.bdflush = kernel.function("sys_bdflush") ? { +probe syscall.bdflush = kernel.function("SyS_bdflush") !, + kernel.function("sys_bdflush") ? { name = "bdflush" func = $func data = $data @@ -157,21 +168,24 @@ probe syscall.bdflush = kernel.function("sys_bdflush") ? { data_str = sprintf("%d", $data) argstr = sprintf("%d, %s",func, data_str) } -probe syscall.bdflush.return = kernel.function("sys_bdflush").return ? { +probe syscall.bdflush.return = kernel.function("SyS_bdflush").return !, + kernel.function("sys_bdflush").return ? { name = "bdflush" retstr = returnstr(1) } # bind _______________________________________________________ # long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen) -probe syscall.bind = kernel.function("sys_bind") ? { +probe syscall.bind = kernel.function("SyS_bind") !, + kernel.function("sys_bind") ? { name = "bind" sockfd = $fd my_addr_uaddr = $umyaddr addrlen = $addrlen argstr = sprintf("%d, %s, %d", $fd, _struct_sockaddr_u($umyaddr,$addrlen),$addrlen) } -probe syscall.bind.return = kernel.function("sys_bind").return ? { +probe syscall.bind.return = kernel.function("SyS_bind").return !, + kernel.function("sys_bind").return ? { name = "bind" retstr = returnstr(1) } @@ -179,16 +193,18 @@ probe syscall.bind.return = kernel.function("sys_bind").return ? { # brk ________________________________________________________ # unsigned long sys_brk(unsigned long brk) probe syscall.brk = - kernel.function("sys_brk"), - kernel.function("ia64_brk") ? + kernel.function("ia64_brk") ?, + kernel.function("SyS_brk") !, + kernel.function("sys_brk") { name = "brk" brk = $brk argstr = sprintf("%p", brk) } probe syscall.brk.return = - kernel.function("sys_brk").return, - kernel.function("ia64_brk").return ? + kernel.function("ia64_brk").return ?, + kernel.function("SyS_brk").return !, + kernel.function("sys_brk").return { name = "brk" retstr = returnstr(1) @@ -207,13 +223,15 @@ probe syscall.brk.return = * functions to export. */ # long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) -probe syscall.capget = kernel.function("sys_capget") { +probe syscall.capget = kernel.function("SyS_capget") !, + kernel.function("sys_capget") { name = "capget" header_uaddr = $header data_uaddr = $dataptr argstr = sprintf("%p, %p", $header, $dataptr) } -probe syscall.capget.return = kernel.function("sys_capget").return { +probe syscall.capget.return = kernel.function("SyS_capget").return !, + kernel.function("sys_capget").return { name = "capget" retstr = returnstr(1) } @@ -230,52 +248,60 @@ probe syscall.capget.return = kernel.function("sys_capget").return { * functions to export. */ # long sys_capset(cap_user_header_t header, const cap_user_data_t data) -probe syscall.capset = kernel.function("sys_capset") { +probe syscall.capset = kernel.function("SyS_capset") !, + kernel.function("sys_capset") { name = "capset" header_uaddr = $header data_uaddr = $data argstr = sprintf("%p, %p", $header, $data) } -probe syscall.capset.return = kernel.function("sys_capset").return { +probe syscall.capset.return = kernel.function("SyS_capset").return !, + kernel.function("sys_capset").return { name = "capset" retstr = returnstr(1) } # chdir ______________________________________________________ # long sys_chdir(const char __user * filename) -probe syscall.chdir = kernel.function("sys_chdir") { +probe syscall.chdir = kernel.function("SyS_chdir") !, + kernel.function("sys_chdir") { name = "chdir" path = user_string($filename) argstr = user_string_quoted($filename) } -probe syscall.chdir.return = kernel.function("sys_chdir").return { +probe syscall.chdir.return = kernel.function("SyS_chdir").return !, + kernel.function("sys_chdir").return { name = "chdir" retstr = returnstr(1) } # chmod ______________________________________________________ # long sys_chmod(const char __user * filename, mode_t mode) -probe syscall.chmod = kernel.function("sys_chmod") { +probe syscall.chmod = kernel.function("SyS_chmod") !, + kernel.function("sys_chmod") { name = "chmod" path = user_string($filename) mode = $mode argstr = sprintf("%s, %#o", user_string_quoted($filename), mode) } -probe syscall.chmod.return = kernel.function("sys_chmod").return { +probe syscall.chmod.return = kernel.function("SyS_chmod").return !, + kernel.function("sys_chmod").return { name = "chmod" retstr = returnstr(1) } # chown ______________________________________________________ # long sys_chown(const char __user * filename, uid_t user, gid_t group) -probe syscall.chown = kernel.function("sys_chown") { +probe syscall.chown = kernel.function("SyS_chown") !, + kernel.function("sys_chown") { name = "chown" path = user_string($filename) owner = __int32($user) group = __int32($group) argstr = sprintf("%s, %d, %d",user_string_quoted($filename), owner, group) } -probe syscall.chown.return = kernel.function("sys_chown").return { +probe syscall.chown.return = kernel.function("SyS_chown").return !, + kernel.function("sys_chown").return { name = "chown" retstr = returnstr(1) } @@ -297,12 +323,14 @@ probe syscall.chown16.return = kernel.function("sys_chown16").return ? { # chroot _____________________________________________________ # long sys_chroot(const char __user * filename) -probe syscall.chroot = kernel.function("sys_chroot") { +probe syscall.chroot = kernel.function("SyS_chroot") !, + kernel.function("sys_chroot") { name = "chroot" path = user_string($filename) argstr = user_string_quoted($filename) } -probe syscall.chroot.return = kernel.function("sys_chroot").return { +probe syscall.chroot.return = kernel.function("SyS_chroot").return !, + kernel.function("sys_chroot").return { name = "chroot" retstr = returnstr(1) } @@ -312,8 +340,9 @@ probe syscall.chroot.return = kernel.function("sys_chroot").return { # long compat_clock_getres(clockid_t which_clock, struct compat_timespec __user *tp) # probe syscall.clock_getres = - kernel.function("sys_clock_getres"), - kernel.function("compat_clock_getres") ? + kernel.function("compat_clock_getres") ?, + kernel.function("SyS_clock_getres") !, + kernel.function("sys_clock_getres") { name = "clock_getres" clk_id = $which_clock @@ -322,8 +351,9 @@ probe syscall.clock_getres = argstr = sprintf("%s, %p", _get_wc_str($which_clock), $tp) } probe syscall.clock_getres.return = - kernel.function("sys_clock_getres").return, - kernel.function("compat_clock_getres").return ? + kernel.function("compat_clock_getres").return ?, + kernel.function("SyS_clock_getres").return !, + kernel.function("sys_clock_getres").return { name = "clock_getres" retstr = returnstr(1) @@ -333,6 +363,7 @@ probe syscall.clock_getres.return = # long sys_clock_gettime(clockid_t which_clock, struct timespec __user *tp) # probe syscall.clock_gettime = + kernel.function("SyS_clock_gettime") !, kernel.function("sys_clock_gettime") { name = "clock_gettime" @@ -340,7 +371,9 @@ probe syscall.clock_gettime = clk_id_str = _get_wc_str($which_clock) argstr = sprintf("%s, %p", _get_wc_str($which_clock), $tp) } -probe syscall.clock_gettime.return = kernel.function("sys_clock_gettime").return +probe syscall.clock_gettime.return = + kernel.function("SyS_clock_gettime").return !, + kernel.function("sys_clock_gettime").return { name = "clock_gettime" retstr = returnstr(1) @@ -352,7 +385,8 @@ probe syscall.clock_gettime.return = kernel.function("sys_clock_gettime").return # const struct timespec __user *rqtp, # struct timespec __user *rmtp) # -probe syscall.clock_nanosleep = kernel.function("sys_clock_nanosleep") { +probe syscall.clock_nanosleep = kernel.function("SyS_clock_nanosleep") !, + kernel.function("sys_clock_nanosleep") { name = "clock_nanosleep" if ($flags == 1) flag_str = "TIMER_ABSTIME" @@ -361,7 +395,9 @@ probe syscall.clock_nanosleep = kernel.function("sys_clock_nanosleep") { argstr = sprintf("%s, %s, %s, %p", _get_wc_str($which_clock), flag_str, _struct_timespec_u($rqtp,1), $rmtp) } -probe syscall.clock_nanosleep.return = kernel.function("sys_clock_nanosleep").return { +probe syscall.clock_nanosleep.return = + kernel.function("SyS_clock_nanosleep").return !, + kernel.function("sys_clock_nanosleep").return { name = "clock_nanosleep" retstr = returnstr(1) } @@ -395,53 +431,61 @@ probe syscall.compat_clock_nanosleep.return = # long sys_clock_settime(clockid_t which_clock, # const struct timespec __user *tp) # -probe syscall.clock_settime = kernel.function("sys_clock_settime") { +probe syscall.clock_settime = kernel.function("SyS_clock_settime") !, + kernel.function("sys_clock_settime") { name = "clock_settime" clk_id = $which_clock clk_id_str = _get_wc_str($which_clock) tp_uaddr = $tp argstr = sprintf("%s, %s", clk_id_str, _struct_timespec_u($tp,1)) } -probe syscall.clock_settime.return = kernel.function("sys_clock_settime").return { +probe syscall.clock_settime.return = kernel.function("SyS_clock_settime").return !, + kernel.function("sys_clock_settime").return { name = "clock_settime" retstr = returnstr(1) } # close ______________________________________________________ # long sys_close(unsigned int fd) -probe syscall.close = kernel.function("sys_close") { +probe syscall.close = kernel.function("SyS_close") !, + kernel.function("sys_close") { name = "close" fd = $fd argstr = sprint(fd) } -probe syscall.close.return = kernel.function("sys_close").return { +probe syscall.close.return = kernel.function("SyS_close").return !, + kernel.function("sys_close").return { name = "close" retstr = returnstr(1) } # connect ____________________________________________________ # long sys_connect(int fd, struct sockaddr __user *uservaddr, int addrlen) -probe syscall.connect = kernel.function("sys_connect") ? { +probe syscall.connect = kernel.function("SyS_connect") !, + kernel.function("sys_connect") ? { name = "connect" sockfd = $fd serv_addr_uaddr = $uservaddr addrlen = $addrlen argstr = sprintf("%d, %s, %d", $fd, _struct_sockaddr_u($uservaddr,$addrlen),$addrlen) } -probe syscall.connect.return = kernel.function("sys_connect").return ? { +probe syscall.connect.return = kernel.function("SyS_connect").return !, + kernel.function("sys_connect").return ? { name = "connect" retstr = returnstr(1) } # creat # long sys_creat(const char __user * pathname, int mode) -probe syscall.creat = kernel.function("sys_creat") ? +probe syscall.creat = kernel.function("SyS_creat") !, + kernel.function("sys_creat") ? { name = "creat" mode = $mode pathname = user_string($pathname) argstr = sprintf("%s, %#o", user_string_quoted($pathname), $mode) } -probe syscall.creat.return = kernel.function("sys_creat").return ? +probe syscall.creat.return = kernel.function("SyS_creat").return !, + kernel.function("sys_creat").return ? { name = "creat" retstr = returnstr(1) @@ -449,50 +493,59 @@ probe syscall.creat.return = kernel.function("sys_creat").return ? # delete_module ______________________________________________ # long sys_delete_module(const char __user *name_user, unsigned int flags) -probe syscall.delete_module = kernel.function("sys_delete_module") ? { +probe syscall.delete_module = kernel.function("SyS_delete_module") !, + kernel.function("sys_delete_module") ? { name = "delete_module" name_user = user_string($name_user) flags = $flags argstr = sprintf("%s, %s", user_string_quoted($name_user), _module_flags_str($flags)) } -probe syscall.delete_module.return = kernel.function("sys_delete_module").return ? { +probe syscall.delete_module.return = kernel.function("SyS_delete_module").return !, + kernel.function("sys_delete_module").return ? { name = "delete_module" retstr = returnstr(1) } # dup ________________________________________________________ # long sys_dup(unsigned int fildes) -probe syscall.dup = kernel.function("sys_dup") { +probe syscall.dup = kernel.function("SyS_dup") !, + kernel.function("sys_dup") { name = "dup" oldfd = $fildes argstr = sprint($fildes) } -probe syscall.dup.return = kernel.function("sys_dup").return { +probe syscall.dup.return = kernel.function("SyS_dup").return !, + kernel.function("sys_dup").return { name = "dup" retstr = returnstr(1) } # dup2 _______________________________________________________ # long sys_dup2(unsigned int oldfd, unsigned int newfd) -probe syscall.dup2 = kernel.function("sys_dup2") { +probe syscall.dup2 = kernel.function("SyS_dup2") !, + kernel.function("sys_dup2") { name = "dup2" oldfd = $oldfd newfd = $newfd argstr = sprintf("%d, %d", $oldfd, $newfd) } -probe syscall.dup2.return = kernel.function("sys_dup2").return { +probe syscall.dup2.return = kernel.function("SyS_dup2").return !, + kernel.function("sys_dup2").return { name = "dup2" retstr = returnstr(1) } # epoll_create _______________________________________________ # long sys_epoll_create(int size) -probe syscall.epoll_create = kernel.function("sys_epoll_create") ? { +probe syscall.epoll_create = kernel.function("SyS_epoll_create") !, + kernel.function("sys_epoll_create") ? { name = "epoll_create" size = $size argstr = sprint($size) } -probe syscall.epoll_create.return = kernel.function("sys_epoll_create").return ? { +probe syscall.epoll_create.return = + kernel.function("SyS_epoll_create").return !, + kernel.function("sys_epoll_create").return ? { name = "epoll_create" retstr = returnstr(1) } @@ -504,8 +557,9 @@ probe syscall.epoll_create.return = kernel.function("sys_epoll_create").return ? # struct compat_epoll_event __user *event) # probe syscall.epoll_ctl = - kernel.function("sys_epoll_ctl") ?, - kernel.function("compat_sys_epoll_ctl") ? + kernel.function("compat_sys_epoll_ctl") ?, + kernel.function("SyS_epoll_ctl") !, + kernel.function("sys_epoll_ctl") ? { name = "epoll_ctl" epfd = $epfd @@ -516,8 +570,9 @@ probe syscall.epoll_ctl = argstr = sprintf("%d, %s, %d, %p", $epfd, _opoll_op_str($op), $fd, $event) } probe syscall.epoll_ctl.return = - kernel.function("sys_epoll_ctl").return ?, - kernel.function("compat_sys_epoll_ctl").return ? + kernel.function("compat_sys_epoll_ctl").return ?, + kernel.function("SyS_epoll_ctl").return !, + kernel.function("sys_epoll_ctl").return ? { name = "epoll_ctl" retstr = returnstr(1) @@ -535,16 +590,18 @@ probe syscall.epoll_ctl.return = # compat_size_t sigsetsize) # probe syscall.epoll_pwait = - kernel.function("sys_epoll_pwait") ?, - kernel.function("compat_sys_epoll_pwait") ? + kernel.function("compat_sys_epoll_pwait") ?, + kernel.function("SyS_epoll_pwait") !, + kernel.function("sys_epoll_pwait") ? { name = "epoll_pwait" argstr = sprintf("%d, %p, %d, %d, %p, %d", $epfd, $events, $maxevents, $timeout, $sigmask, $sigsetsize) } probe syscall.epoll_pwait.return = - kernel.function("sys_epoll_pwait").return ?, - kernel.function("compat_sys_epoll_pwait").return ? + kernel.function("compat_sys_epoll_pwait").return ?, + kernel.function("SyS_epoll_pwait").return !, + kernel.function("sys_epoll_pwait").return ? { name = "epoll_pwait" retstr = returnstr(1) @@ -559,8 +616,9 @@ probe syscall.epoll_pwait.return = # int maxevents, int timeout) # probe syscall.epoll_wait = - kernel.function("sys_epoll_wait") ?, - kernel.function("compat_sys_epoll_wait") ? + kernel.function("compat_sys_epoll_wait") ?, + kernel.function("SyS_epoll_wait") !, + kernel.function("sys_epoll_wait") ? { name = "epoll_wait" epfd = $epfd @@ -570,8 +628,9 @@ probe syscall.epoll_wait = argstr = sprintf("%d, %p, %d, %d", $epfd, $events, $maxevents, $timeout) } probe syscall.epoll_wait.return = - kernel.function("sys_epoll_wait").return ?, - kernel.function("compat_sys_epoll_wait").return ? + kernel.function("compat_sys_epoll_wait").return ?, + kernel.function("SyS_epoll_wait").return !, + kernel.function("sys_epoll_wait").return ? { name = "epoll_wait" retstr = returnstr(1) @@ -580,11 +639,13 @@ probe syscall.epoll_wait.return = # eventfd _____________________________________________________ # long sys_eventfd(unsigned int count) # -probe syscall.eventfd = kernel.function("sys_eventfd") ? { +probe syscall.eventfd = kernel.function("SyS_eventfd") !, + kernel.function("sys_eventfd") ? { name = "eventfd" argstr = sprint($count) } -probe syscall.eventfd.return = kernel.function("sys_eventfd").return ? { +probe syscall.eventfd.return = kernel.function("SyS_eventfd").return !, + kernel.function("sys_eventfd").return ? { name = "eventfd" retstr = returnstr(1) } @@ -636,7 +697,8 @@ probe syscall.exit = kernel.function("do_exit") { # exit_group _________________________________________________ # void sys_exit_group(int error_code) # -probe syscall.exit_group = kernel.function("sys_exit_group") { +probe syscall.exit_group = kernel.function("SyS_exit_group") !, + kernel.function("sys_exit_group") { name = "exit_group" status = $error_code argstr = sprint($error_code) @@ -647,7 +709,8 @@ probe syscall.exit_group = kernel.function("sys_exit_group") { # faccessat __________________________________________________ # new function with 2.6.16 # long sys_faccessat(int dfd, const char __user *filename, int mode) -probe syscall.faccessat = kernel.function("sys_faccessat") ? { +probe syscall.faccessat = kernel.function("SyS_faccessat") !, + kernel.function("sys_faccessat") ? { name = "faccessat" dfd = $dfd dfd_str = _dfd_str($dfd) @@ -657,7 +720,8 @@ probe syscall.faccessat = kernel.function("sys_faccessat") ? { mode_str = _access_mode_str($mode) argstr = sprintf("%s, %s, %s", dfd_str, user_string_quoted($filename), mode_str) } -probe syscall.faccessat.return = kernel.function("sys_faccessat").return ? { +probe syscall.faccessat.return = kernel.function("SyS_faccessat").return !, + kernel.function("sys_faccessat").return ? { name = "faccessat" retstr = returnstr(1) } @@ -666,7 +730,8 @@ probe syscall.faccessat.return = kernel.function("sys_faccessat").return ? { # fadvise64 __________________________________________________ # long sys_fadvise64(int fd, loff_t offset, size_t len, int advice) # -probe syscall.fadvise64 = kernel.function("sys_fadvise64") ? { +probe syscall.fadvise64 = kernel.function("SyS_fadvise64") !, + kernel.function("sys_fadvise64") ? { name = "fadvise64" fs = $fd offset = $offset @@ -674,7 +739,8 @@ probe syscall.fadvise64 = kernel.function("sys_fadvise64") ? { advice = $advice argstr = sprintf("%d, %d, %d, %s", $fd, $offset, $len, _fadvice_advice_str($advice)) } -probe syscall.fadvise64.return = kernel.function("sys_fadvise64").return ? { +probe syscall.fadvise64.return = kernel.function("SyS_fadvise64").return !, + kernel.function("sys_fadvise64").return ? { name = "fadvise64" retstr = returnstr(1) } @@ -682,7 +748,8 @@ probe syscall.fadvise64.return = kernel.function("sys_fadvise64").return ? { # fadvise64_64 _______________________________________________ # long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) # -probe syscall.fadvise64_64 = kernel.function("sys_fadvise64_64") { +probe syscall.fadvise64_64 = kernel.function("SyS_fadvise64_64") !, + kernel.function("sys_fadvise64_64") ? { name = "fadvise64_64" fs = $fd offset = $offset @@ -690,7 +757,8 @@ probe syscall.fadvise64_64 = kernel.function("sys_fadvise64_64") { advice = $advice argstr = sprintf("%d, %d, %d, %s", $fd, $offset, $len, _fadvice_advice_str($advice)) } -probe syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").return { +probe syscall.fadvise64_64.return = kernel.function("SyS_fadvise64_64").return !, + kernel.function("sys_fadvise64_64").return ? { name = "fadvise64_64" retstr = returnstr(1) } @@ -700,7 +768,8 @@ probe syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").return # fadvise64 __________________________________________________ # long sys_fadvise64(int fd, loff_t offset, size_t len, int advice) # -probe syscall.fadvise64 = kernel.function("sys_fadvise64") { +probe syscall.fadvise64 = kernel.function("SyS_fadvise64") !, + kernel.function("sys_fadvise64") { name = "fadvise64" fs = 0 offset = 0 @@ -708,7 +777,8 @@ probe syscall.fadvise64 = kernel.function("sys_fadvise64") { advice = 0 argstr = "" } -probe syscall.fadvise64.return = kernel.function("sys_fadvise64").return { +probe syscall.fadvise64.return = kernel.function("SyS_fadvise64").return !, + kernel.function("sys_fadvise64").return { name = "fadvise64" retstr = returnstr(1) } @@ -716,7 +786,8 @@ probe syscall.fadvise64.return = kernel.function("sys_fadvise64").return { # fadvise64_64 _______________________________________________ # long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) # -probe syscall.fadvise64_64 = kernel.function("sys_fadvise64_64") { +probe syscall.fadvise64_64 = kernel.function("SyS_fadvise64_64") !, + kernel.function("sys_fadvise64_64") { name = "fadvise64_64" fs = 0 offset = 0 @@ -724,7 +795,8 @@ probe syscall.fadvise64_64 = kernel.function("sys_fadvise64_64") { advice = 0 argstr = "" } -probe syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").return { +probe syscall.fadvise64_64.return = kernel.function("SyS_fadvise64_64").return !, + kernel.function("sys_fadvise64_64").return { name = "fadvise64_64" retstr = returnstr(1) } @@ -732,25 +804,29 @@ probe syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").return # fchdir _____________________________________________________ # long sys_fchdir(unsigned int fd) -probe syscall.fchdir = kernel.function("sys_fchdir") { +probe syscall.fchdir = kernel.function("SyS_fchdir") !, + kernel.function("sys_fchdir") { name = "fchdir" fd = $fd argstr = sprint($fd) } -probe syscall.fchdir.return = kernel.function("sys_fchdir").return { +probe syscall.fchdir.return = kernel.function("SyS_fchdir").return !, + kernel.function("sys_fchdir").return { name = "fchdir" retstr = returnstr(1) } # fchmod _____________________________________________________ # long sys_fchmod(unsigned int fd, mode_t mode) -probe syscall.fchmod = kernel.function("sys_fchmod") { +probe syscall.fchmod = kernel.function("SyS_fchmod") !, + kernel.function("sys_fchmod") { name = "fchmod" fildes = $fd mode = $mode argstr = sprintf("%d, %#o", $fd, $mode) } -probe syscall.fchmod.return = kernel.function("sys_fchmod").return { +probe syscall.fchmod.return = kernel.function("SyS_fchmod").return !, + kernel.function("sys_fchmod").return { name = "fchmod" retstr = returnstr(1) } @@ -759,7 +835,8 @@ probe syscall.fchmod.return = kernel.function("sys_fchmod").return { # new function with 2.6.16 # long sys_fchmodat(int dfd, const char __user *filename, # mode_t mode) -probe syscall.fchmodat = kernel.function("sys_fchmodat") ? { +probe syscall.fchmodat = kernel.function("SyS_fchmodat") !, + kernel.function("sys_fchmodat") ? { name = "fchmodat" dfd = $dfd dfd_str = _dfd_str($dfd) @@ -768,21 +845,24 @@ probe syscall.fchmodat = kernel.function("sys_fchmodat") ? { mode = $mode argstr = sprintf("%s, %s, %#o", dfd_str, user_string_quoted($filename), $mode) } -probe syscall.fchmodat.return = kernel.function("sys_fchmodat").return ? { +probe syscall.fchmodat.return = kernel.function("SyS_fchmodat").return !, + kernel.function("sys_fchmodat").return ? { name = "fchmodat" retstr = returnstr(1) } # fchown _____________________________________________________ # long sys_fchown(unsigned int fd, uid_t user, gid_t group) -probe syscall.fchown = kernel.function("sys_fchown") { +probe syscall.fchown = kernel.function("SyS_fchown") !, + kernel.function("sys_fchown") { name = "fchown" fd = $fd owner = __int32($user) group = __int32($group) argstr = sprintf("%d, %d, %d", $fd, owner, group) } -probe syscall.fchown.return = kernel.function("sys_fchown").return { +probe syscall.fchown.return = kernel.function("SyS_fchown").return !, + kernel.function("sys_fchown").return { name = "fchown" retstr = returnstr(1) } @@ -805,7 +885,8 @@ probe syscall.fchown16.return = kernel.function("sys_fchown16").return ? { # new function with 2.6.16 # long sys_fchownat(int dfd, const char __user *filename, # uid_t user, gid_t group, int flag) -probe syscall.fchownat = kernel.function("sys_fchownat") ? { +probe syscall.fchownat = kernel.function("SyS_fchownat") !, + kernel.function("sys_fchownat") ? { name = "fchownat" dfd = $dfd dfd_str = _dfd_str($dfd) @@ -818,7 +899,8 @@ probe syscall.fchownat = kernel.function("sys_fchownat") ? { argstr = sprintf("%s, %s, %d, %d, %s", dfd_str, user_string_quoted($filename), user, group, flag_str) } -probe syscall.fchownat.return = kernel.function("sys_fchownat").return ? { +probe syscall.fchownat.return = kernel.function("SyS_fchownat").return !, + kernel.function("sys_fchownat").return ? { name = "fchownat" retstr = returnstr(1) } @@ -830,10 +912,11 @@ probe syscall.fchownat.return = kernel.function("sys_fchownat").return ? { # long compat_sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) # probe syscall.fcntl = - kernel.function("sys_fcntl") ?, - kernel.function("sys_fcntl64") ?, kernel.function("compat_sys_fcntl") ?, - kernel.function("compat_sys_fcntl64") ? + kernel.function("compat_sys_fcntl64") ?, + kernel.function("sys_fcntl64") ?, + kernel.function("SyS_fcntl") !, + kernel.function("sys_fcntl") ? { name = "fcntl" fd = $fd @@ -843,10 +926,11 @@ probe syscall.fcntl = argstr = sprintf("%d, %s, %p", $fd, _fcntl_cmd_str($cmd), $arg) } probe syscall.fcntl.return = - kernel.function("sys_fcntl").return ?, - kernel.function("sys_fcntl64").return ?, kernel.function("compat_sys_fcntl").return ?, - kernel.function("compat_sys_fcntl64").return ? + kernel.function("compat_sys_fcntl64").return ?, + kernel.function("sys_fcntl64").return ?, + kernel.function("SyS_fcntl").return !, + kernel.function("sys_fcntl").return ? { name = "fcntl" retstr = returnstr(1) @@ -854,12 +938,14 @@ probe syscall.fcntl.return = # fdatasync __________________________________________________ # long sys_fdatasync(unsigned int fd) -probe syscall.fdatasync = kernel.function("sys_fdatasync") { +probe syscall.fdatasync = kernel.function("SyS_fdatasync") !, + kernel.function("sys_fdatasync") { name = "fdatasync" fd = $fd argstr = sprint(fd) } -probe syscall.fdatasync.return = kernel.function("sys_fdatasync").return { +probe syscall.fdatasync.return = kernel.function("SyS_fdatasync").return !, + kernel.function("sys_fdatasync").return { name = "fdatasync" retstr = returnstr(1) } @@ -867,7 +953,8 @@ probe syscall.fdatasync.return = kernel.function("sys_fdatasync").return { # fgetxattr __________________________________________________ # ssize_t sys_fgetxattr(int fd, char __user *name, # void __user *value, size_t size) -probe syscall.fgetxattr = kernel.function("sys_fgetxattr") { +probe syscall.fgetxattr = kernel.function("SyS_fgetxattr") !, + kernel.function("sys_fgetxattr") { name = "fgetxattr" filedes = $fd #FIXME @@ -876,33 +963,38 @@ probe syscall.fgetxattr = kernel.function("sys_fgetxattr") { size = $size argstr = sprintf("%d, %s, %p, %d", filedes, user_string_quoted($name), value_uaddr, size) } -probe syscall.fgetxattr.return = kernel.function("sys_fgetxattr").return { +probe syscall.fgetxattr.return = kernel.function("SyS_fgetxattr").return !, + kernel.function("sys_fgetxattr").return { name = "fgetxattr" retstr = returnstr(1) } # flistxattr _________________________________________________ # ssize_t sys_flistxattr(int fd, char __user *list, size_t size) -probe syscall.flistxattr = kernel.function("sys_flistxattr") { +probe syscall.flistxattr = kernel.function("SyS_flistxattr") !, + kernel.function("sys_flistxattr") { name = "flistxattr" filedes = $fd list_uaddr = $list size = $size argstr = sprintf("%d, %p, %d", filedes, list_uaddr, size) } -probe syscall.flistxattr.return = kernel.function("sys_flistxattr").return { +probe syscall.flistxattr.return = kernel.function("SyS_flistxattr").return !, + kernel.function("sys_flistxattr").return { name = "flistxattr" retstr = returnstr(1) } # flock ______________________________________________________ # long sys_flock(unsigned int fd, unsigned int cmd) -probe syscall.flock = kernel.function("sys_flock") { +probe syscall.flock = kernel.function("SyS_flock") !, + kernel.function("sys_flock") { name = "flock" fd = $fd operation = $cmd argstr = sprintf("%d, %s", fd, _flock_cmd_str(operation)) } -probe syscall.flock.return = kernel.function("sys_flock").return { +probe syscall.flock.return = kernel.function("SyS_flock").return !, + kernel.function("sys_flock").return { name = "flock" retstr = returnstr(1) } @@ -971,13 +1063,15 @@ probe syscall.fork.return = kernel.function("do_fork").return { } # fremovexattr _______________________________________________ # long sys_fremovexattr(int fd, char __user *name) -probe syscall.fremovexattr = kernel.function("sys_fremovexattr") { +probe syscall.fremovexattr = kernel.function("SyS_fremovexattr") !, + kernel.function("sys_fremovexattr") { name = "fremovexattr" filedes = $fd name_uaddr = $name argstr = sprintf("FIXME PLEASE") } -probe syscall.fremovexattr.return = kernel.function("sys_fremovexattr").return { +probe syscall.fremovexattr.return = kernel.function("SyS_fremovexattr").return !, + kernel.function("sys_fremovexattr").return { name = "fremovexattr" retstr = returnstr(1) } @@ -991,7 +1085,8 @@ probe syscall.fremovexattr.return = kernel.function("sys_fremovexattr").return { * size_t size, * int flags) */ -probe syscall.fsetxattr = kernel.function("sys_fsetxattr") { +probe syscall.fsetxattr = kernel.function("SyS_fsetxattr") !, + kernel.function("sys_fsetxattr") { name = "fsetxattr" filedes = $fd # FIXME @@ -1001,7 +1096,8 @@ probe syscall.fsetxattr = kernel.function("sys_fsetxattr") { flags = $flags argstr = sprintf("%d, %s, %p, %d, %p", filedes, user_string_quoted($name), value_uaddr, size, flags) } -probe syscall.fsetxattr.return = kernel.function("sys_fsetxattr").return { +probe syscall.fsetxattr.return = kernel.function("SyS_fsetxattr").return !, + kernel.function("sys_fsetxattr").return { name = "fsetxattr" retstr = returnstr(1) } @@ -1017,8 +1113,10 @@ probe syscall.fsetxattr.return = kernel.function("sys_fsetxattr").return { # probe syscall.fstat = kernel.function("sys_fstat") ?, + kernel.function("SyS_fstat64") ?, kernel.function("sys_fstat64") ?, kernel.function("sys32_fstat64") ?, + kernel.function("SyS_newfstat") ?, kernel.function("sys_newfstat") ?, kernel.function("sys_oabi_fstat64") ?, kernel.function("compat_sys_newfstat") ? @@ -1030,8 +1128,10 @@ probe syscall.fstat = } probe syscall.fstat.return = kernel.function("sys_fstat").return ?, + kernel.function("SyS_fstat64").return ?, kernel.function("sys_fstat64").return ?, kernel.function("sys32_fstat64").return ?, + kernel.function("SyS_newfstat").return ?, kernel.function("sys_newfstat").return ?, kernel.function("sys_oabi_fstat64").return ?, kernel.function("compat_sys_newfstat").return ? @@ -1046,7 +1146,9 @@ probe syscall.fstat.return = # long sys_fstatat64(int dfd, char __user *filename, struct stat64 __user *statbuf, int flag) # long compat_sys_newfstatat(unsigned int dfd, char __user *filename, struct compat_stat __user *statbuf, int flag) probe syscall.fstatat = + kernel.function("SyS_fstatat64") ?, kernel.function("sys_fstatat64") ?, + kernel.function("SyS_newfstatat") ?, kernel.function("sys_newfstatat") ?, kernel.function("compat_sys_newfstatat") ?, kernel.function("sys32_fstatat64") ? @@ -1058,7 +1160,9 @@ probe syscall.fstatat = argstr = sprintf("%s, %s, %p, %s", _dfd_str($dfd), user_string_quoted($filename), $statbuf, _at_flag_str($flag)) } probe syscall.fstatat.return = + kernel.function("SyS_fstatat64").return ?, kernel.function("sys_fstatat64").return ?, + kernel.function("SyS_newfstatat").return ?, kernel.function("sys_newfstatat").return ?, kernel.function("compat_sys_newfstatat").return ?, kernel.function("sys32_fstatat64").return ? @@ -1072,8 +1176,9 @@ probe syscall.fstatat.return = # long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user *buf) # probe syscall.fstatfs = - kernel.function("sys_fstatfs"), - kernel.function("compat_sys_fstatfs") ? + kernel.function("compat_sys_fstatfs") ?, + kernel.function("SyS_fstatfs") !, + kernel.function("sys_fstatfs") { name = "fstatfs" fd = $fd @@ -1081,8 +1186,9 @@ probe syscall.fstatfs = argstr = sprintf("%d, %p", $fd, $buf) } probe syscall.fstatfs.return = - kernel.function("sys_fstatfs").return, - kernel.function("compat_sys_fstatfs").return ? + kernel.function("compat_sys_fstatfs").return ?, + kernel.function("SyS_fstatfs").return !, + kernel.function("sys_fstatfs").return { name = "fstatfs" retstr = returnstr(1) @@ -1093,8 +1199,9 @@ probe syscall.fstatfs.return = # long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statfs64 __user *buf) # probe syscall.fstatfs64 = - kernel.function("sys_fstatfs64") ?, - kernel.function("compat_sys_fstatfs64") ? + kernel.function("compat_sys_fstatfs64") ?, + kernel.function("SyS_fstatfs64") !, + kernel.function("sys_fstatfs64") ? { name = "fstatfs" fd = $fd @@ -1103,8 +1210,9 @@ probe syscall.fstatfs64 = argstr = sprintf("%d, %d, %p", $fd, $sz, $buf) } probe syscall.fstatfs64.return = - kernel.function("sys_fstatfs64").return ?, - kernel.function("compat_sys_fstatfs64").return ? + kernel.function("compat_sys_fstatfs64").return ?, + kernel.function("SyS_fstatfs64").return !, + kernel.function("sys_fstatfs64").return ? { name = "fstatfs" retstr = returnstr(1) @@ -1112,24 +1220,28 @@ probe syscall.fstatfs64.return = # fsync ______________________________________________________ # long sys_fsync(unsigned int fd) -probe syscall.fsync = kernel.function("sys_fsync") { +probe syscall.fsync = kernel.function("SyS_fsync") !, + kernel.function("sys_fsync") { name = "fsync" fd = $fd argstr = sprint(fd) } -probe syscall.fsync.return = kernel.function("sys_fsync").return { +probe syscall.fsync.return = kernel.function("SyS_fsync").return !, + kernel.function("sys_fsync").return { name = "fsync" retstr = returnstr(1) } # ftruncate __________________________________________________ # long sys_ftruncate(unsigned int fd, unsigned long length) -probe syscall.ftruncate = kernel.function("sys_ftruncate") { +probe syscall.ftruncate = kernel.function("SyS_ftruncate") !, + kernel.function("sys_ftruncate") { name = "ftruncate" fd = $fd length = $length argstr = sprintf("%d, %d", fd, length) } -probe syscall.ftruncate.return = kernel.function("sys_ftruncate").return { +probe syscall.ftruncate.return = kernel.function("SyS_ftruncate").return !, + kernel.function("sys_ftruncate").return { name = "ftruncate" retstr = returnstr(1) } @@ -1158,7 +1270,8 @@ probe syscall.ftruncate64.return = kernel.function("sys_ftruncate64").return ? { # struct compat_timespec __user *utime, u32 __user *uaddr2, # u32 val3) # -probe syscall.futex = kernel.function("sys_futex") ? { +probe syscall.futex = kernel.function("SyS_futex") !, + kernel.function("sys_futex") ? { name = "futex" futex_uaddr = $uaddr op = $op @@ -1173,7 +1286,8 @@ probe syscall.futex = kernel.function("sys_futex") ? { argstr = sprintf("%p, %s, %d", $uaddr, _futex_op_str($op), $val) } -probe syscall.futex.return = kernel.function("sys_futex").return ? { +probe syscall.futex.return = kernel.function("SyS_futex").return !, + kernel.function("sys_futex").return ? { name = "futex" retstr = returnstr(1) } @@ -1203,7 +1317,8 @@ probe syscall.compat_futex.return = kernel.function("compat_sys_futex").return ? # long compat_sys_futimesat(unsigned int dfd, char __user *filename, struct compat_timeval __user *t) # -probe syscall.futimesat = kernel.function("sys_futimesat") ? { +probe syscall.futimesat = kernel.function("SyS_futimesat") !, + kernel.function("sys_futimesat") ? { name = "futimesat" dirfd = $dfd filename_uaddr = $filename @@ -1221,7 +1336,8 @@ probe syscall.compat_futimesat = kernel.function("compat_sys_futimesat") ? { argstr = sprintf("%s, %s, %s", _dfd_str($dfd), user_string_quoted($filename), _struct_compat_timeval_u($t, 2)) } -probe syscall.futimesat.return = kernel.function("sys_futimesat").return ? { +probe syscall.futimesat.return = kernel.function("SyS_futimesat").return !, + kernel.function("sys_futimesat").return ? { name = "futimesat" retstr = returnstr(1) } @@ -1232,13 +1348,15 @@ probe syscall.compat_futimesat.return = kernel.function("compat_sys_futimesat"). # getcwd _____________________________________________________ # long sys_getcwd(char __user *buf, unsigned long size) -probe syscall.getcwd = kernel.function("sys_getcwd") { +probe syscall.getcwd = kernel.function("SyS_getcwd") !, + kernel.function("sys_getcwd") { name = "getcwd" buf_uaddr = $buf size = $size argstr = sprintf("%p, %d", buf_uaddr, size) } -probe syscall.getcwd.return = kernel.function("sys_getcwd").return { +probe syscall.getcwd.return = kernel.function("SyS_getcwd").return !, + kernel.function("sys_getcwd").return { name = "getcwd" retstr = returnstr(1) } @@ -1250,7 +1368,9 @@ probe syscall.getcwd.return = kernel.function("sys_getcwd").return { # long compat_sys_getdents64(unsigned int fd, struct linux_dirent64 __user * dirent, unsigned int count) # probe syscall.getdents = + kernel.function("SyS_getdents") ?, kernel.function("sys_getdents") ?, + kernel.function("SyS_getdents64") ?, kernel.function("sys_getdents64") ?, kernel.function("compat_sys_getdents") ?, kernel.function("compat_sys_getdents64") ? @@ -1262,7 +1382,9 @@ probe syscall.getdents = argstr = sprintf("%d, %p, %d", $fd, $dirent, $count) } probe syscall.getdents.return = + kernel.function("SyS_getdents").return ?, kernel.function("sys_getdents").return ?, + kernel.function("SyS_getdents64").return ?, kernel.function("sys_getdents64").return ?, kernel.function("compat_sys_getdents").return ?, kernel.function("compat_sys_getdents64").return ? @@ -1341,9 +1463,10 @@ probe syscall.getgid.return = # long sys32_getgroups16(int gidsetsize, u16 __user *grouplist) # probe syscall.getgroups = - kernel.function("sys_getgroups") ?, kernel.function("sys_getgroups16") ?, - kernel.function("sys32_getgroups16") ? + kernel.function("sys32_getgroups16") ?, + kernel.function("SyS_getgroups") !, + kernel.function("sys_getgroups") ? { name = "getgroups" size = $gidsetsize @@ -1351,9 +1474,10 @@ probe syscall.getgroups = argstr = sprintf("%d, %p", $gidsetsize, $grouplist) } probe syscall.getgroups.return = - kernel.function("sys_getgroups").return ?, kernel.function("sys_getgroups16").return ?, - kernel.function("sys32_getgroups16").return ? + kernel.function("sys32_getgroups16").return ?, + kernel.function("SyS_getgroups").return !, + kernel.function("sys_getgroups").return ? { name = "getgroups" retstr = returnstr(1) @@ -1361,13 +1485,15 @@ probe syscall.getgroups.return = # gethostname ________________________________________________ # long sys_gethostname(char __user *name, int len) -probe syscall.gethostname = kernel.function("sys_gethostname") ? { +probe syscall.gethostname = kernel.function("SyS_gethostname") !, + kernel.function("sys_gethostname") ? { name = "gethostname" name_uaddr = $name len = $len argstr = sprintf ("%p, %d", name_uaddr, len) } -probe syscall.gethostname.return = kernel.function("sys_gethostname").return ? { +probe syscall.gethostname.return = kernel.function("SyS_gethostname").return !, + kernel.function("sys_gethostname").return ? { name = "gethostname" retstr = returnstr(1) } @@ -1375,13 +1501,15 @@ probe syscall.gethostname.return = kernel.function("sys_gethostname").return ? { # getitimer __________________________________________________ # sys_getitimer(int which, struct itimerval __user *value) # -probe syscall.getitimer = kernel.function("sys_getitimer") { +probe syscall.getitimer = kernel.function("SyS_getitimer") !, + kernel.function("sys_getitimer") { name = "getitimer" which = $which value_uaddr = $value argstr = sprintf("%s, %p", _itimer_which_str($which), $value) } -probe syscall.getitimer.return = kernel.function("sys_getitimer").return { +probe syscall.getitimer.return = kernel.function("SyS_getitimer").return !, + kernel.function("sys_getitimer").return { name = "getitimer" retstr = returnstr(1) } @@ -1409,8 +1537,9 @@ probe syscall.compat_getitimer.return = kernel.function("compat_sys_getitimer"). # compat_ulong_t addr, compat_ulong_t flags) # probe syscall.get_mempolicy = - kernel.function("sys_get_mempolicy") ?, - kernel.function("compat_sys_get_mempolicy") ? + kernel.function("compat_sys_get_mempolicy") ?, + kernel.function("SyS_get_mempolicy") !, + kernel.function("sys_get_mempolicy") ? { name = "get_mempolicy" policy_uaddr = $policy @@ -1422,8 +1551,9 @@ probe syscall.get_mempolicy = $nmask, $maxnode, $addr, $flags) } probe syscall.get_mempolicy.return = - kernel.function("sys_get_mempolicy").return ?, - kernel.function("compat_sys_get_mempolicy").return ? + kernel.function("compat_sys_get_mempolicy").return ?, + kernel.function("SyS_get_mempolicy").return !, + kernel.function("sys_get_mempolicy").return ? { name = "get_mempolicy" retstr = returnstr(1) @@ -1432,26 +1562,30 @@ probe syscall.get_mempolicy.return = # getpeername ________________________________________________ # long sys_getpeername(int fd, struct sockaddr __user *usockaddr, int __user *usockaddr_len) # -probe syscall.getpeername = kernel.function("sys_getpeername") ? { +probe syscall.getpeername = kernel.function("SyS_getpeername") !, + kernel.function("sys_getpeername") ? { name = "getpeername" s = $fd name_uaddr = $usockaddr namelen_uaddr = $usockaddr_len argstr = sprintf("%d, %p, %p", $fd, $usockaddr, $usockaddr_len) } -probe syscall.getpeername.return = kernel.function("sys_getpeername").return ? { +probe syscall.getpeername.return = kernel.function("SyS_getpeername").return !, + kernel.function("sys_getpeername").return ? { name = "getpeername" retstr = returnstr(1) } # getpgid ____________________________________________________ # long sys_getpgid(pid_t pid) -probe syscall.getpgid = kernel.function("sys_getpgid") { +probe syscall.getpgid = kernel.function("SyS_getpgid") !, + kernel.function("sys_getpgid") { name = "getpgid" pid = $pid argstr = sprintf("%d", $pid) } -probe syscall.getpgid.return = kernel.function("sys_getpgid").return { +probe syscall.getpgid.return = kernel.function("SyS_getpgid").return !, + kernel.function("sys_getpgid").return { name = "getpgid" retstr = returnstr(1) } @@ -1491,13 +1625,15 @@ probe syscall.getppid.return = kernel.function("sys_getppid").return { # getpriority ________________________________________________ # long sys_getpriority(int which, int who) -probe syscall.getpriority = kernel.function("sys_getpriority") { +probe syscall.getpriority = kernel.function("SyS_getpriority") !, + kernel.function("sys_getpriority") { name = "getpriority" which = $which who = $who argstr = sprintf("%s, %d", _priority_which_str(which), who) } -probe syscall.getpriority.return = kernel.function("sys_getpriority").return { +probe syscall.getpriority.return = kernel.function("SyS_getpriority").return !, + kernel.function("sys_getpriority").return { name = "getpriority" retstr = returnstr(1) } @@ -1511,7 +1647,8 @@ probe syscall.getpriority.return = kernel.function("sys_getpriority").return { # old_uid_t __user *sgid) probe syscall.getresgid = kernel.function("sys_getresgid16") ?, - kernel.function("sys_getresgid") + kernel.function("SyS_getresgid") !, + kernel.function("sys_getresgid") { name = "getresgid" rgid_uaddr = $rgid @@ -1521,6 +1658,7 @@ probe syscall.getresgid = } probe syscall.getresgid.return = kernel.function("sys_getresgid16").return ?, + kernel.function("SyS_getresgid").return !, kernel.function("sys_getresgid").return { name = "getresgid" @@ -1533,6 +1671,7 @@ probe syscall.getresgid.return = # uid_t __user *suid) probe syscall.getresuid = kernel.function("sys_getresuid16") ?, + kernel.function("SyS_getresuid") !, kernel.function("sys_getresuid") { name = "getresuid" @@ -1543,7 +1682,8 @@ probe syscall.getresuid = } probe syscall.getresuid.return = kernel.function("sys_getresuid16").return ?, - kernel.function("sys_getresuid").return + kernel.function("SyS_getresuid").return !, + kernel.function("sys_getresuid").return { name = "getresuid" retstr = returnstr(1) @@ -1553,7 +1693,9 @@ probe syscall.getresuid.return = # long sys_getrlimit(unsigned int resource, struct rlimit __user *rlim) # long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim) # long compat_sys_getrlimit (unsigned int resource, struct compat_rlimit __user *rlim) -probe syscall.getrlimit = kernel.function("sys_getrlimit"), +probe syscall.getrlimit = kernel.function("SyS_getrlimit") ?, + kernel.function("sys_getrlimit") ?, + kernel.function("SyS_old_getrlimit") ?, kernel.function("sys_old_getrlimit") ?, kernel.function("compat_sys_getrlimit") ? { @@ -1562,7 +1704,9 @@ probe syscall.getrlimit = kernel.function("sys_getrlimit"), rlim_uaddr = $rlim argstr = sprintf("%s, %p", _rlimit_resource_str($resource), $rlim) } -probe syscall.getrlimit.return = kernel.function("sys_getrlimit").return, +probe syscall.getrlimit.return = kernel.function("SyS_getrlimit").return ?, + kernel.function("sys_getrlimit").return ?, + kernel.function("SyS_old_getrlimit").return ?, kernel.function("sys_old_getrlimit").return ?, kernel.function("compat_sys_getrlimit").return ? { @@ -1572,7 +1716,8 @@ probe syscall.getrlimit.return = kernel.function("sys_getrlimit").return, # getrusage __________________________________________________ # long sys_getrusage(int who, struct rusage __user *ru) -probe syscall.getrusage = kernel.function("sys_getrusage") { +probe syscall.getrusage = kernel.function("SyS_getrusage") !, + kernel.function("sys_getrusage") { name = "getrusage" who = $who if($who==-2) @@ -1587,19 +1732,22 @@ probe syscall.getrusage = kernel.function("sys_getrusage") { usage_uaddr = $ru argstr = sprintf("%s, %p", who_str, usage_uaddr) } -probe syscall.getrusage.return = kernel.function("sys_getrusage").return { +probe syscall.getrusage.return = kernel.function("SyS_getrusage").return !, + kernel.function("sys_getrusage").return { name = "getrusage" retstr = returnstr(1) } # getsid _____________________________________________________ # long sys_getsid(pid_t pid) -probe syscall.getsid = kernel.function("sys_getsid") { +probe syscall.getsid = kernel.function("SyS_getsid") !, + kernel.function("sys_getsid") { name = "getsid" pid = $pid argstr = sprint(pid) } -probe syscall.getsid.return = kernel.function("sys_getsid").return { +probe syscall.getsid.return = kernel.function("SyS_getsid").return !, + kernel.function("sys_getsid").return { name = "getsid" retstr = returnstr(1) } @@ -1608,14 +1756,16 @@ probe syscall.getsid.return = kernel.function("sys_getsid").return { # long sys_getsockname(int fd, # struct sockaddr __user *usockaddr, # int __user *usockaddr_len) -probe syscall.getsockname = kernel.function("sys_getsockname") ? { +probe syscall.getsockname = kernel.function("SyS_getsockname") !, + kernel.function("sys_getsockname") ? { name = "getsockname" s = $fd name_uaddr = $usockaddr namelen_uaddr = $usockaddr_len argstr = sprintf("%d, %p, %p", $fd, $usockaddr, $usockaddr_len) } -probe syscall.getsockname.return = kernel.function("sys_getsockname").return ? { +probe syscall.getsockname.return = kernel.function("SyS_getsockname").return !, + kernel.function("sys_getsockname").return ? { name = "getsockname" retstr = returnstr(1) } @@ -1628,8 +1778,9 @@ probe syscall.getsockname.return = kernel.function("sys_getsockname").return ? { # int __user *optlen) # probe syscall.getsockopt = - kernel.function("sys_getsockopt") ?, - kernel.function("compat_sys_getsockopt") ? + kernel.function("compat_sys_getsockopt") ?, + kernel.function("SyS_getsockopt") !, + kernel.function("sys_getsockopt") ? { name = "getsockopt" fd = $fd @@ -1643,8 +1794,9 @@ probe syscall.getsockopt = _sockopt_optname_str($optname), $optval, $optlen) } probe syscall.getsockopt.return = - kernel.function("sys_getsockopt").return ?, - kernel.function("compat_sys_getsockopt").return ? + kernel.function("compat_sys_getsockopt").return ?, + kernel.function("SyS_getsockopt").return !, + kernel.function("sys_getsockopt").return ? { name = "getsockopt" retstr = returnstr(1) @@ -1669,9 +1821,10 @@ probe syscall.gettid.return = kernel.function("sys_gettid").return { # long compat_sys_gettimeofday(struct compat_timeval __user *tv, # struct timezone __user *tz) probe syscall.gettimeofday = - kernel.function("sys_gettimeofday"), + kernel.function("compat_sys_gettimeofday") ?, kernel.function("sys32_gettimeofday") ?, - kernel.function("compat_sys_gettimeofday") ? + kernel.function("SyS_gettimeofday") !, + kernel.function("sys_gettimeofday") { name = "gettimeofday" tv_uaddr = $tv @@ -1680,9 +1833,10 @@ probe syscall.gettimeofday = } probe syscall.gettimeofday.return = - kernel.function("sys_gettimeofday").return, + kernel.function("compat_sys_gettimeofday").return ?, kernel.function("sys32_gettimeofday").return ?, - kernel.function("compat_sys_gettimeofday").return ? + kernel.function("SyS_gettimeofday").return !, + kernel.function("sys_gettimeofday").return { name = "gettimeofday" retstr = returnstr(1) @@ -1713,7 +1867,8 @@ probe syscall.getuid.return = # getxattr ___________________________________________________ # ssize_t sys_getxattr(char __user *path, char __user *name, # void __user *value, size_t size) -probe syscall.getxattr = kernel.function("sys_getxattr") { +probe syscall.getxattr = kernel.function("SyS_getxattr") !, + kernel.function("sys_getxattr") { name = "getxattr" %( kernel_v >= "2.6.27" %? path = user_string($pathname) @@ -1733,7 +1888,8 @@ probe syscall.getxattr = kernel.function("sys_getxattr") { user_string_quoted($name), value_uaddr, size) } -probe syscall.getxattr.return = kernel.function("sys_getxattr").return { +probe syscall.getxattr.return = kernel.function("SyS_getxattr").return !, + kernel.function("sys_getxattr").return { name = "getxattr" retstr = returnstr(1) } @@ -1743,14 +1899,16 @@ probe syscall.getxattr.return = kernel.function("sys_getxattr").return { # unsigned long len, # const char __user *uargs) # -probe syscall.init_module = kernel.function("sys_init_module") ? { +probe syscall.init_module = kernel.function("SyS_init_module") !, + kernel.function("sys_init_module") ? { name = "init_module" umod_uaddr = $umod len = $len uargs = user_string($uargs) argstr = sprintf("%p, %d, %s", $umod, $len, user_string_quoted($uargs)) } -probe syscall.init_module.return = kernel.function("sys_init_module").return ? { +probe syscall.init_module.return = kernel.function("SyS_init_module").return !, + kernel.function("sys_init_module").return ? { name = "init_module" retstr = returnstr(1) } @@ -1759,7 +1917,8 @@ probe syscall.init_module.return = kernel.function("sys_init_module").return ? { # # long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) # -probe syscall.inotify_add_watch = kernel.function("sys_inotify_add_watch") ? { +probe syscall.inotify_add_watch = kernel.function("SyS_inotify_add_watch") !, + kernel.function("sys_inotify_add_watch") ? { name = "inotify_add_watch" fd = $fd mask = $mask @@ -1774,7 +1933,8 @@ probe syscall.inotify_add_watch = kernel.function("sys_inotify_add_watch") ? { %) } -probe syscall.inotify_add_watch.return = kernel.function("sys_inotify_add_watch").return ? { +probe syscall.inotify_add_watch.return = kernel.function("SyS_inotify_add_watch").return !, + kernel.function("sys_inotify_add_watch").return ? { name = "inotify_add_watch" retstr = returnstr(1) } @@ -1796,13 +1956,15 @@ probe syscall.inotify_init.return = kernel.function("sys_inotify_init").return ? # # long sys_inotify_rm_watch(int fd, u32 wd) # -probe syscall.inotify_rm_watch = kernel.function("sys_inotify_rm_watch") ? { +probe syscall.inotify_rm_watch = kernel.function("SyS_inotify_rm_watch") !, + kernel.function("sys_inotify_rm_watch") ? { name = "inotify_rm_watch" fd = $fd wd = $wd argstr = sprintf("%d, %d", $fd, $wd) } -probe syscall.inotify_rm_watch.return = kernel.function("sys_inotify_rm_watch").return ? { +probe syscall.inotify_rm_watch.return = kernel.function("SyS_inotify_rm_watch").return !, + kernel.function("sys_inotify_rm_watch").return ? { name = "inotify_rm_watch" retstr = returnstr(1) } @@ -1811,14 +1973,16 @@ probe syscall.inotify_rm_watch.return = kernel.function("sys_inotify_rm_watch"). # long sys_io_cancel(aio_context_t ctx_id, # struct iocb __user *iocb, # struct io_event __user *result) -probe syscall.io_cancel = kernel.function("sys_io_cancel") { +probe syscall.io_cancel = kernel.function("SyS_io_cancel") !, + kernel.function("sys_io_cancel") { name = "io_cancel" ctx_id = $ctx_id iocb_uaddr = $iocb result_uaddr = $result argstr = sprintf("%d, %p, %p", ctx_id, iocb_uaddr, result_uaddr) } -probe syscall.io_cancel.return = kernel.function("sys_io_cancel").return { +probe syscall.io_cancel.return = kernel.function("SyS_io_cancel").return !, + kernel.function("sys_io_cancel").return { name = "io_cancel" retstr = returnstr(1) } @@ -1828,8 +1992,9 @@ probe syscall.io_cancel.return = kernel.function("sys_io_cancel").return { # long compat_sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) # probe syscall.ioctl = - kernel.function("sys_ioctl") ?, - kernel.function("compat_sys_ioctl") ? + kernel.function("compat_sys_ioctl") ?, + kernel.function("SyS_ioctl") !, + kernel.function("sys_ioctl") ? { name = "ioctl" fd = $fd @@ -1838,8 +2003,9 @@ probe syscall.ioctl = argstr = sprintf("%d, %d, %p", $fd, $cmd, $arg) } probe syscall.ioctl.return = - kernel.function("sys_ioctl").return ?, - kernel.function("compat_sys_ioctl").return ? + kernel.function("compat_sys_ioctl").return ?, + kernel.function("SyS_ioctl").return !, + kernel.function("sys_ioctl").return ? { name = "ioctl" retstr = returnstr(1) @@ -1847,12 +2013,14 @@ probe syscall.ioctl.return = # io_destroy _________________________________________________ # long sys_io_destroy(aio_context_t ctx) -probe syscall.io_destroy = kernel.function("sys_io_destroy") { +probe syscall.io_destroy = kernel.function("SyS_io_destroy") !, + kernel.function("sys_io_destroy") { name = "io_destroy" ctx = $ctx argstr = sprintf("%d", ctx) } -probe syscall.io_destroy.return = kernel.function("sys_io_destroy").return { +probe syscall.io_destroy.return = kernel.function("SyS_io_destroy").return !, + kernel.function("sys_io_destroy").return { name = "io_destroy" retstr = returnstr(1) } @@ -1870,8 +2038,9 @@ probe syscall.io_destroy.return = kernel.function("sys_io_destroy").return { # struct compat_timespec __user *timeout) # probe syscall.io_getevents = - kernel.function("sys_io_getevents") ?, - kernel.function("compat_sys_io_getevents") ? + kernel.function("compat_sys_io_getevents") ?, + kernel.function("SyS_io_getevents") !, + kernel.function("sys_io_getevents") ? { name = "io_getevents" ctx_id = $ctx_id @@ -1884,8 +2053,9 @@ probe syscall.io_getevents = $nr, $events, $timeout, timestr) } probe syscall.io_getevents.return = - kernel.function("sys_io_getevents").return ?, - kernel.function("compat_sys_io_getevents").return ? + kernel.function("compat_sys_io_getevents").return ?, + kernel.function("SyS_io_getevents").return !, + kernel.function("sys_io_getevents").return ? { name = "io_getevents" retstr = returnstr(1) @@ -1909,14 +2079,16 @@ probe syscall.ioperm.return = kernel.function("sys_ioperm").return ? { # io_setup ___________________________________________________ # long sys_io_setup(unsigned nr_events, aio_context_t __user *ctxp) # -probe syscall.io_setup = kernel.function("sys_io_setup") { +probe syscall.io_setup = kernel.function("SyS_io_setup") !, + kernel.function("sys_io_setup") { name = "io_setup" maxevents = $nr_events ctxp_uaddr = $ctxp argstr = sprintf("%d, %p", $nr_events, $ctxp) } -probe syscall.io_setup.return = kernel.function("sys_io_setup").return { +probe syscall.io_setup.return = kernel.function("SyS_io_setup").return !, + kernel.function("sys_io_setup").return { name = "io_setup" retstr = returnstr(1) } @@ -1937,14 +2109,16 @@ probe syscall.compat_io_setup.return = kernel.function("compat_sys_io_setup").re # io_submit __________________________________________________ # long sys_io_submit(aio_context_t ctx_id, long nr, struct iocb __user * __user *iocbpp) # -probe syscall.io_submit = kernel.function("sys_io_submit") { +probe syscall.io_submit = kernel.function("SyS_io_submit") !, + kernel.function("sys_io_submit") { name = "io_submit" ctx_id = $ctx_id nr = $nr iocbpp_uaddr = $iocbpp argstr = sprintf("%d, %d, %p", $ctx_id, $nr, $iocbpp) } -probe syscall.io_submit.return = kernel.function("sys_io_submit").return { +probe syscall.io_submit.return = kernel.function("SyS_io_submit").return !, + kernel.function("sys_io_submit").return { name = "io_submit" retstr = returnstr(1) } @@ -1965,13 +2139,15 @@ probe syscall.compat_io_submit.return = kernel.function("compat_sys_io_submit"). # ioprio_get _________________________________________________ # long sys_ioprio_get(int which, int who) # -probe syscall.ioprio_get = kernel.function("sys_ioprio_get") ? { +probe syscall.ioprio_get = kernel.function("SyS_ioprio_get") !, + kernel.function("sys_ioprio_get") ? { name = "ioprio_get" which = $which who = $who argstr = sprintf("%d, %d", $which, $who) } -probe syscall.ioprio_get.return = kernel.function("sys_ioprio_get").return ? { +probe syscall.ioprio_get.return = kernel.function("SyS_ioprio_get").return !, + kernel.function("sys_ioprio_get").return ? { name = "ioprio_get" retstr = returnstr(1) } @@ -1979,14 +2155,16 @@ probe syscall.ioprio_get.return = kernel.function("sys_ioprio_get").return ? { # ioprio_set _________________________________________________ # long sys_ioprio_set(int which, int who, int ioprio) # -probe syscall.ioprio_set = kernel.function("sys_ioprio_set") ? { +probe syscall.ioprio_set = kernel.function("SyS_ioprio_set") !, + kernel.function("sys_ioprio_set") ? { name = "ioprio_set" which = $which who = $who ioprio = $ioprio argstr = sprintf("%d, %d, %d", $which, $who, $ioprio) } -probe syscall.ioprio_set.return = kernel.function("sys_ioprio_set").return ? { +probe syscall.ioprio_set.return = kernel.function("SyS_ioprio_set").return !, + kernel.function("sys_ioprio_set").return ? { name = "ioprio_set" retstr = returnstr(1) } @@ -2002,8 +2180,9 @@ probe syscall.ioprio_set.return = kernel.function("sys_ioprio_set").return ? { # unsigned long flags) # probe syscall.kexec_load = - kernel.function("sys_kexec_load") ?, - kernel.function("compat_sys_kexec_load") ? + kernel.function("compat_sys_kexec_load") ?, + kernel.function("SyS_kexec_load") !, + kernel.function("sys_kexec_load") ? { name = "kexec_load" entry = $entry @@ -2013,8 +2192,9 @@ probe syscall.kexec_load = argstr = sprintf("%p, %d, %p, %d", $entry, $nr_segments, $segments, $flags) } probe syscall.kexec_load.return = - kernel.function("sys_kexec_load").return ?, - kernel.function("compat_sys_kexec_load").return ? + kernel.function("compat_sys_kexec_load").return ?, + kernel.function("SyS_kexec_load").return !, + kernel.function("sys_kexec_load").return ? { name = "kexec_load" retstr = returnstr(1) @@ -2029,16 +2209,18 @@ probe syscall.kexec_load.return = # long compat_sys_keyctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5) # probe syscall.keyctl = - kernel.function("sys_keyctl") ?, - kernel.function("compat_sys_keyctl") ? + kernel.function("compat_sys_keyctl") ?, + kernel.function("SyS_keyctl") !, + kernel.function("sys_keyctl") ? { name = "keyctl" argstr = sprintf("%d, ...", $option) } probe syscall.keyctl.return = - kernel.function("sys_keyctl").return ?, - kernel.function("compat_sys_keyctl").return ? + kernel.function("compat_sys_keyctl").return ?, + kernel.function("SyS_keyctl").return !, + kernel.function("sys_keyctl").return ? { name = "keyctl" retstr = returnstr(1) @@ -2046,13 +2228,15 @@ probe syscall.keyctl.return = # kill _______________________________________________________ # long sys_kill(int pid, int sig) -probe syscall.kill = kernel.function("sys_kill") { +probe syscall.kill = kernel.function("SyS_kill") !, + kernel.function("sys_kill") { name = "kill" pid = $pid sig = $sig argstr = sprintf("%d, %s", $pid, _signal_name($sig)) } -probe syscall.kill.return = kernel.function("sys_kill").return { +probe syscall.kill.return = kernel.function("SyS_kill").return !, + kernel.function("sys_kill").return { name = "kill" retstr = returnstr(1) } @@ -2060,14 +2244,16 @@ probe syscall.kill.return = kernel.function("sys_kill").return { # lchown _____________________________________________________ # long sys_lchown(const char __user * filename, uid_t user, gid_t group) # -probe syscall.lchown = kernel.function("sys_lchown") { +probe syscall.lchown = kernel.function("SyS_lchown") !, + kernel.function("sys_lchown") { name = "lchown" path = user_string($filename) owner = __int32($user) group = __int32($group) argstr = sprintf("%s, %d, %d",user_string_quoted($filename), owner, group) } -probe syscall.lchown.return = kernel.function("sys_lchown").return { +probe syscall.lchown.return = kernel.function("SyS_lchown").return !, + kernel.function("sys_lchown").return { name = "lchown" retstr = returnstr(1) } @@ -2094,7 +2280,8 @@ probe syscall.lchown16.return = kernel.function("sys_lchown16").return ? { # void __user *value, # size_t size) # -probe syscall.lgetxattr = kernel.function("sys_lgetxattr") { +probe syscall.lgetxattr = kernel.function("SyS_lgetxattr") !, + kernel.function("sys_lgetxattr") { name = "lgetxattr" %( kernel_v >= "2.6.27" %? path = user_string($pathname) @@ -2114,7 +2301,8 @@ probe syscall.lgetxattr = kernel.function("sys_lgetxattr") { user_string_quoted($name), value_uaddr, size) } -probe syscall.lgetxattr.return = kernel.function("sys_lgetxattr").return { +probe syscall.lgetxattr.return = kernel.function("SyS_lgetxattr").return !, + kernel.function("sys_lgetxattr").return { name = "lgetxattr" retstr = returnstr(1) } @@ -2122,7 +2310,8 @@ probe syscall.lgetxattr.return = kernel.function("sys_lgetxattr").return { # link _______________________________________________________ # long sys_link(const char __user * oldname, # const char __user * newname) -probe syscall.link = kernel.function("sys_link") { +probe syscall.link = kernel.function("SyS_link") !, + kernel.function("sys_link") { name = "link" oldpath = user_string($oldname) newpath = user_string($newname) @@ -2130,7 +2319,8 @@ probe syscall.link = kernel.function("sys_link") { user_string_quoted($oldname), user_string_quoted($newname)) } -probe syscall.link.return = kernel.function("sys_link").return { +probe syscall.link.return = kernel.function("SyS_link").return !, + kernel.function("sys_link").return { name = "link" retstr = returnstr(1) } @@ -2139,7 +2329,8 @@ probe syscall.link.return = kernel.function("sys_link").return { # new function with 2.6.16 # long sys_linkat(int olddfd, const char __user *oldname, # int newdfd, const char __user *newname, int flags) -probe syscall.linkat = kernel.function("sys_linkat") ? { +probe syscall.linkat = kernel.function("SyS_linkat") !, + kernel.function("sys_linkat") ? { name = "linkat" olddfd = $olddfd olddfd_str = _dfd_str($olddfd) @@ -2156,20 +2347,23 @@ probe syscall.linkat = kernel.function("sys_linkat") ? { newdfd_str, user_string_quoted($newname), flags_str) } -probe syscall.linkat.return = kernel.function("sys_linkat").return ? { +probe syscall.linkat.return = kernel.function("SyS_linkat").return !, + kernel.function("sys_linkat").return ? { name = "linkat" retstr = returnstr(1) } # listen _____________________________________________________ # long sys_listen(int fd, int backlog) -probe syscall.listen = kernel.function("sys_listen") ? { +probe syscall.listen = kernel.function("SyS_listen") !, + kernel.function("sys_listen") ? { name = "listen" sockfd = $fd backlog = $backlog argstr = sprintf("%d, %d", $fd, $backlog) } -probe syscall.listen.return = kernel.function("sys_listen").return ? { +probe syscall.listen.return = kernel.function("SyS_listen").return !, + kernel.function("sys_listen").return ? { name = "listen" retstr = returnstr(1) } @@ -2177,7 +2371,8 @@ probe syscall.listen.return = kernel.function("sys_listen").return ? { # listxattr __________________________________________________ # ssize_t sys_listxattr(char __user *path, char __user *list, size_t size) # -probe syscall.listxattr = kernel.function("sys_listxattr") { +probe syscall.listxattr = kernel.function("SyS_listxattr") !, + kernel.function("sys_listxattr") { name = "listxattr" list_uaddr = $list size = $size @@ -2191,7 +2386,8 @@ probe syscall.listxattr = kernel.function("sys_listxattr") { argstr = sprintf("%s, %p, %d", user_string_quoted($path), $list, $size) %) } -probe syscall.listxattr.return = kernel.function("sys_listxattr").return { +probe syscall.listxattr.return = kernel.function("SyS_listxattr").return !, + kernel.function("sys_listxattr").return { name = "listxattr" retstr = returnstr(1) } @@ -2199,7 +2395,8 @@ probe syscall.listxattr.return = kernel.function("sys_listxattr").return { # llistxattr _________________________________________________ # ssize_t sys_llistxattr(char __user *path, char __user *list, size_t size) # -probe syscall.llistxattr = kernel.function("sys_llistxattr") { +probe syscall.llistxattr = kernel.function("SyS_llistxattr") !, + kernel.function("sys_llistxattr") { name = "llistxattr" list_uaddr = $list size = $size @@ -2213,7 +2410,8 @@ probe syscall.llistxattr = kernel.function("sys_llistxattr") { argstr = sprintf("%s, %p, %d", user_string_quoted($path), $list, $size) %) } -probe syscall.llistxattr.return = kernel.function("sys_llistxattr").return { +probe syscall.llistxattr.return = kernel.function("SyS_llistxattr").return !, + kernel.function("sys_llistxattr").return { name = "llistxattr" retstr = returnstr(1) } @@ -2224,7 +2422,8 @@ probe syscall.llistxattr.return = kernel.function("sys_llistxattr").return { # unsigned long offset_low, # loff_t __user * result, # unsigned int origin) -probe syscall.llseek = kernel.function("sys_llseek") ? { +probe syscall.llseek = kernel.function("SyS_llseek") !, + kernel.function("sys_llseek") ? { name = "llseek" fd = $fd offset_high = $offset_high @@ -2235,7 +2434,8 @@ probe syscall.llseek = kernel.function("sys_llseek") ? { argstr = sprintf("%d, 0x%x, 0x%x, %p, %s", $fd, $offset_high, $offset_low, $result, whence_str) } -probe syscall.llseek.return = kernel.function("sys_llseek").return ? { +probe syscall.llseek.return = kernel.function("SyS_llseek").return !, + kernel.function("sys_llseek").return ? { name = "llseek" retstr = returnstr(1) } @@ -2243,14 +2443,16 @@ probe syscall.llseek.return = kernel.function("sys_llseek").return ? { # lookup_dcookie _____________________________________________ # long sys_lookup_dcookie(u64 cookie64, char __user * buf, size_t len) # -probe syscall.lookup_dcookie = kernel.function("sys_lookup_dcookie") ? { +probe syscall.lookup_dcookie = kernel.function("SyS_lookup_dcookie") !, + kernel.function("sys_lookup_dcookie") ? { name = "lookup_dcookie" cookie = $cookie64 buffer_uaddr = $buf len = $len argstr = sprintf("%d, %p, %d", $cookie64, $buf, $len) } -probe syscall.lookup_dcookie.return = kernel.function("sys_lookup_dcookie").return ? { +probe syscall.lookup_dcookie.return = kernel.function("SyS_lookup_dcookie").return !, + kernel.function("sys_lookup_dcookie").return ? { name = "lookup_dcookie" retstr = returnstr(1) } @@ -2258,7 +2460,8 @@ probe syscall.lookup_dcookie.return = kernel.function("sys_lookup_dcookie").retu # lremovexattr _______________________________________________ # long sys_lremovexattr(char __user *path, char __user *name) # -probe syscall.lremovexattr = kernel.function("sys_lremovexattr") { +probe syscall.lremovexattr = kernel.function("SyS_lremovexattr") !, + kernel.function("sys_lremovexattr") { name = "lremovexattr" name_uaddr = $name name2 = user_string($name) @@ -2272,14 +2475,16 @@ probe syscall.lremovexattr = kernel.function("sys_lremovexattr") { argstr = sprintf("%s, %s", user_string_quoted($path), user_string_quoted($name)) %) } -probe syscall.lremovexattr.return = kernel.function("sys_lremovexattr").return { +probe syscall.lremovexattr.return = kernel.function("SyS_lremovexattr").return !, + kernel.function("sys_lremovexattr").return { name = "lremovexattr" retstr = returnstr(1) } # lseek ______________________________________________________ # off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin) -probe syscall.lseek = kernel.function("sys_lseek") { +probe syscall.lseek = kernel.function("SyS_lseek") !, + kernel.function("sys_lseek") { name = "lseek" fildes = $fd # offset = __int32($offset) @@ -2288,7 +2493,8 @@ probe syscall.lseek = kernel.function("sys_lseek") { whence_str = _seek_whence_str($origin) argstr = sprintf("%d, %d, %s", $fd, offset, whence_str) } -probe syscall.lseek.return = kernel.function("sys_lseek").return { +probe syscall.lseek.return = kernel.function("SyS_lseek").return !, + kernel.function("sys_lseek").return { name = "lseek" retstr = returnstr(1) } @@ -2300,7 +2506,8 @@ probe syscall.lseek.return = kernel.function("sys_lseek").return { # size_t size, # int flags) # -probe syscall.lsetxattr = kernel.function("sys_lsetxattr") { +probe syscall.lsetxattr = kernel.function("SyS_lsetxattr") !, + kernel.function("sys_lsetxattr") { name = "lsetxattr" %( kernel_v >= "2.6.27" %? path_uaddr = $pathname @@ -2323,7 +2530,8 @@ probe syscall.lsetxattr = kernel.function("sys_lsetxattr") { user_string_quoted($name), value_uaddr, $size, $flags) } -probe syscall.lsetxattr.return = kernel.function("sys_lsetxattr").return { +probe syscall.lsetxattr.return = kernel.function("SyS_lsetxattr").return !, + kernel.function("sys_lsetxattr").return { name = "lsetxattr" retstr = returnstr(1) } @@ -2339,9 +2547,11 @@ probe syscall.lsetxattr.return = kernel.function("sys_lsetxattr").return { # probe syscall.lstat = kernel.function("sys_lstat") ?, + kernel.function("SyS_newlstat") ?, kernel.function("sys_newlstat") ?, kernel.function("compat_sys_newlstat") ?, kernel.function("sys32_lstat64") ?, + kernel.function("SyS_lstat64") ?, kernel.function("sys_lstat64") ?, kernel.function("sys_oabi_lstat64") ? { @@ -2352,9 +2562,11 @@ probe syscall.lstat = } probe syscall.lstat.return = kernel.function("sys_lstat").return ?, + kernel.function("SyS_newlstat").return ?, kernel.function("sys_newlstat").return ?, kernel.function("compat_sys_newlstat").return ?, kernel.function("sys32_lstat64").return ?, + kernel.function("SyS_lstat64").return ?, kernel.function("sys_lstat64").return ?, kernel.function("sys_oabi_lstat64").return ? { @@ -2365,7 +2577,8 @@ probe syscall.lstat.return = # madvise ____________________________________________________ # long sys_madvise(unsigned long start, size_t len_in, int behavior) # -probe syscall.madvise = kernel.function("sys_madvise") ? { +probe syscall.madvise = kernel.function("SyS_madvise") !, + kernel.function("sys_madvise") ? { name = "madvise" start = $start length = $len_in @@ -2373,7 +2586,8 @@ probe syscall.madvise = kernel.function("sys_madvise") ? { advice_str = _madvice_advice_str($behavior) argstr = sprintf("%p, %d, %s", $start, $len_in, _madvice_advice_str($behavior)) } -probe syscall.madvise.return = kernel.function("sys_madvise").return ? { +probe syscall.madvise.return = kernel.function("SyS_madvise").return !, + kernel.function("sys_madvise").return ? { name = "madvise" retstr = returnstr(1) } @@ -2394,8 +2608,9 @@ probe syscall.madvise.return = kernel.function("sys_madvise").return ? { # compat_ulong_t flags) # probe syscall.mbind = - kernel.function("sys_mbind") ?, - kernel.function("compat_sys_mbind") ? + kernel.function("compat_sys_mbind") ?, + kernel.function("SyS_mbind") !, + kernel.function("sys_mbind") ? { name = "mbind" start = $start @@ -2408,8 +2623,9 @@ probe syscall.mbind = $nmask, $maxnode, $flags) } probe syscall.mbind.return = - kernel.function("sys_mbind").return ?, - kernel.function("compat_sys_mbind").return ? + kernel.function("compat_sys_mbind").return ?, + kernel.function("SyS_mbind").return !, + kernel.function("sys_mbind").return ? { name = "mbind" retstr = returnstr(1) @@ -2419,11 +2635,13 @@ probe syscall.mbind.return = # long sys_migrate_pages(pid_t pid, unsigned long maxnode, # const unsigned long __user *old_nodes, # const unsigned long __user *new_nodes) -probe syscall.migrate_pages = kernel.function("sys_migrate_pages") ? { +probe syscall.migrate_pages = kernel.function("SyS_migrate_pages") !, + kernel.function("sys_migrate_pages") ? { name = "migrate_pages" argstr = sprintf("%d, %d, %p, %p", $pid, $maxnode, $old_nodes, $new_nodes) } -probe syscall.migrate_pages.return = kernel.function("sys_migrate_pages").return ? { +probe syscall.migrate_pages.return = kernel.function("SyS_migrate_pages").return !, + kernel.function("sys_migrate_pages").return ? { name = "migrate_pages" retstr = returnstr(1) } @@ -2431,28 +2649,32 @@ probe syscall.migrate_pages.return = kernel.function("sys_migrate_pages").return # mincore ____________________________________________________ # long sys_mincore(unsigned long start, size_t len, unsigned char __user * vec) # -probe syscall.mincore = kernel.function("sys_mincore") ? { +probe syscall.mincore = kernel.function("SyS_mincore") !, + kernel.function("sys_mincore") ? { name = "mincore" start = $start length = $len vec_uaddr = $vec argstr = sprintf("%p, %d, %p", $start, $len, $vec) } -probe syscall.mincore.return = kernel.function("sys_mincore").return ? { +probe syscall.mincore.return = kernel.function("SyS_mincore").return !, + kernel.function("sys_mincore").return ? { name = "mincore" retstr = returnstr(1) } # mkdir ______________________________________________________ # long sys_mkdir(const char __user * pathname, int mode) -probe syscall.mkdir = kernel.function("sys_mkdir") { +probe syscall.mkdir = kernel.function("SyS_mkdir") !, + kernel.function("sys_mkdir") { name = "mkdir" pathname_uaddr = $pathname pathname = user_string($pathname) mode = $mode argstr = sprintf("%s, %#o", user_string_quoted($pathname), $mode) } -probe syscall.mkdir.return = kernel.function("sys_mkdir").return { +probe syscall.mkdir.return = kernel.function("SyS_mkdir").return !, + kernel.function("sys_mkdir").return { name = "mkdir" retstr = returnstr(1) } @@ -2460,21 +2682,24 @@ probe syscall.mkdir.return = kernel.function("sys_mkdir").return { # mkdirat ____________________________________________________ # new function with 2.6.16 # long sys_mkdirat(int dfd, const char __user *pathname, int mode) -probe syscall.mkdirat = kernel.function("sys_mkdirat") ? { +probe syscall.mkdirat = kernel.function("SyS_mkdirat") !, + kernel.function("sys_mkdirat") ? { name = "mkdirat" dirfd = $dfd pathname = user_string($pathname) mode = $mode argstr = sprintf("%s, %s, %#o", _dfd_str($dfd), user_string_quoted($pathname), $mode) } -probe syscall.mkdirat.return = kernel.function("sys_mkdirat").return ? { +probe syscall.mkdirat.return = kernel.function("SyS_mkdirat").return !, + kernel.function("sys_mkdirat").return ? { name = "mkdirat" retstr = returnstr(1) } # mknod # long sys_mknod(const char __user * filename, int mode, unsigned dev) -probe syscall.mknod = kernel.function("sys_mknod") { +probe syscall.mknod = kernel.function("SyS_mknod") !, + kernel.function("sys_mknod") { name = "mknod" pathname = user_string($filename) mode = $mode @@ -2482,7 +2707,8 @@ probe syscall.mknod = kernel.function("sys_mknod") { argstr = sprintf("%s, %s, %p", user_string_quoted($filename), _mknod_mode_str($mode), dev) } -probe syscall.mknod.return = kernel.function("sys_mknod").return { +probe syscall.mknod.return = kernel.function("SyS_mknod").return !, + kernel.function("sys_mknod").return { name = "mknod" retstr = returnstr(1) } @@ -2491,7 +2717,8 @@ probe syscall.mknod.return = kernel.function("sys_mknod").return { # new function with 2.6.16 # long sys_mknodat(int dfd, const char __user *filename, # int mode, unsigned dev) -probe syscall.mknodat = kernel.function("sys_mknodat") ? { +probe syscall.mknodat = kernel.function("SyS_mknodat") !, + kernel.function("sys_mknodat") ? { name = "mknodat" dfd = $dfd dfd_str = _dfd_str($dfd) @@ -2503,7 +2730,8 @@ probe syscall.mknodat = kernel.function("sys_mknodat") ? { argstr = sprintf("%s, %s, %s, %p", dfd_str, user_string_quoted($filename), mode_str, $dev) } -probe syscall.mknodat.return = kernel.function("sys_mknodat").return ? { +probe syscall.mknodat.return = kernel.function("SyS_mknodat").return !, + kernel.function("sys_mknodat").return ? { name = "mknodat" retstr = returnstr(1) } @@ -2512,13 +2740,15 @@ probe syscall.mknodat.return = kernel.function("sys_mknodat").return ? { # # long sys_mlock(unsigned long start, size_t len) # -probe syscall.mlock = kernel.function("sys_mlock") ? { +probe syscall.mlock = kernel.function("SyS_mlock") !, + kernel.function("sys_mlock") ? { name = "mlock" addr = $start len = $len argstr = sprintf("%p, %d", $start, $len) } -probe syscall.mlock.return = kernel.function("sys_mlock").return ? { +probe syscall.mlock.return = kernel.function("SyS_mlock").return !, + kernel.function("sys_mlock").return ? { name = "mlock" retstr = returnstr(1) } @@ -2526,12 +2756,14 @@ probe syscall.mlock.return = kernel.function("sys_mlock").return ? { # # long sys_mlockall(int flags) # -probe syscall.mlockall = kernel.function("sys_mlockall") ? { +probe syscall.mlockall = kernel.function("SyS_mlockall") !, + kernel.function("sys_mlockall") ? { name = "mlockall" flags = $flags argstr = _mlockall_flags_str($flags) } -probe syscall.mlockall.return = kernel.function("sys_mlockall").return ? { +probe syscall.mlockall.return = kernel.function("SyS_mlockall").return !, + kernel.function("sys_mlockall").return ? { name = "mlockall" retstr = returnstr(1) } @@ -2565,15 +2797,17 @@ probe syscall.modify_ldt.return = kernel.function("sys_modify_ldt").return ? { # int flags) # probe syscall.move_pages = - kernel.function("sys_move_pages") ?, - kernel.function("compat_sys_move_pages") ? + kernel.function("compat_sys_move_pages") ?, + kernel.function("SyS_move_pages") !, + kernel.function("sys_move_pages") ? { name = "move_pages" argstr = sprintf("%d, %d, %p, %p, 0x%x", $pid, $nr_pages, $nodes, $status, $flags) } probe syscall.move_pages.return = - kernel.function("sys_move_pages").return ?, - kernel.function("compat_sys_move_pages").return ? + kernel.function("compat_sys_move_pages").return ?, + kernel.function("SyS_move_pages").return !, + kernel.function("sys_move_pages").return ? { name = "move_pages" retstr = returnstr(1) @@ -2591,8 +2825,9 @@ probe syscall.move_pages.return = # unsigned long flags, # void __user * data) probe syscall.mount = - kernel.function("sys_mount"), - kernel.function("compat_sys_mount") ? + kernel.function("compat_sys_mount") ?, + kernel.function("SyS_mount") !, + kernel.function("sys_mount") { name = "mount" source = user_string($dev_name) @@ -2608,8 +2843,9 @@ probe syscall.mount = mountflags_str, data) } probe syscall.mount.return = - kernel.function("sys_mount").return, - kernel.function("compat_sys_mount").return ? + kernel.function("compat_sys_mount").return ?, + kernel.function("SyS_mount").return !, + kernel.function("sys_mount").return { name = "mount" retstr = returnstr(1) @@ -2618,7 +2854,8 @@ probe syscall.mount.return = # mprotect ___________________________________________________ # long sys_mprotect(unsigned long start, size_t len, unsigned long prot) # -probe syscall.mprotect = kernel.function("sys_mprotect") ? { +probe syscall.mprotect = kernel.function("SyS_mprotect") !, + kernel.function("sys_mprotect") ? { name = "mprotect" addr = $start len = $len @@ -2626,7 +2863,8 @@ probe syscall.mprotect = kernel.function("sys_mprotect") ? { prot_str = _mprotect_prot_str($prot) argstr = sprintf("%p, %d, %s", $start, $len, _mprotect_prot_str($prot)) } -probe syscall.mprotect.return = kernel.function("sys_mprotect").return ? { +probe syscall.mprotect.return = kernel.function("SyS_mprotect").return !, + kernel.function("sys_mprotect").return ? { name = "mprotect" retstr = returnstr(1) } @@ -2640,8 +2878,9 @@ probe syscall.mprotect.return = kernel.function("sys_mprotect").return ? { # struct compat_mq_attr __user *u_omqstat) # probe syscall.mq_getsetattr = - kernel.function("sys_mq_getsetattr") ?, - kernel.function("compat_sys_mq_getsetattr") ? + kernel.function("compat_sys_mq_getsetattr") ?, + kernel.function("SyS_mq_getsetattr") !, + kernel.function("sys_mq_getsetattr") ? { name = "mq_getsetattr" mqdes = $mqdes @@ -2650,8 +2889,9 @@ probe syscall.mq_getsetattr = argstr = sprintf("%d, %p, %p", $mqdes, $u_mqstat, $u_omqstat) } probe syscall.mq_getsetattr.return = - kernel.function("sys_mq_getsetattr").return ?, - kernel.function("compat_sys_mq_getsetattr").return ? + kernel.function("compat_sys_mq_getsetattr").return ?, + kernel.function("SyS_mq_getsetattr").return !, + kernel.function("sys_mq_getsetattr").return ? { name = "mq_getsetattr" retstr = returnstr(1) @@ -2662,8 +2902,9 @@ probe syscall.mq_getsetattr.return = # long compat_sys_mq_notify(mqd_t mqdes, const struct compat_sigevent __user *u_notification) # probe syscall.mq_notify = - kernel.function("sys_mq_notify") ?, - kernel.function("compat_sys_mq_notify") ? + kernel.function("compat_sys_mq_notify") ?, + kernel.function("SyS_mq_notify") !, + kernel.function("sys_mq_notify") ? { name = "mq_notify" mqdes = $mqdes @@ -2671,8 +2912,9 @@ probe syscall.mq_notify = argstr = sprintf("%d, %p", $mqdes, $u_notification) } probe syscall.mq_notify.return = - kernel.function("sys_mq_notify").return ?, - kernel.function("compat_sys_mq_notify").return ? + kernel.function("compat_sys_mq_notify").return ?, + kernel.function("SyS_mq_notify").return !, + kernel.function("sys_mq_notify").return ? { name = "mq_notify" retstr = returnstr(1) @@ -2688,8 +2930,9 @@ probe syscall.mq_notify.return = # struct compat_mq_attr __user *u_attr) # probe syscall.mq_open = - kernel.function("sys_mq_open") ?, - kernel.function("compat_sys_mq_open") ? + kernel.function("compat_sys_mq_open") ?, + kernel.function("SyS_mq_open") !, + kernel.function("sys_mq_open") ? { name = "mq_open" name_uaddr = $u_name @@ -2704,8 +2947,9 @@ probe syscall.mq_open = argstr = sprintf("%s, %s", user_string_quoted($u_name), _sys_open_flag_str($oflag)) } probe syscall.mq_open.return = - kernel.function("sys_mq_open").return ?, - kernel.function("compat_sys_mq_open").return ? + kernel.function("compat_sys_mq_open").return ?, + kernel.function("SyS_mq_open").return !, + kernel.function("sys_mq_open").return ? { name = "mq_open" retstr = returnstr(1) @@ -2723,8 +2967,9 @@ probe syscall.mq_open.return = # const struct compat_timespec __user *u_abs_timeout) # probe syscall.mq_timedreceive = - kernel.function("sys_mq_timedreceive") ?, - kernel.function("compat_sys_mq_timedreceive") ? + kernel.function("compat_sys_mq_timedreceive") ?, + kernel.function("SyS_mq_timedreceive") !, + kernel.function("sys_mq_timedreceive") ? { name = "mq_timedreceive" mqdes = $mqdes @@ -2736,8 +2981,9 @@ probe syscall.mq_timedreceive = $u_msg_prio, $u_abs_timeout) } probe syscall.mq_timedreceive.return = - kernel.function("sys_mq_timedreceive").return ?, - kernel.function("compat_sys_mq_timedreceive").return ? + kernel.function("compat_sys_mq_timedreceive").return ?, + kernel.function("SyS_mq_timedreceive").return !, + kernel.function("sys_mq_timedreceive").return ? { name = "mq_timedreceive" retstr = returnstr(1) @@ -2755,8 +3001,9 @@ probe syscall.mq_timedreceive.return = # const struct compat_timespec __user *u_abs_timeout) # probe syscall.mq_timedsend = - kernel.function("sys_mq_timedsend") ?, - kernel.function("compat_sys_mq_timedsend") ? + kernel.function("compat_sys_mq_timedsend") ?, + kernel.function("SyS_mq_timedsend") !, + kernel.function("sys_mq_timedsend") ? { name = "mq_timedsend" mqdes = $mqdes @@ -2768,8 +3015,9 @@ probe syscall.mq_timedsend = $msg_prio, $u_abs_timeout) } probe syscall.mq_timedsend.return = - kernel.function("sys_mq_timedsend").return ?, - kernel.function("compat_sys_mq_timedsend").return ? + kernel.function("compat_sys_mq_timedsend").return ?, + kernel.function("SyS_mq_timedsend").return !, + kernel.function("sys_mq_timedsend").return ? { name = "mq_timedsend" retstr = returnstr(1) @@ -2778,13 +3026,15 @@ probe syscall.mq_timedsend.return = # mq_unlink __________________________________________________ # long sys_mq_unlink(const char __user *u_name) # -probe syscall.mq_unlink = kernel.function("sys_mq_unlink") ? { +probe syscall.mq_unlink = kernel.function("SyS_mq_unlink") !, + kernel.function("sys_mq_unlink") ? { name = "mq_unlink" u_name_uaddr = $u_name u_name = user_string($u_name) argstr = user_string_quoted($u_name) } -probe syscall.mq_unlink.return = kernel.function("sys_mq_unlink").return ? { +probe syscall.mq_unlink.return = kernel.function("SyS_mq_unlink").return !, + kernel.function("sys_mq_unlink").return ? { name = "mq_unlink" retstr = returnstr(1) } @@ -2797,8 +3047,9 @@ probe syscall.mq_unlink.return = kernel.function("sys_mq_unlink").return ? { # unsigned long new_addr) # probe syscall.mremap = - kernel.function("sys_mremap") ?, - kernel.function("ia64_mremap") ? + kernel.function("ia64_mremap") ?, + kernel.function("SyS_mremap") !, + kernel.function("sys_mremap") ? { name = "mremap" old_address = $addr @@ -2810,8 +3061,9 @@ probe syscall.mremap = _mremap_flags($flags), $new_addr) } probe syscall.mremap.return = - kernel.function("sys_mremap").return ?, - kernel.function("ia64_mremap").return ? + kernel.function("ia64_mremap").return ?, + kernel.function("SyS_mremap").return !, + kernel.function("sys_mremap").return ? { name = "mremap" retstr = returnstr(2) @@ -2820,14 +3072,16 @@ probe syscall.mremap.return = # msgctl _____________________________________________________ # long sys_msgctl (int msqid, int cmd, struct msqid_ds __user *buf) # -probe syscall.msgctl = kernel.function("sys_msgctl") ? { +probe syscall.msgctl = kernel.function("SyS_msgctl") !, + kernel.function("sys_msgctl") ? { name = "msgctl" msqid = $msqid cmd = $cmd buf_uaddr = $buf argstr = sprintf("%d, %d, %p", $msqid, $cmd, $buf) } -probe syscall.msgctl.return = kernel.function("sys_msgctl").return ? { +probe syscall.msgctl.return = kernel.function("SyS_msgctl").return !, + kernel.function("sys_msgctl").return ? { name = "msgctl" retstr = returnstr(1) } @@ -2847,14 +3101,16 @@ probe syscall.compat_sys_msgctl.return = kernel.function("compat_sys_msgctl").re # msgget _____________________________________________________ # long sys_msgget (key_t key, int msgflg) # -probe syscall.msgget = kernel.function("sys_msgget") ? { +probe syscall.msgget = kernel.function("SyS_msgget") !, + kernel.function("sys_msgget") ? { name = "msgget" key = $key msgflg = $msgflg msgflg_str = _sys_open_flag_str($msgflg) argstr = sprintf("%d, %s", $key, _sys_open_flag_str($msgflg)) } -probe syscall.msgget.return = kernel.function("sys_msgget").return ? { +probe syscall.msgget.return = kernel.function("SyS_msgget").return !, + kernel.function("sys_msgget").return ? { name = "msgget" retstr = returnstr(1) } @@ -2866,7 +3122,8 @@ probe syscall.msgget.return = kernel.function("sys_msgget").return ? { # long msgtyp, # int msgflg) # -probe syscall.msgrcv = kernel.function("sys_msgrcv") ? { +probe syscall.msgrcv = kernel.function("SyS_msgrcv") !, + kernel.function("sys_msgrcv") ? { name = "msgrcv" msqid = $msqid msgp_uaddr = $msgp @@ -2875,7 +3132,8 @@ probe syscall.msgrcv = kernel.function("sys_msgrcv") ? { msgflg = $msgflg argstr = sprintf("%d, %p, %d, %d, %d", $msqid, $msgp, $msgsz, $msgtyp, $msgflg) } -probe syscall.msgrcv.return = kernel.function("sys_msgrcv").return ? { +probe syscall.msgrcv.return = kernel.function("SyS_msgrcv").return !, + kernel.function("sys_msgrcv").return ? { name = "msgrcv" retstr = returnstr(1) } @@ -2899,7 +3157,8 @@ probe syscall.compat_sys_msgrcv.return = kernel.function("compat_sys_msgrcv").re # size_t msgsz, # int msgflg) # -probe syscall.msgsnd = kernel.function("sys_msgsnd") ? { +probe syscall.msgsnd = kernel.function("SyS_msgsnd") !, + kernel.function("sys_msgsnd") ? { name = "msgsnd" msqid = $msqid msgp_uaddr = $msgp @@ -2907,7 +3166,8 @@ probe syscall.msgsnd = kernel.function("sys_msgsnd") ? { msgflg = $msgflg argstr = sprintf("%d, %p, %d, %d", $msqid, $msgp, $msgsz, $msgflg) } -probe syscall.msgsnd.return = kernel.function("sys_msgsnd").return ? { +probe syscall.msgsnd.return = kernel.function("SyS_msgsnd").return !, + kernel.function("sys_msgsnd").return ? { name = "msgsnd" retstr = returnstr(1) } @@ -2926,27 +3186,31 @@ probe syscall.compat_sys_msgsnd.return = kernel.function("compat_sys_msgsnd").re # msync ______________________________________________________ # long sys_msync(unsigned long start, size_t len, int flags) -probe syscall.msync = kernel.function("sys_msync") ? { +probe syscall.msync = kernel.function("SyS_msync") !, + kernel.function("sys_msync") ? { name = "msync" start = $start length = $len flags = $flags argstr = sprintf("%p, %d, %s",start, length, _msync_flag_str(flags)) } -probe syscall.msync.return = kernel.function("sys_msync").return ? { +probe syscall.msync.return = kernel.function("SyS_msync").return !, + kernel.function("sys_msync").return ? { name = "msync" retstr = returnstr(1) } # munlock ____________________________________________________ # long sys_munlock(unsigned long start, size_t len) -probe syscall.munlock = kernel.function("sys_munlock") ? { +probe syscall.munlock = kernel.function("SyS_munlock") !, + kernel.function("sys_munlock") ? { name = "munlock" addr = $start len = $len argstr = sprintf("%p, %d", addr, len) } -probe syscall.munlock.return = kernel.function("sys_munlock").return ? { +probe syscall.munlock.return = kernel.function("SyS_munlock").return !, + kernel.function("sys_munlock").return ? { name = "munlock" retstr = returnstr(1) } @@ -2964,13 +3228,15 @@ probe syscall.munlockall.return = kernel.function("sys_munlockall").return ? { # munmap _____________________________________________________ # long sys_munmap(unsigned long addr, size_t len) -probe syscall.munmap = kernel.function("sys_munmap") { +probe syscall.munmap = kernel.function("SyS_munmap") !, + kernel.function("sys_munmap") { name = "munmap" start = $addr length = $len argstr = sprintf("%p, %d", start, length) } -probe syscall.munmap.return = kernel.function("sys_munmap").return { +probe syscall.munmap.return = kernel.function("SyS_munmap").return !, + kernel.function("sys_munmap").return { name = "munmap" retstr = returnstr(1) } diff --git a/tapset/syscalls2.stp b/tapset/syscalls2.stp index 3b592e14..65bcf9bf 100644 --- a/tapset/syscalls2.stp +++ b/tapset/syscalls2.stp @@ -28,13 +28,15 @@ # long compat_sys_nanosleep(struct compat_timespec __user *rqtp, # struct compat_timespec __user *rmtp) # -probe syscall.nanosleep = kernel.function("sys_nanosleep") { +probe syscall.nanosleep = kernel.function("SyS_nanosleep") !, + kernel.function("sys_nanosleep") { name = "nanosleep" req_uaddr = $rqtp rem_uaddr = $rmtp argstr = sprintf("%s, %p", _struct_timespec_u($rqtp,1), $rmtp) } -probe syscall.nanosleep.return = kernel.function("sys_nanosleep").return { +probe syscall.nanosleep.return = kernel.function("SyS_nanosleep").return !, + kernel.function("sys_nanosleep").return { name = "nanosleep" retstr = returnstr(1) } @@ -76,12 +78,14 @@ probe syscall.nfsservctl.return = # nice _______________________________________________________ # long sys_nice(int increment) # -probe syscall.nice = kernel.function("sys_nice") ? { +probe syscall.nice = kernel.function("SyS_nice") !, + kernel.function("sys_nice") ? { name = "nice" inc = $increment argstr = sprintf("%d", $increment) } -probe syscall.nice.return = kernel.function("sys_nice").return ? { +probe syscall.nice.return = kernel.function("SyS_nice").return !, + kernel.function("sys_nice").return ? { name = "nice" retstr = returnstr(1) } @@ -104,9 +108,10 @@ probe syscall.ni_syscall.return = kernel.function("sys_ni_syscall").return { # (obsolete) long sys32_open(const char * filename, int flags, int mode) # probe syscall.open = - kernel.function("sys_open") ?, kernel.function("compat_sys_open") ?, - kernel.function("sys32_open") ? + kernel.function("sys32_open") ?, + kernel.function("SyS_open") !, + kernel.function("sys_open") ? { name = "open" filename = user_string($filename) @@ -120,9 +125,10 @@ probe syscall.open = _sys_open_flag_str($flags)) } probe syscall.open.return = - kernel.function("sys_open").return ?, kernel.function("compat_sys_open").return ?, - kernel.function("sys32_open").return ? + kernel.function("sys32_open").return ?, + kernel.function("SyS_open").return !, + kernel.function("sys_open").return ? { name = "open" retstr = returnstr(1) @@ -133,8 +139,9 @@ probe syscall.open.return = # long compat_sys_openat(unsigned int dfd, const char __user *filename, int flags, int mode) # probe syscall.openat = - kernel.function("sys_openat") ?, - kernel.function("compat_sys_openat") ? + kernel.function("compat_sys_openat") ?, + kernel.function("SyS_openat") !, + kernel.function("sys_openat") ? { name = "openat" filename = user_string($filename) @@ -150,8 +157,9 @@ probe syscall.openat = _sys_open_flag_str($flags)) } probe syscall.openat.return = - kernel.function("sys_openat").return ?, - kernel.function("compat_sys_openat").return ? + kernel.function("compat_sys_openat").return ?, + kernel.function("SyS_openat").return !, + kernel.function("sys_openat").return ? { name = "openat" retstr = returnstr(1) @@ -251,12 +259,14 @@ probe syscall.pause.return = kernel.function("sys_pause").return ?, # asmlinkage long # sys_personality(u_long personality) # -probe syscall.personality = kernel.function("sys_personality") { +probe syscall.personality = kernel.function("SyS_personality") !, + kernel.function("sys_personality") { name = "personality" persona = $personality argstr = sprintf("%p", persona); } -probe syscall.personality.return = kernel.function("sys_personality").return { +probe syscall.personality.return = kernel.function("SyS_personality").return !, + kernel.function("sys_personality").return { name = "personality" retstr = returnstr(1) } @@ -267,12 +277,14 @@ probe syscall.personality.return = kernel.function("sys_personality").return { # %(arch == "x86_64" %? # x86_64 gcc 4.1 problem -probe syscall.pipe = kernel.function("sys_pipe") { +probe syscall.pipe = kernel.function("SyS_pipe") !, + kernel.function("sys_pipe") { name = "pipe" argstr = "" } %: -probe syscall.pipe = kernel.function("sys_pipe") { +probe syscall.pipe = kernel.function("SyS_pipe") !, + kernel.function("sys_pipe") { name = "pipe" %( arch == "ia64" %? # ia64 just returns value directly, no fildes argument @@ -283,7 +295,8 @@ probe syscall.pipe = kernel.function("sys_pipe") { %) } %) -probe syscall.pipe.return = kernel.function("sys_pipe").return { +probe syscall.pipe.return = kernel.function("SyS_pipe").return !, + kernel.function("sys_pipe").return { name = "pipe" retstr = returnstr(1) } @@ -292,14 +305,16 @@ probe syscall.pipe.return = kernel.function("sys_pipe").return { # # long sys_pivot_root(const char __user *new_root, const char __user *put_old) # -probe syscall.pivot_root = kernel.function("sys_pivot_root") { +probe syscall.pivot_root = kernel.function("SyS_pivot_root") !, + kernel.function("sys_pivot_root") { name = "pivot_root" new_root_str = user_string($new_root) old_root_str = user_string($put_old) argstr = sprintf("%s, %s", user_string_quoted($new_root), user_string_quoted($put_old)) } -probe syscall.pivot_root.return = kernel.function("sys_pivot_root").return { +probe syscall.pivot_root.return = kernel.function("SyS_pivot_root").return !, + kernel.function("sys_pivot_root").return { name = "pivot_root" retstr = returnstr(1) } @@ -308,7 +323,8 @@ probe syscall.pivot_root.return = kernel.function("sys_pivot_root").return { # # long sys_poll(struct pollfd __user * ufds, unsigned int nfds, long timeout) # -probe syscall.poll = kernel.function("sys_poll") { +probe syscall.poll = kernel.function("SyS_poll") !, + kernel.function("sys_poll") { name = "poll" ufds_uaddr = $ufds nfds = $nfds @@ -319,7 +335,8 @@ probe syscall.poll = kernel.function("sys_poll") { %) argstr = sprintf("%p, %d, %d", $ufds, $nfds, timeout) } -probe syscall.poll.return = kernel.function("sys_poll").return { +probe syscall.poll.return = kernel.function("SyS_poll").return !, + kernel.function("sys_poll").return { name = "poll" retstr = returnstr(1) } @@ -330,7 +347,8 @@ probe syscall.poll.return = kernel.function("sys_poll").return { # struct timespec __user *tsp, const sigset_t __user *sigmask, # size_t sigsetsize) # -probe syscall.ppoll = kernel.function("sys_ppoll") ? { +probe syscall.ppoll = kernel.function("SyS_ppoll") !, + kernel.function("sys_ppoll") ? { name = "ppoll" argstr = sprintf("%p, %d, %s, %p, %d", $ufds, @@ -339,7 +357,8 @@ probe syscall.ppoll = kernel.function("sys_ppoll") ? { $sigmask, $sigsetsize) } -probe syscall.ppoll.return = kernel.function("sys_ppoll").return ? { +probe syscall.ppoll.return = kernel.function("SyS_ppoll").return !, + kernel.function("sys_ppoll").return ? { name = "ppoll" retstr = returnstr(1) } @@ -370,7 +389,8 @@ probe syscall.compat_ppoll.return = kernel.function("compat_sys_ppoll").return ? # unsigned long arg4, # unsigned long arg5) # -probe syscall.prctl = kernel.function("sys_prctl") { +probe syscall.prctl = kernel.function("SyS_prctl") !, + kernel.function("sys_prctl") { name = "prctl" option = $option arg2 = $arg2 @@ -380,7 +400,8 @@ probe syscall.prctl = kernel.function("sys_prctl") { argstr = sprintf("%p, %p, %p, %p, %p", option, arg2, arg3, arg4, arg5) } -probe syscall.prctl.return = kernel.function("sys_prctl").return { +probe syscall.prctl.return = kernel.function("SyS_prctl").return !, + kernel.function("sys_prctl").return { name = "prctl" retstr = returnstr(1) } @@ -391,7 +412,8 @@ probe syscall.prctl.return = kernel.function("sys_prctl").return { # size_t count, # loff_t pos) # -probe syscall.pread = kernel.function("sys_pread64") { +probe syscall.pread = kernel.function("SyS_pread64") !, + kernel.function("sys_pread64") { name = "pread" fd = $fd buf_uaddr = $buf @@ -399,7 +421,8 @@ probe syscall.pread = kernel.function("sys_pread64") { offset = $pos argstr = sprintf("%d, %p, %d, %d", $fd, $buf, $count, $pos) } -probe syscall.pread.return = kernel.function("sys_pread64").return { +probe syscall.pread.return = kernel.function("SyS_pread64").return !, + kernel.function("sys_pread64").return { name = "pread" retstr = returnstr(1) } @@ -409,12 +432,14 @@ probe syscall.pread.return = kernel.function("sys_pread64").return { # long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, # fd_set __user *exp, struct timespec __user *tsp, void __user *sig) # -probe syscall.pselect6 = kernel.function("sys_pselect6") ? { +probe syscall.pselect6 = kernel.function("SyS_pselect6") !, + kernel.function("sys_pselect6") ? { name = "pselect6" argstr = sprintf("%d, %p, %p, %p, %s, %p", $n, $inp, $outp, $exp, _struct_timespec_u($tsp,1), $sig) } -probe syscall.pselect6.return = kernel.function("sys_pselect6").return ? { +probe syscall.pselect6.return = kernel.function("SyS_pselect6").return !, + kernel.function("sys_pselect6").return ? { name = "pselect6" retstr = returnstr(1) } @@ -460,7 +485,8 @@ probe syscall.compat_pselect7.return = kernel.function("compat_sys_pselect7").re # long addr, # long data) # -probe syscall.ptrace = kernel.function("sys_ptrace") ? { +probe syscall.ptrace = kernel.function("SyS_ptrace") !, + kernel.function("sys_ptrace") ? { name = "ptrace" request = $request pid = $pid @@ -468,7 +494,8 @@ probe syscall.ptrace = kernel.function("sys_ptrace") ? { data = $data argstr = sprintf("%d, %d, %p, %p", request, pid, addr, data) } -probe syscall.ptrace.return = kernel.function("sys_ptrace").return ? { +probe syscall.ptrace.return = kernel.function("SyS_ptrace").return !, + kernel.function("sys_ptrace").return ? { name = "ptrace" retstr = returnstr(1) } @@ -480,7 +507,8 @@ probe syscall.ptrace.return = kernel.function("sys_ptrace").return ? { # size_t count, # loff_t pos) # -probe syscall.pwrite = kernel.function("sys_pwrite64") { +probe syscall.pwrite = kernel.function("SyS_pwrite64") !, + kernel.function("sys_pwrite64") { name = "pwrite" fd = $fd buf_uaddr = $buf @@ -490,7 +518,8 @@ probe syscall.pwrite = kernel.function("sys_pwrite64") { text_strn(user_string($buf),syscall_string_trunc,1), $count, $pos) } -probe syscall.pwrite.return = kernel.function("sys_pwrite64").return { +probe syscall.pwrite.return = kernel.function("SyS_pwrite64").return !, + kernel.function("sys_pwrite64").return { name = "pwrite" retstr = returnstr(1) } @@ -526,7 +555,8 @@ probe syscall.pwrite32.return = kernel.function("sys32_pwrite64").return ? { # qid_t id, # void __user *addr) # -probe syscall.quotactl = kernel.function("sys_quotactl") ? { +probe syscall.quotactl = kernel.function("SyS_quotactl") !, + kernel.function("sys_quotactl") ? { name = "quotactl" cmd = $cmd cmd_str = _quotactl_cmd_str($cmd) @@ -536,7 +566,8 @@ probe syscall.quotactl = kernel.function("sys_quotactl") ? { addr_uaddr = $addr argstr = sprintf("%s, %s, %d, %p", cmd_str, special_str, $id, $addr) } -probe syscall.quotactl.return = kernel.function("sys_quotactl").return ? { +probe syscall.quotactl.return = kernel.function("SyS_quotactl").return !, + kernel.function("sys_quotactl").return ? { name = "quotactl" retstr = returnstr(1) } @@ -544,14 +575,16 @@ probe syscall.quotactl.return = kernel.function("sys_quotactl").return ? { # read _______________________________________________________ # ssize_t sys_read(unsigned int fd, char __user * buf, size_t count) -probe syscall.read = kernel.function("sys_read") { +probe syscall.read = kernel.function("SyS_read") !, + kernel.function("sys_read") { name = "read" fd = $fd buf_uaddr = $buf count = $count argstr = sprintf("%d, %p, %d", $fd, $buf, $count) } -probe syscall.read.return = kernel.function("sys_read").return { +probe syscall.read.return = kernel.function("SyS_read").return !, + kernel.function("sys_read").return { name = "read" retstr = returnstr(1) } @@ -563,14 +596,16 @@ probe syscall.read.return = kernel.function("sys_read").return { # loff_t offset, # size_t count) # -probe syscall.readahead = kernel.function("sys_readahead") { +probe syscall.readahead = kernel.function("SyS_readahead") !, + kernel.function("sys_readahead") { name = "readahead" fd = $fd offset = $offset count = $count argstr = sprintf("%d, %p, %p", fd, offset, count) } -probe syscall.readahead.return = kernel.function("sys_readahead").return { +probe syscall.readahead.return = kernel.function("SyS_readahead").return !, + kernel.function("sys_readahead").return { name = "readahead" retstr = returnstr(1) } @@ -601,7 +636,8 @@ probe syscall.readdir.return = # char __user * buf, # int bufsiz) # -probe syscall.readlink = kernel.function("sys_readlink") { +probe syscall.readlink = kernel.function("SyS_readlink") !, + kernel.function("sys_readlink") { name = "readlink" path = user_string($path) buf_uaddr = $buf @@ -609,7 +645,8 @@ probe syscall.readlink = kernel.function("sys_readlink") { argstr = sprintf("%s, %p, %d", user_string_quoted($path), $buf, $bufsiz) } -probe syscall.readlink.return = kernel.function("sys_readlink").return { +probe syscall.readlink.return = kernel.function("SyS_readlink").return !, + kernel.function("sys_readlink").return { name = "readlink" retstr = returnstr(1) } @@ -620,7 +657,8 @@ probe syscall.readlink.return = kernel.function("sys_readlink").return { # char __user * buf, # int bufsiz) # -probe syscall.readlinkat = kernel.function("sys_readlinkat") ? { +probe syscall.readlinkat = kernel.function("SyS_readlinkat") !, + kernel.function("sys_readlinkat") ? { name = "readlinkat" dfd = $dfd buf_uaddr = $buf @@ -634,7 +672,8 @@ probe syscall.readlinkat = kernel.function("sys_readlinkat") ? { %) } -probe syscall.readlinkat.return = kernel.function("sys_readlinkat").return ? { +probe syscall.readlinkat.return = kernel.function("SyS_readlinkat").return !, + kernel.function("sys_readlinkat").return ? { name = "readlinkat" retstr = returnstr(1) } @@ -649,8 +688,9 @@ probe syscall.readlinkat.return = kernel.function("sys_readlinkat").return ? { # unsigned long vlen) # probe syscall.readv = - kernel.function("sys_readv"), - kernel.function("compat_sys_readv") ? + kernel.function("compat_sys_readv") ?, + kernel.function("SyS_readv") !, + kernel.function("sys_readv") { name = "readv" vector_uaddr = $vec @@ -664,8 +704,9 @@ probe syscall.readv = %) } probe syscall.readv.return = - kernel.function("sys_readv").return, - kernel.function("compat_sys_readv").return ? + kernel.function("compat_sys_readv").return ?, + kernel.function("SyS_readv").return !, + kernel.function("sys_readv").return { name = "readv" retstr = returnstr(1) @@ -678,7 +719,8 @@ probe syscall.readv.return = # unsigned int cmd, # void __user * arg) # -probe syscall.reboot = kernel.function("sys_reboot") { +probe syscall.reboot = kernel.function("SyS_reboot") !, + kernel.function("sys_reboot") { name = "reboot" magic = $magic1 magic_str = _reboot_magic_str($magic1) @@ -690,7 +732,8 @@ probe syscall.reboot = kernel.function("sys_reboot") { argstr = sprintf("%s, %s, %s, %p", magic_str, magic2_str, flag_str, $arg) } -probe syscall.reboot.return = kernel.function("sys_reboot").return { +probe syscall.reboot.return = kernel.function("SyS_reboot").return !, + kernel.function("sys_reboot").return { name = "reboot" retstr = returnstr(1) } @@ -722,7 +765,8 @@ probe syscall.recv.return = kernel.function("sys_recv").return ? { # struct sockaddr __user *addr, # int __user *addr_len) # -probe syscall.recvfrom = kernel.function("sys_recvfrom") ? { +probe syscall.recvfrom = kernel.function("SyS_recvfrom") !, + kernel.function("sys_recvfrom") ? { name = "recvfrom" s = $fd buf_uaddr = $ubuf @@ -734,7 +778,8 @@ probe syscall.recvfrom = kernel.function("sys_recvfrom") ? { argstr = sprintf("%d, %p, %d, %s, %p, %p", $fd, $ubuf, $size, _recvflags_str($flags), $addr, $addr_len) } -probe syscall.recvfrom.return = kernel.function("sys_recvfrom").return ? { +probe syscall.recvfrom.return = kernel.function("SyS_recvfrom").return !, + kernel.function("sys_recvfrom").return ? { name = "recvfrom" retstr = returnstr(1) } @@ -745,7 +790,8 @@ probe syscall.recvfrom.return = kernel.function("sys_recvfrom").return ? { # struct msghdr __user *msg, # unsigned int flags) # -probe syscall.recvmsg = kernel.function("sys_recvmsg") ? { +probe syscall.recvmsg = kernel.function("SyS_recvmsg") !, + kernel.function("sys_recvmsg") ? { name = "recvmsg" s = $fd msg_uaddr = $msg @@ -753,7 +799,8 @@ probe syscall.recvmsg = kernel.function("sys_recvmsg") ? { flags_str = _recvflags_str($flags) argstr = sprintf("%d, %p, %s", $fd, $msg, _recvflags_str($flags)) } -probe syscall.recvmsg.return = kernel.function("sys_recvmsg").return ? { +probe syscall.recvmsg.return = kernel.function("SyS_recvmsg").return !, + kernel.function("sys_recvmsg").return ? { name = "recvmsg" retstr = returnstr(1) } @@ -783,7 +830,8 @@ probe syscall.compat_sys_recvmsg.return = kernel.function("compat_sys_recvmsg"). # unsigned long pgoff, # unsigned long flags) # -probe syscall.remap_file_pages = kernel.function("sys_remap_file_pages") ? { +probe syscall.remap_file_pages = kernel.function("SyS_remap_file_pages") !, + kernel.function("sys_remap_file_pages") ? { name = "remap_file_pages" start = $start size = $size @@ -798,6 +846,7 @@ probe syscall.remap_file_pages = kernel.function("sys_remap_file_pages") ? { pgoff, flags) } probe syscall.remap_file_pages.return = + kernel.function("SyS_remap_file_pages").return !, kernel.function("sys_remap_file_pages").return ? { name = "remap_file_pages" retstr = returnstr(1) @@ -809,7 +858,8 @@ probe syscall.remap_file_pages.return = # sys_removexattr(char __user *path, # char __user *name) # -probe syscall.removexattr = kernel.function("sys_removexattr") { +probe syscall.removexattr = kernel.function("SyS_removexattr") !, + kernel.function("sys_removexattr") { name = "removexattr" name_str = user_string($name) %( kernel_v >= "2.6.27" %? @@ -823,7 +873,8 @@ probe syscall.removexattr = kernel.function("sys_removexattr") { %) } -probe syscall.removexattr.return = kernel.function("sys_removexattr").return { +probe syscall.removexattr.return = kernel.function("SyS_removexattr").return !, + kernel.function("sys_removexattr").return { name = "removexattr" retstr = returnstr(1) } @@ -833,14 +884,16 @@ probe syscall.removexattr.return = kernel.function("sys_removexattr").return { # sys_rename(const char __user * oldname, # const char __user * newname) # -probe syscall.rename = kernel.function("sys_rename") { +probe syscall.rename = kernel.function("SyS_rename") !, + kernel.function("sys_rename") { name = "rename" oldpath = user_string($oldname) newpath = user_string($newname) argstr = sprintf("%s, %s", user_string_quoted($oldname), user_string_quoted($newname)) } -probe syscall.rename.return = kernel.function("sys_rename").return { +probe syscall.rename.return = kernel.function("SyS_rename").return !, + kernel.function("sys_rename").return { name = "rename" retstr = returnstr(1) } @@ -849,7 +902,8 @@ probe syscall.rename.return = kernel.function("sys_rename").return { # new function with 2.6.16 # long sys_renameat(int olddfd, const char __user *oldname, # int newdfd, const char __user *newname) -probe syscall.renameat = kernel.function("sys_renameat") ? { +probe syscall.renameat = kernel.function("SyS_renameat") !, + kernel.function("sys_renameat") ? { name = "renameat" olddfd = $olddfd olddfd_str = _dfd_str($olddfd) @@ -863,7 +917,8 @@ probe syscall.renameat = kernel.function("sys_renameat") ? { olddfd_str, user_string_quoted($oldname), newdfd_str, user_string_quoted($newname)) } -probe syscall.renameat.return = kernel.function("sys_renameat").return ? { +probe syscall.renameat.return = kernel.function("SyS_renameat").return !, + kernel.function("sys_renameat").return ? { name = "renameat" retstr = returnstr(1) } @@ -876,7 +931,8 @@ probe syscall.renameat.return = kernel.function("sys_renameat").return ? { # key_serial_t destringid) # compat_sys_request_key() calls sys_request_key, so don't need probe there. # -probe syscall.request_key = kernel.function("sys_request_key") ? { +probe syscall.request_key = kernel.function("SyS_request_key") !, + kernel.function("sys_request_key") ? { name = "request_key" type_uaddr = $_type description_uaddr = $_description @@ -884,7 +940,8 @@ probe syscall.request_key = kernel.function("sys_request_key") ? { destringid = $destringid argstr = sprintf("%p, %p, %p, %p", $_type, $_description, $_callout_info, $destringid) } -probe syscall.request_key.return = kernel.function("sys_request_key").return ? { +probe syscall.request_key.return = kernel.function("SyS_request_key").return !, + kernel.function("sys_request_key").return ? { name = "request_key" retstr = returnstr(1) } @@ -908,12 +965,14 @@ probe syscall.restart_syscall.return = # asmlinkage long # sys_rmdir(const char __user * pathname) # -probe syscall.rmdir = kernel.function("sys_rmdir") { +probe syscall.rmdir = kernel.function("SyS_rmdir") !, + kernel.function("sys_rmdir") { name = "rmdir" pathname = user_string($pathname) argstr = user_string_quoted($pathname) } -probe syscall.rmdir.return = kernel.function("sys_rmdir").return { +probe syscall.rmdir.return = kernel.function("SyS_rmdir").return !, + kernel.function("sys_rmdir").return { name = "rmdir" retstr = returnstr(1) } @@ -925,7 +984,8 @@ probe syscall.rmdir.return = kernel.function("sys_rmdir").return { # struct sigaction __user *oact, # size_t sigsetsize) # -probe syscall.rt_sigaction = kernel.function("sys_rt_sigaction") ? { +probe syscall.rt_sigaction = kernel.function("SyS_rt_sigaction") !, + kernel.function("sys_rt_sigaction") ? { name = "rt_sigaction" sig = $sig act_uaddr = $act @@ -934,7 +994,9 @@ probe syscall.rt_sigaction = kernel.function("sys_rt_sigaction") ? { argstr = sprintf("%s, {%s}, %p, %d", _signal_name($sig), _struct_sigaction_u($act), $oact, $sigsetsize) } -probe syscall.rt_sigaction.return = kernel.function("sys_rt_sigaction").return ? { +probe syscall.rt_sigaction.return = + kernel.function("SyS_rt_sigaction").return !, + kernel.function("sys_rt_sigaction").return ? { name = "rt_sigaction" retstr = returnstr(1) } @@ -972,13 +1034,16 @@ probe syscall.rt_sigaction32.return = kernel.function("sys32_rt_sigaction").retu # # long sys_rt_sigpending(sigset_t __user *set, size_t sigsetsize) # -probe syscall.rt_sigpending = kernel.function("sys_rt_sigpending") ? { +probe syscall.rt_sigpending = kernel.function("SyS_rt_sigpending") !, + kernel.function("sys_rt_sigpending") ? { name = "rt_sigpending" set_uaddr = $set sigsetsize = $sigsetsize argstr = sprintf("%p, %d", $set, $sigsetsize) } -probe syscall.rt_sigpending.return = kernel.function("sys_rt_sigpending").return ? { +probe syscall.rt_sigpending.return = + kernel.function("SyS_rt_sigpending").return !, + kernel.function("sys_rt_sigpending").return ? { name = "rt_sigpending" retstr = returnstr(1) } @@ -991,6 +1056,7 @@ probe syscall.rt_sigpending.return = kernel.function("sys_rt_sigpending").return probe syscall.rt_sigprocmask = kernel.function("sys32_rt_sigprocmask") ?, kernel.function("compat_sys_rt_sigprocmask") ?, + kernel.function("SyS_rt_sigprocmask") !, kernel.function("sys_rt_sigprocmask") ? { name = "rt_sigprocmask" @@ -1004,6 +1070,7 @@ probe syscall.rt_sigprocmask = probe syscall.rt_sigprocmask.return = kernel.function("sys32_rt_sigprocmask").return ?, kernel.function("compat_sys_rt_sigprocmask").return ?, + kernel.function("SyS_rt_sigprocmask").return !, kernel.function("sys_rt_sigprocmask").return ? { name = "rt_sigprocmask" @@ -1014,7 +1081,8 @@ probe syscall.rt_sigprocmask.return = # # long sys_rt_sigqueueinfo(int pid, int sig,siginfo_t __user *uinfo) # -probe syscall.rt_sigqueueinfo = kernel.function("sys_rt_sigqueueinfo") { +probe syscall.rt_sigqueueinfo = kernel.function("SyS_rt_sigqueueinfo") !, + kernel.function("sys_rt_sigqueueinfo") { name = "rt_sigqueueinfo" pid = $pid sig = $sig @@ -1022,6 +1090,7 @@ probe syscall.rt_sigqueueinfo = kernel.function("sys_rt_sigqueueinfo") { argstr = sprintf("%d, %s, %p", $pid, _signal_name($sig), $uinfo) } probe syscall.rt_sigqueueinfo.return = + kernel.function("SyS_rt_sigqueueinfo").return !, kernel.function("sys_rt_sigqueueinfo").return { name = "rt_sigqueueinfo" retstr = returnstr(1) @@ -1050,17 +1119,19 @@ probe syscall.rt_sigreturn.return = # sys_rt_sigsuspend(struct pt_regs regs) # probe syscall.rt_sigsuspend = - kernel.function("sys_rt_sigsuspend") ?, kernel.function("compat_sys_rt_sigsuspend") ?, - kernel.function("ia64_rt_sigsuspend") ? + kernel.function("ia64_rt_sigsuspend") ?, + kernel.function("SyS_rt_sigsuspend") !, + kernel.function("sys_rt_sigsuspend") ? { name = "rt_sigsuspend" argstr = "" } probe syscall.rt_sigsuspend.return = - kernel.function("sys_rt_sigsuspend").return ?, kernel.function("compat_sys_rt_sigsuspend").return ?, - kernel.function("ia64_rt_sigsuspend").return ? + kernel.function("ia64_rt_sigsuspend").return ?, + kernel.function("SyS_rt_sigsuspend").return !, + kernel.function("sys_rt_sigsuspend").return ? { name = "rt_sigsuspend" retstr = returnstr(1) @@ -1077,8 +1148,9 @@ probe syscall.rt_sigsuspend.return = # struct compat_timespec __user *uts, compat_size_t sigsetsize) # probe syscall.rt_sigtimedwait = - kernel.function("sys_rt_sigtimedwait"), - kernel.function("compat_sys_rt_sigtimedwait") ? + kernel.function("compat_sys_rt_sigtimedwait") ?, + kernel.function("SyS_rt_sigtimedwait") !, + kernel.function("sys_rt_sigtimedwait") { name = "rt_sigtimedwait" uthese_uaddr = $uthese @@ -1088,8 +1160,9 @@ probe syscall.rt_sigtimedwait = argstr = sprintf("%p, %p, %p, %d", $uthese, $uinfo, $uts, $sigsetsize) } probe syscall.rt_sigtimedwait.return = - kernel.function("sys_rt_sigtimedwait").return, - kernel.function("compat_sys_rt_sigtimedwait").return ? + kernel.function("compat_sys_rt_sigtimedwait").return ?, + kernel.function("SyS_rt_sigtimedwait").return !, + kernel.function("sys_rt_sigtimedwait").return { name = "rt_sigtimedwait" retstr = returnstr(1) @@ -1102,7 +1175,8 @@ probe syscall.rt_sigtimedwait.return = # unsigned int len, # unsigned long __user *user_mask_ptr) # -probe syscall.sched_getaffinity = kernel.function("sys_sched_getaffinity") { +probe syscall.sched_getaffinity = kernel.function("SyS_sched_getaffinity") !, + kernel.function("sys_sched_getaffinity") { name = "sched_getaffinity" pid = $pid len = $len @@ -1110,6 +1184,7 @@ probe syscall.sched_getaffinity = kernel.function("sys_sched_getaffinity") { argstr = sprintf("%d, %p, %p", pid, len, mask_uaddr) } probe syscall.sched_getaffinity.return = + kernel.function("SyS_sched_getaffinity").return !, kernel.function("sys_sched_getaffinity").return { name = "sched_getaffinity" retstr = returnstr(1) @@ -1120,13 +1195,15 @@ probe syscall.sched_getaffinity.return = # sys_sched_getparam(pid_t pid, # struct sched_param __user *param) # -probe syscall.sched_getparam = kernel.function("sys_sched_getparam") { +probe syscall.sched_getparam = kernel.function("SyS_sched_getparam") !, + kernel.function("sys_sched_getparam") { name = "sched_getparam" pid = $pid p_uaddr = $param argstr = sprintf("%d, %p", pid, p_uaddr) } probe syscall.sched_getparam.return = + kernel.function("SyS_sched_getparam").return !, kernel.function("sys_sched_getparam").return { name = "sched_getparam" retstr = returnstr(1) @@ -1137,12 +1214,14 @@ probe syscall.sched_getparam.return = # sys_sched_get_priority_max(int policy) # probe syscall.sched_get_priority_max = + kernel.function("SyS_sched_get_priority_max") !, kernel.function("sys_sched_get_priority_max") { name = "sched_get_priority_max" policy = $policy argstr = sprint(policy) } probe syscall.sched_get_priority_max.return = + kernel.function("SyS_sched_get_priority_max").return !, kernel.function("sys_sched_get_priority_max").return { name = "sched_get_priority_max" retstr = returnstr(1) @@ -1153,12 +1232,14 @@ probe syscall.sched_get_priority_max.return = # sys_sched_get_priority_min(int policy) # probe syscall.sched_get_priority_min = + kernel.function("SyS_sched_get_priority_min") !, kernel.function("sys_sched_get_priority_min") { name = "sched_get_priority_min" policy = $policy argstr = sprint(policy) } probe syscall.sched_get_priority_min.return = + kernel.function("SyS_sched_get_priority_min").return !, kernel.function("sys_sched_get_priority_min").return { name = "sched_get_priority_min" retstr = returnstr(1) @@ -1167,12 +1248,14 @@ probe syscall.sched_get_priority_min.return = # # long sys_sched_getscheduler(pid_t pid) # -probe syscall.sched_getscheduler = kernel.function("sys_sched_getscheduler") { +probe syscall.sched_getscheduler = kernel.function("SyS_sched_getscheduler") !, + kernel.function("sys_sched_getscheduler") { name = "sched_getscheduler" pid = $pid argstr = sprint($pid) } -probe syscall.sched_getscheduler.return = kernel.function("sys_sched_getscheduler").return { +probe syscall.sched_getscheduler.return = kernel.function("SyS_sched_getscheduler").return !, + kernel.function("sys_sched_getscheduler").return { name = "sched_getscheduler" retstr = returnstr(1) } @@ -1180,13 +1263,15 @@ probe syscall.sched_getscheduler.return = kernel.function("sys_sched_getschedule # # long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval) # -probe syscall.sched_rr_get_interval = kernel.function("sys_sched_rr_get_interval") { +probe syscall.sched_rr_get_interval = kernel.function("SyS_sched_rr_get_interval") !, + kernel.function("sys_sched_rr_get_interval") { name = "sched_rr_get_interval" pid = $pid tp_uaddr = $interval argstr = sprintf("%d, %s", $pid, _struct_timespec_u($interval,1)) } -probe syscall.sched_rr_get_interval.return = kernel.function("sys_sched_rr_get_interval").return { +probe syscall.sched_rr_get_interval.return = kernel.function("SyS_sched_rr_get_interval").return !, + kernel.function("sys_sched_rr_get_interval").return { name = "sched_rr_get_interval" retstr = returnstr(1) } @@ -1198,7 +1283,8 @@ probe syscall.sched_rr_get_interval.return = kernel.function("sys_sched_rr_get_i # FIXME: why the problem with x86_64? # %( arch != "x86_64" %? -probe syscall.sched_setaffinity = kernel.function("sys_sched_setaffinity") { +probe syscall.sched_setaffinity = kernel.function("SyS_sched_setaffinity") !, + kernel.function("sys_sched_setaffinity") { name = "sched_setaffinity" pid = $pid len = $len @@ -1206,7 +1292,8 @@ probe syscall.sched_setaffinity = kernel.function("sys_sched_setaffinity") { argstr = sprintf("%d, %d, %p", $pid, $len, $user_mask_ptr) } %: -probe syscall.sched_setaffinity = kernel.function("sys_sched_setaffinity") { +probe syscall.sched_setaffinity = kernel.function("SyS_sched_setaffinity") !, + kernel.function("sys_sched_setaffinity") { name = "sched_setaffinity" pid = $pid len = 0 @@ -1214,7 +1301,8 @@ probe syscall.sched_setaffinity = kernel.function("sys_sched_setaffinity") { argstr = sprintf("%d, <unknown>, %p", $pid, $user_mask_ptr) } %) -probe syscall.sched_setaffinity.return = kernel.function("sys_sched_setaffinity").return { +probe syscall.sched_setaffinity.return = kernel.function("SyS_sched_setaffinity").return !, + kernel.function("sys_sched_setaffinity").return { name = "sched_setaffinity" retstr = returnstr(1) } @@ -1223,13 +1311,16 @@ probe syscall.sched_setaffinity.return = kernel.function("sys_sched_setaffinity" # # long sys_sched_setparam(pid_t pid, struct sched_param __user *param) # -probe syscall.sched_setparam = kernel.function("sys_sched_setparam") ? { +probe syscall.sched_setparam = kernel.function("SyS_sched_setparam") !, + kernel.function("sys_sched_setparam") ? { name = "sched_setparam" pid = $pid p_uaddr = $param argstr = sprintf("%d, %p", $pid, $param) } -probe syscall.sched_setparam.return = kernel.function("sys_sched_setparam").return ? { +probe syscall.sched_setparam.return = + kernel.function("SyS_sched_setparam").return !, + kernel.function("sys_sched_setparam").return ? { name = "sched_setparam" retstr = returnstr(1) } @@ -1238,7 +1329,9 @@ probe syscall.sched_setparam.return = kernel.function("sys_sched_setparam").retu # # long sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) # -probe syscall.sched_setscheduler = kernel.function("sys_sched_setscheduler") ? { +probe syscall.sched_setscheduler = + kernel.function("SyS_sched_setscheduler") !, + kernel.function("sys_sched_setscheduler") ? { name = "sched_setscheduler" pid = $pid policy = $policy @@ -1246,7 +1339,9 @@ probe syscall.sched_setscheduler = kernel.function("sys_sched_setscheduler") ? { p_uaddr = $param argstr = sprintf("%d, %s, %p", $pid, policy_str, $param) } -probe syscall.sched_setscheduler.return = kernel.function("sys_sched_setscheduler").return ? { +probe syscall.sched_setscheduler.return = + kernel.function("SyS_sched_setscheduler").return !, + kernel.function("sys_sched_setscheduler").return ? { name = "sched_setscheduler" retstr = returnstr(1) } @@ -1270,7 +1365,8 @@ probe syscall.sched_yield.return = kernel.function("sys_sched_yield").return { # fd_set __user *exp, # struct timeval __user *tvp) # -probe syscall.select = kernel.function("sys_select") { +probe syscall.select = kernel.function("SyS_select") !, + kernel.function("sys_select") { name = "select" n = $n readfds_uaddr = $inp @@ -1280,7 +1376,8 @@ probe syscall.select = kernel.function("sys_select") { argstr = sprintf("%d, %p, %p, %p, %s", $n, $inp, $outp, $exp, _struct_timeval_u($tvp, 1)) } -probe syscall.select.return = kernel.function("sys_select").return { +probe syscall.select.return = kernel.function("SyS_select").return !, + kernel.function("sys_select").return { name = "select" retstr = returnstr(1) } @@ -1311,7 +1408,8 @@ probe syscall.compat_select.return = kernel.function("compat_sys_select").return # int cmd, # union semun arg) # -probe syscall.semctl = kernel.function("sys_semctl") ? { +probe syscall.semctl = kernel.function("SyS_semctl") !, + kernel.function("sys_semctl") ? { name = "semctl" semid = $semid semnum = $semnum @@ -1322,7 +1420,8 @@ probe syscall.semctl = kernel.function("sys_semctl") ? { */ argstr = sprintf("%d, %d, %s", $semid, $semnum, _semctl_cmd($cmd)) } -probe syscall.semctl.return = kernel.function("sys_semctl").return ? { +probe syscall.semctl.return = kernel.function("SyS_semctl").return !, + kernel.function("sys_semctl").return ? { name = "semctl" retstr = returnstr(1) } @@ -1342,14 +1441,16 @@ probe syscall.compat_sys_semctl.return = kernel.function("compat_sys_semctl").re # semget _____________________________________________________ # long sys_semget (key_t key, int nsems, int semflg) # -probe syscall.semget = kernel.function("sys_semget") ? { +probe syscall.semget = kernel.function("SyS_semget") !, + kernel.function("sys_semget") ? { name = "semget" key = $key nsems = $nsems semflg = $semflg argstr = sprintf("%d, %d, %s", $key, $nsems, __sem_flags($semflg)) } -probe syscall.semget.return = kernel.function("sys_semget").return ? { +probe syscall.semget.return = kernel.function("SyS_semget").return !, + kernel.function("sys_semget").return ? { name = "semget" retstr = returnstr(1) } @@ -1360,14 +1461,16 @@ probe syscall.semget.return = kernel.function("sys_semget").return ? { # struct sembuf __user *tsops, # unsigned nsops) # -probe syscall.semop = kernel.function("sys_semtimedop") ? { +probe syscall.semop = kernel.function("SyS_semtimedop") !, + kernel.function("sys_semtimedop") ? { name = "semop" semid = $semid tsops_uaddr = $tsops nsops = $nsops argstr = sprintf("%d, %p, %d", $semid, $tsops, $nsops) } -probe syscall.semop.return = kernel.function("sys_semtimedop").return ? { +probe syscall.semop.return = kernel.function("SyS_semtimedop").return !, + kernel.function("sys_semtimedop").return ? { name = "semop" retstr = returnstr(1) } @@ -1379,7 +1482,8 @@ probe syscall.semop.return = kernel.function("sys_semtimedop").return ? { # unsigned nsops, # const struct timespec __user *timeout) # -probe syscall.semtimedop = kernel.function("sys_semtimedop") ? { +probe syscall.semtimedop = kernel.function("SyS_semtimedop") !, + kernel.function("sys_semtimedop") ? { name = "semtimedop" semid = $semid sops_uaddr = $tsops @@ -1388,7 +1492,8 @@ probe syscall.semtimedop = kernel.function("sys_semtimedop") ? { argstr = sprintf("%d, %p, %d, %s", $semid, $tsops, $nsops, _struct_timespec_u($timeout,1)) } -probe syscall.semtimedop.return = kernel.function("sys_semtimedop").return ? { +probe syscall.semtimedop.return = kernel.function("SyS_semtimedop").return !, + kernel.function("sys_semtimedop").return ? { name = "semtimedop" retstr = returnstr(1) } @@ -1418,7 +1523,8 @@ probe syscall.compat_sys_semtimedop.return = kernel.function("compat_sys_semtime # size_t len, # unsigned flags) # -probe syscall.send = kernel.function("sys_send") ? { +probe syscall.send = kernel.function("SyS_send") !, + kernel.function("sys_send") ? { name = "send" s = $fd buf_uaddr = $buff @@ -1427,7 +1533,8 @@ probe syscall.send = kernel.function("sys_send") ? { flags_str = _sendflags_str($flags) argstr = sprintf("%d, %p, %d, %s", $fd, $buff, $len, flags_str) } -probe syscall.send.return = kernel.function("sys_send").return ? { +probe syscall.send.return = kernel.function("SyS_send").return !, + kernel.function("sys_send").return ? { name = "send" retstr = returnstr(1) } @@ -1440,7 +1547,9 @@ probe syscall.send.return = kernel.function("sys_send").return ? { # size_t count) # probe syscall.sendfile = + kernel.function("SyS_sendfile") ?, kernel.function("sys_sendfile") ?, + kernel.function("SyS_sendfile64") ?, kernel.function("sys_sendfile64") ? { name = "sendfile" @@ -1452,7 +1561,9 @@ probe syscall.sendfile = $count) } probe syscall.sendfile.return = + kernel.function("SyS_sendfile").return ?, kernel.function("sys_sendfile").return ?, + kernel.function("SyS_sendfile64").return ?, kernel.function("sys_sendfile64").return ? { name = "sendfile" @@ -1463,7 +1574,8 @@ probe syscall.sendfile.return = # # long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) # -probe syscall.sendmsg = kernel.function("sys_sendmsg") ? { +probe syscall.sendmsg = kernel.function("SyS_sendmsg") !, + kernel.function("sys_sendmsg") ? { name = "sendmsg" s = $fd msg_uaddr = $msg @@ -1471,7 +1583,8 @@ probe syscall.sendmsg = kernel.function("sys_sendmsg") ? { flags_str = _sendflags_str($flags) argstr = sprintf("%d, %p, %s", $fd, $msg, _sendflags_str($flags)) } -probe syscall.sendmsg.return = kernel.function("sys_sendmsg").return ? { +probe syscall.sendmsg.return = kernel.function("SyS_sendmsg").return !, + kernel.function("sys_sendmsg").return ? { name = "sendmsg" retstr = returnstr(1) } @@ -1500,7 +1613,8 @@ probe syscall.compat_sys_sendmsg.return = kernel.function("compat_sys_sendmsg"). # struct sockaddr __user *addr, # int addr_len) # -probe syscall.sendto = kernel.function("sys_sendto") ? { +probe syscall.sendto = kernel.function("SyS_sendto") !, + kernel.function("sys_sendto") ? { name = "sendto" s = $fd buf_uaddr = $buff @@ -1512,7 +1626,8 @@ probe syscall.sendto = kernel.function("sys_sendto") ? { argstr = sprintf("%d, %p, %d, %s, %s, %d", $fd, $buff, $len, flags_str, _struct_sockaddr_u($addr,$addr_len), $addr_len) } -probe syscall.sendto.return = kernel.function("sys_sendto").return ? { +probe syscall.sendto.return = kernel.function("SyS_sendto").return !, + kernel.function("sys_sendto").return ? { name = "sendto" retstr = returnstr(1) } @@ -1523,13 +1638,15 @@ probe syscall.sendto.return = kernel.function("sys_sendto").return ? { # sys_setdomainname(char __user *name, # int len) # -probe syscall.setdomainname = kernel.function("sys_setdomainname") { +probe syscall.setdomainname = kernel.function("SyS_setdomainname") !, + kernel.function("sys_setdomainname") { name = "setdomainname" hostname_uaddr = $name len = $len argstr = sprintf("%p, %d", $name, $len) } probe syscall.setdomainname.return = + kernel.function("SyS_setdomainname").return !, kernel.function("sys_setdomainname").return { name = "setdomainname" retstr = returnstr(1) @@ -1540,16 +1657,18 @@ probe syscall.setdomainname.return = # long sys_setfsgid16(old_gid_t gid) # probe syscall.setfsgid = - kernel.function("sys_setfsgid") ?, - kernel.function("sys_setfsgid16") ? + kernel.function("sys_setfsgid16") ?, + kernel.function("SyS_setfsgid") !, + kernel.function("sys_setfsgid") ? { name = "setfsgid" fsgid = $gid argstr = sprint($gid) } probe syscall.setfsgid.return = - kernel.function("sys_setfsgid").return ?, - kernel.function("sys_setfsgid16").return ? + kernel.function("sys_setfsgid16").return ?, + kernel.function("SyS_setfsgid").return !, + kernel.function("sys_setfsgid").return ? { name = "setfsgid" retstr = returnstr(1) @@ -1560,16 +1679,18 @@ probe syscall.setfsgid.return = # long sys_setfsuid16(old_uid_t uid) # probe syscall.setfsuid = - kernel.function("sys_setfsuid") ?, - kernel.function("sys_setfsuid16") ? + kernel.function("sys_setfsuid16") ?, + kernel.function("SyS_setfsuid") !, + kernel.function("sys_setfsuid") ? { name = "setfsuid" fsuid = $uid argstr = sprint($uid) } probe syscall.setfsuid.return = - kernel.function("sys_setfsuid").return ?, - kernel.function("sys_setfsuid16").return ? + kernel.function("sys_setfsuid16").return ?, + kernel.function("SyS_setfsuid").return !, + kernel.function("sys_setfsuid").return ? { name = "setfsuid" retstr = returnstr(1) @@ -1581,16 +1702,18 @@ probe syscall.setfsuid.return = # long sys_setgid16(old_gid_t gid) # probe syscall.setgid = - kernel.function("sys_setgid") ?, - kernel.function("sys_setgid16") ? + kernel.function("sys_setgid16") ?, + kernel.function("SyS_setgid") !, + kernel.function("sys_setgid") ? { name = "setgid" gid = $gid argstr = sprint($gid) } probe syscall.setgid.return = - kernel.function("sys_setgid").return ?, - kernel.function("sys_setgid16").return ? + kernel.function("sys_setgid16").return ?, + kernel.function("SyS_setgid").return !, + kernel.function("sys_setgid").return ? { name = "setgid" retstr = returnstr(1) @@ -1603,9 +1726,10 @@ probe syscall.setgid.return = # long sys32_setgroups16(int gidsetsize, u16 __user *grouplist) # probe syscall.setgroups = - kernel.function("sys_setgroups") ?, kernel.function("sys_setgroups16") ?, - kernel.function("sys32_setgroups16") ? + kernel.function("sys32_setgroups16") ?, + kernel.function("SyS_setgroups") !, + kernel.function("sys_setgroups") ? { name = "setgroups" size = $gidsetsize @@ -1613,9 +1737,10 @@ probe syscall.setgroups = argstr = sprintf("%d, %p", $gidsetsize, $grouplist) } probe syscall.setgroups.return = - kernel.function("sys_setgroups").return ?, kernel.function("sys_setgroups16").return ?, - kernel.function("sys32_setgroups16").return ? + kernel.function("sys32_setgroups16").return ?, + kernel.function("SyS_setgroups").return !, + kernel.function("sys_setgroups").return ? { name = "setgroups" retstr = returnstr(1) @@ -1627,14 +1752,16 @@ probe syscall.setgroups.return = # sys_sethostname(char __user *name, # int len) # -probe syscall.sethostname = kernel.function("sys_sethostname") { +probe syscall.sethostname = kernel.function("SyS_sethostname") !, + kernel.function("sys_sethostname") { name = "sethostname" hostname_uaddr = $name name_str = user_string($name) len = $len argstr = sprintf("%s, %d", user_string_quoted($name), $len) } -probe syscall.sethostname.return = kernel.function("sys_sethostname").return { +probe syscall.sethostname.return = kernel.function("SyS_sethostname").return !, + kernel.function("sys_sethostname").return { name = "sethostname" retstr = returnstr(1) } @@ -1644,7 +1771,8 @@ probe syscall.sethostname.return = kernel.function("sys_sethostname").return { # struct itimerval __user *value, # struct itimerval __user *ovalue) # -probe syscall.setitimer = kernel.function("sys_setitimer") { +probe syscall.setitimer = kernel.function("SyS_setitimer") !, + kernel.function("sys_setitimer") { name = "setitimer" which = $which value_uaddr = $value @@ -1652,7 +1780,8 @@ probe syscall.setitimer = kernel.function("sys_setitimer") { argstr = sprintf("%s, %s, %p", _itimer_which_str($which), _struct_itimerval_u($value), $ovalue) } -probe syscall.setitimer.return = kernel.function("sys_setitimer").return { +probe syscall.setitimer.return = kernel.function("SyS_setitimer").return !, + kernel.function("sys_setitimer").return { name = "setitimer" retstr = returnstr(1) } @@ -1680,8 +1809,9 @@ probe syscall.compat_setitimer.return = kernel.function("compat_sys_setitimer"). # unsigned long maxnode) # probe syscall.set_mempolicy = - kernel.function("sys_set_mempolicy") ?, - kernel.function("compat_sys_set_mempolicy") ? + kernel.function("compat_sys_set_mempolicy") ?, + kernel.function("SyS_set_mempolicy") !, + kernel.function("sys_set_mempolicy") ? { name = "set_mempolicy" mode = $mode @@ -1690,8 +1820,9 @@ probe syscall.set_mempolicy = argstr = sprintf("%d, %p, %d", $mode, $nmask, $maxnode) } probe syscall.set_mempolicy.return = - kernel.function("sys_set_mempolicy").return ?, - kernel.function("compat_sys_set_mempolicy").return ? + kernel.function("compat_sys_set_mempolicy").return ?, + kernel.function("SyS_set_mempolicy").return !, + kernel.function("sys_set_mempolicy").return ? { name = "set_mempolicy" retstr = returnstr(1) @@ -1703,13 +1834,15 @@ probe syscall.set_mempolicy.return = # sys_setpgid(pid_t pid, # pid_t pgid) # -probe syscall.setpgid = kernel.function("sys_setpgid") { +probe syscall.setpgid = kernel.function("SyS_setpgid") !, + kernel.function("sys_setpgid") { name = "setpgid" pid = $pid pgid = $pgid argstr = sprintf("%d, %d", $pid, $pgid) } -probe syscall.setpgid.return = kernel.function("sys_setpgid").return { +probe syscall.setpgid.return = kernel.function("SyS_setpgid").return !, + kernel.function("sys_setpgid").return { name = "setpgid" retstr = returnstr(1) } @@ -1720,7 +1853,8 @@ probe syscall.setpgid.return = kernel.function("sys_setpgid").return { # int who, # int niceval) # -probe syscall.setpriority = kernel.function("sys_setpriority") { +probe syscall.setpriority = kernel.function("SyS_setpriority") !, + kernel.function("sys_setpriority") { name = "setpriority" which = $which which_str = _priority_which_str($which) @@ -1728,7 +1862,8 @@ probe syscall.setpriority = kernel.function("sys_setpriority") { prio = $niceval argstr = sprintf("%s, %d, %d", which_str, $who, $niceval) } -probe syscall.setpriority.return = kernel.function("sys_setpriority").return { +probe syscall.setpriority.return = kernel.function("SyS_setpriority").return !, + kernel.function("sys_setpriority").return { name = "setpriority" retstr = returnstr(1) } @@ -1736,13 +1871,15 @@ probe syscall.setpriority.return = kernel.function("sys_setpriority").return { # setregid ___________________________________________________ # long sys_setregid(gid_t rgid, gid_t egid) # -probe syscall.setregid = kernel.function("sys_setregid") { +probe syscall.setregid = kernel.function("SyS_setregid") !, + kernel.function("sys_setregid") { name = "setregid" rgid = __int32($rgid) egid = __int32($egid) argstr = sprintf("%d, %d", rgid, egid) } -probe syscall.setregid.return = kernel.function("sys_setregid").return { +probe syscall.setregid.return = kernel.function("SyS_setregid").return !, + kernel.function("sys_setregid").return { name = "setregid" retstr = returnstr(1) } @@ -1762,14 +1899,16 @@ probe syscall.setregid16.return = kernel.function("sys_setregid16").return ? { # setresgid __________________________________________________ # long sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) # -probe syscall.setresgid = kernel.function("sys_setresgid") { +probe syscall.setresgid = kernel.function("SyS_setresgid") !, + kernel.function("sys_setresgid") { name = "setresgid" rgid = __int32($rgid) egid = __int32($egid) sgid = __int32($sgid) argstr = sprintf("%d, %d, %d", rgid, egid, sgid) } -probe syscall.setresgid.return = kernel.function("sys_setresgid").return { +probe syscall.setresgid.return = kernel.function("SyS_setresgid").return !, + kernel.function("sys_setresgid").return { name = "setresgid" retstr = returnstr(1) } @@ -1795,14 +1934,16 @@ probe syscall.setresgid16.return = kernel.function("sys_setresgid16").return ? { # # long sys_setresuid(uid_t ruid, uid_t euid, uid_t suid) # -probe syscall.setresuid = kernel.function("sys_setresuid") { +probe syscall.setresuid = kernel.function("SyS_setresuid") !, + kernel.function("sys_setresuid") { name = "setresuid" ruid = __int32($ruid) euid = __int32($euid) suid = __int32($suid) argstr = sprintf("%d, %d, %d", ruid, euid, suid) } -probe syscall.setresuid.return = kernel.function("sys_setresuid").return { +probe syscall.setresuid.return = kernel.function("SyS_setresuid").return !, + kernel.function("sys_setresuid").return { name = "setresuid" retstr = returnstr(1) } @@ -1826,13 +1967,15 @@ probe syscall.setresuid16.return = kernel.function("sys_setresuid16").return ? { # setreuid ___________________________________________________ # long sys_setreuid(uid_t ruid, uid_t euid) # -probe syscall.setreuid = kernel.function("sys_setreuid") { +probe syscall.setreuid = kernel.function("SyS_setreuid") !, + kernel.function("sys_setreuid") { name = "setreuid" ruid = __int32($ruid) euid = __int32($euid) argstr = sprintf("%d, %d", ruid, euid) } -probe syscall.setreuid.return = kernel.function("sys_setreuid").return { +probe syscall.setreuid.return = kernel.function("SyS_setreuid").return !, + kernel.function("sys_setreuid").return { name = "setreuid" retstr = returnstr(1) } @@ -1855,14 +1998,16 @@ probe syscall.setreuid16.return = kernel.function("sys_setreuid16").return ? { # sys_setrlimit(unsigned int resource, # struct rlimit __user *rlim) # -probe syscall.setrlimit = kernel.function("sys_setrlimit") { +probe syscall.setrlimit = kernel.function("SyS_setrlimit") !, + kernel.function("sys_setrlimit") { name = "setrlimit" resource = $resource rlim_uaddr = $rlim argstr = sprintf("%s, %s", _rlimit_resource_str($resource), _struct_rlimit_u($rlim)) } -probe syscall.setrlimit.return = kernel.function("sys_setrlimit").return { +probe syscall.setrlimit.return = kernel.function("SyS_setrlimit").return !, + kernel.function("sys_setrlimit").return { name = "setrlimit" retstr = returnstr(1) } @@ -1888,8 +2033,9 @@ probe syscall.setsid.return = kernel.function("sys_setsid").return { # int optlen) # probe syscall.setsockopt = - kernel.function("sys_setsockopt") ?, - kernel.function("compat_sys_setsockopt") ? + kernel.function("compat_sys_setsockopt") ?, + kernel.function("SyS_setsockopt") !, + kernel.function("sys_setsockopt") ? { name = "setsockopt" fd = $fd @@ -1903,8 +2049,9 @@ probe syscall.setsockopt = optname_str, $optval, $optlen) } probe syscall.setsockopt.return = - kernel.function("sys_setsockopt").return ?, - kernel.function("compat_sys_setsockopt").return ? + kernel.function("compat_sys_setsockopt").return ?, + kernel.function("SyS_setsockopt").return !, + kernel.function("sys_setsockopt").return ? { name = "setsockopt" retstr = returnstr(1) @@ -1915,12 +2062,14 @@ probe syscall.setsockopt.return = # asmlinkage long # sys_set_tid_address(int __user *tidptr) # -probe syscall.set_tid_address = kernel.function("sys_set_tid_address") { +probe syscall.set_tid_address = kernel.function("SyS_set_tid_address") !, + kernel.function("sys_set_tid_address") { name = "set_tid_address" tidptr_uaddr = $tidptr argstr = sprintf("%p", tidptr_uaddr) } probe syscall.set_tid_address.return = + kernel.function("SyS_set_tid_address").return !, kernel.function("sys_set_tid_address").return { name = "set_tid_address" retstr = returnstr(1) @@ -1930,13 +2079,15 @@ probe syscall.set_tid_address.return = # long sys_settimeofday(struct timeval __user *tv, # struct timezone __user *tz) # -probe syscall.settimeofday = kernel.function("sys_settimeofday") { +probe syscall.settimeofday = kernel.function("SyS_settimeofday") !, + kernel.function("sys_settimeofday") { name = "settimeofday" tv_uaddr = $tv tz_uaddr = $tz argstr = sprintf("%s, %s", _struct_timeval_u($tv, 1), _struct_timezone_u($tz)) } -probe syscall.settimeofday.return = kernel.function("sys_settimeofday").return { +probe syscall.settimeofday.return = kernel.function("SyS_settimeofday").return !, + kernel.function("sys_settimeofday").return { name = "settimeofday" retstr = returnstr(1) } @@ -1968,6 +2119,7 @@ probe syscall.settimeofday32.return = # probe syscall.setuid = kernel.function("sys_setuid16") ?, + kernel.function("SyS_setuid") !, kernel.function("sys_setuid") { name = "setuid" @@ -1976,6 +2128,7 @@ probe syscall.setuid = } probe syscall.setuid.return = kernel.function("sys_setuid16").return ?, + kernel.function("SyS_setuid").return !, kernel.function("sys_setuid").return { name = "setuid" @@ -1989,7 +2142,8 @@ probe syscall.setuid.return = # size_t size, # int flags) # -probe syscall.setxattr = kernel.function("sys_setxattr") { +probe syscall.setxattr = kernel.function("SyS_setxattr") !, + kernel.function("sys_setxattr") { name = "setxattr" %( kernel_v >= "2.6.27" %? path_uaddr = $pathname @@ -2012,7 +2166,8 @@ probe syscall.setxattr = kernel.function("sys_setxattr") { user_string_quoted($name), value_uaddr, $size, $flags) } -probe syscall.setxattr.return = kernel.function("sys_setxattr").return { +probe syscall.setxattr.return = kernel.function("SyS_setxattr").return !, + kernel.function("sys_setxattr").return { name = "setxattr" retstr = returnstr(1) } @@ -2033,14 +2188,16 @@ probe syscall.sgetmask.return = kernel.function("sys_sgetmask").return ? { # # long sys_shmat(int shmid, char __user *shmaddr, int shmflg) # -probe syscall.shmat = kernel.function("sys_shmat") ? { +probe syscall.shmat = kernel.function("SyS_shmat") !, + kernel.function("sys_shmat") ? { name = "shmat" shmid = $shmid shmaddr_uaddr = $shmaddr shmflg = $shmflg argstr = sprintf("%d, %p, %s", $shmid, $shmaddr, _shmat_flags_str($shmflg)) } -probe syscall.shmat.return = kernel.function("sys_shmat").return ? { +probe syscall.shmat.return = kernel.function("SyS_shmat").return !, + kernel.function("sys_shmat").return ? { name = "shmat" retstr = returnstr(1) } @@ -2068,14 +2225,16 @@ probe syscall.compat_sys_shmat.return = kernel.function("compat_sys_shmat").retu # int cmd, # struct shmid_ds __user *buf) # -probe syscall.shmctl = kernel.function("sys_shmctl") ? { +probe syscall.shmctl = kernel.function("SyS_shmctl") !, + kernel.function("sys_shmctl") ? { name = "shmctl" shmid = $shmid cmd = $cmd buf_uaddr = $buf argstr = sprintf("%d, %s, %p", $shmid, _semctl_cmd($cmd), $buf) } -probe syscall.shmctl.return = kernel.function("sys_shmctl").return ? { +probe syscall.shmctl.return = kernel.function("SyS_shmctl").return !, + kernel.function("sys_shmctl").return ? { name = "shmctl" retstr = returnstr(1) } @@ -2099,12 +2258,14 @@ probe syscall.compat_sys_shmctl.return = kernel.function("compat_sys_shmctl").re # # long sys_shmdt(char __user *shmaddr) # -probe syscall.shmdt = kernel.function("sys_shmdt") ? { +probe syscall.shmdt = kernel.function("SyS_shmdt") !, + kernel.function("sys_shmdt") ? { name = "shmdt" shmaddr_uaddr = $shmaddr argstr = sprintf("%p", $shmaddr) } -probe syscall.shmdt.return = kernel.function("sys_shmdt").return ? { +probe syscall.shmdt.return = kernel.function("SyS_shmdt").return !, + kernel.function("sys_shmdt").return ? { name = "shmdt" retstr = returnstr(1) } @@ -2115,14 +2276,16 @@ probe syscall.shmdt.return = kernel.function("sys_shmdt").return ? { # size_t size, # int shmflg) # -probe syscall.shmget = kernel.function("sys_shmget") ? { +probe syscall.shmget = kernel.function("SyS_shmget") !, + kernel.function("sys_shmget") ? { name = "shmget" key = $key size = $size shmflg = $shmflg argstr = sprintf("%d, %d, %d", $key, $size, $shmflg) } -probe syscall.shmget.return = kernel.function("sys_shmget").return ? { +probe syscall.shmget.return = kernel.function("SyS_shmget").return !, + kernel.function("sys_shmget").return ? { name = "shmget" retstr = returnstr(1) } @@ -2131,14 +2294,16 @@ probe syscall.shmget.return = kernel.function("sys_shmget").return ? { # # long sys_shutdown(int fd, int how) # -probe syscall.shutdown = kernel.function("sys_shutdown") ? { +probe syscall.shutdown = kernel.function("SyS_shutdown") !, + kernel.function("sys_shutdown") ? { name = "shutdown" s = $fd how = $how how_str = _shutdown_how_str($how) argstr = sprintf("%d, %s", $fd, how_str) } -probe syscall.shutdown.return = kernel.function("sys_shutdown").return ? { +probe syscall.shutdown.return = kernel.function("SyS_shutdown").return !, + kernel.function("sys_shutdown").return ? { name = "shutdown" retstr = returnstr(1) } @@ -2173,13 +2338,15 @@ probe syscall.sigaction32.return = kernel.function("sys32_sigaction").return ? { # signal _____________________________________________________ # unsigned long sys_signal(int sig, __sighandler_t handler) # -probe syscall.signal = kernel.function("sys_signal") ? { +probe syscall.signal = kernel.function("SyS_signal") !, + kernel.function("sys_signal") ? { name = "signal" sig = $sig handler = $handler argstr = sprintf("%s, %s", _signal_name($sig), _sighandler_str($handler)) } -probe syscall.signal.return = kernel.function("sys_signal").return ? { +probe syscall.signal.return = kernel.function("SyS_signal").return !, + kernel.function("sys_signal").return ? { name = "signal" retstr = returnstr(1) } @@ -2190,11 +2357,13 @@ probe syscall.signal.return = kernel.function("sys_signal").return ? { # long compat_sys_signalfd(int ufd, const compat_sigset_t __user *sigmask, # compat_size_t sigsetsize) # -probe syscall.signalfd = kernel.function("sys_signalfd") ? { +probe syscall.signalfd = kernel.function("SyS_signalfd") !, + kernel.function("sys_signalfd") ? { name = "signalfd" argstr = sprintf("%d, %p, %d", $ufd, $user_mask, $sizemask) } -probe syscall.signalfd.return = kernel.function("sys_signalfd").return ? { +probe syscall.signalfd.return = kernel.function("SyS_signalfd").return !, + kernel.function("sys_signalfd").return ? { name = "signalfd" retstr = returnstr(1) } @@ -2210,11 +2379,13 @@ probe syscall.compat_signalfd.return = kernel.function("compat_sys_signalfd").re # sigpending _________________________________________________ # long sys_sigpending(old_sigset_t __user *set) # -probe syscall.sigpending = kernel.function("sys_sigpending") ? { +probe syscall.sigpending = kernel.function("SyS_sigpending") !, + kernel.function("sys_sigpending") ? { name = "sigpending" argstr = sprintf("%p", $set) } -probe syscall.sigpending.return = kernel.function("sys_sigpending").return ? { +probe syscall.sigpending.return = kernel.function("SyS_sigpending").return !, + kernel.function("sys_sigpending").return ? { name = "sigpending" retstr = returnstr(1) } @@ -2222,7 +2393,8 @@ probe syscall.sigpending.return = kernel.function("sys_sigpending").return ? { # sigprocmask ________________________________________________ # long sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset) # -probe syscall.sigprocmask = kernel.function("sys_sigprocmask") ? +probe syscall.sigprocmask = kernel.function("SyS_sigprocmask") !, + kernel.function("sys_sigprocmask") ? { name = "sigprocmask" how = $how @@ -2231,7 +2403,8 @@ probe syscall.sigprocmask = kernel.function("sys_sigprocmask") ? oldset_uaddr = $oset argstr = sprintf("%s, %p, %p", how_str, $set, $oset) } -probe syscall.sigprocmask.return = kernel.function("sys_sigprocmask").return ? +probe syscall.sigprocmask.return = kernel.function("SyS_sigprocmask").return !, + kernel.function("sys_sigprocmask").return ? { name = "sigprocmask" retstr = returnstr(1) @@ -2275,7 +2448,8 @@ probe syscall.sigsuspend.return = # socket _____________________________________________________ # long sys_socket(int family, int type, int protocol) # -probe syscall.socket = kernel.function("sys_socket") ? { +probe syscall.socket = kernel.function("SyS_socket") !, + kernel.function("sys_socket") ? { name = "socket" family = $family type = $type @@ -2284,7 +2458,8 @@ probe syscall.socket = kernel.function("sys_socket") ? { _sock_type_str($type), $protocol) } -probe syscall.socket.return = kernel.function("sys_socket").return ? { +probe syscall.socket.return = kernel.function("SyS_socket").return !, + kernel.function("sys_socket").return ? { name = "socket" retstr = returnstr(1) } @@ -2311,7 +2486,8 @@ probe syscall.socket.return = kernel.function("sys_socket").return ? { # int protocol, # int __user *usockvec) # -probe syscall.socketpair = kernel.function("sys_socketpair") ? { +probe syscall.socketpair = kernel.function("SyS_socketpair") !, + kernel.function("sys_socketpair") ? { name = "socketpair" family = $family type = $type @@ -2322,7 +2498,8 @@ probe syscall.socketpair = kernel.function("sys_socketpair") ? { _sock_type_str($type), $protocol, sv_uaddr) } -probe syscall.socketpair.return = kernel.function("sys_socketpair").return ? { +probe syscall.socketpair.return = kernel.function("SyS_socketpair").return !, + kernel.function("sys_socketpair").return ? { name = "socketpair" retstr = returnstr(1) } @@ -2333,12 +2510,14 @@ probe syscall.socketpair.return = kernel.function("sys_socketpair").return ? { # int fd_out, loff_t __user *off_out, # size_t len, unsigned int flags) # -probe syscall.splice = kernel.function("sys_splice") ? { +probe syscall.splice = kernel.function("SyS_splice") !, + kernel.function("sys_splice") ? { name = "splice" argstr = sprintf("%d, %p, %d, %p, %d, 0x%x", $fd_in, $off_in, $fd_out, $off_out, $len, $flags) } -probe syscall.splice.return = kernel.function("sys_splice").return ? { +probe syscall.splice.return = kernel.function("SyS_splice").return !, + kernel.function("sys_splice").return ? { name = "splice" retstr = returnstr(1) } @@ -2347,12 +2526,14 @@ probe syscall.splice.return = kernel.function("sys_splice").return ? { # # long sys_ssetmask(int newmask) # -probe syscall.ssetmask = kernel.function("sys_ssetmask") ? { +probe syscall.ssetmask = kernel.function("SyS_ssetmask") !, + kernel.function("sys_ssetmask") ? { name = "ssetmask" newmask = $newmask argstr = sprint($newmask) } -probe syscall.ssetmask.return = kernel.function("sys_ssetmask").return ? { +probe syscall.ssetmask.return = kernel.function("SyS_ssetmask").return !, + kernel.function("sys_ssetmask").return ? { name = "ssetmask" retstr = returnstr(1) } @@ -2365,8 +2546,10 @@ probe syscall.ssetmask.return = kernel.function("sys_ssetmask").return ? { # long compat_sys_newstat(char __user * filename, struct compat_stat __user *statbuf) probe syscall.stat = kernel.function("sys_stat") ?, + kernel.function("SyS_newstat") ?, kernel.function("sys_newstat") ?, kernel.function("sys32_stat64") ?, + kernel.function("SyS_stat64") ?, kernel.function("sys_stat64") ?, kernel.function("sys_oabi_stat64") ?, kernel.function("compat_sys_newstat") ? @@ -2379,8 +2562,10 @@ probe syscall.stat = } probe syscall.stat.return = kernel.function("sys_stat").return ?, + kernel.function("SyS_newstat").return ?, kernel.function("sys_newstat").return ?, kernel.function("sys32_stat64").return ?, + kernel.function("SyS_stat64").return ?, kernel.function("sys_stat64").return ?, kernel.function("sys_oabi_stat64").return ?, kernel.function("compat_sys_newstat").return ? @@ -2394,8 +2579,9 @@ probe syscall.stat.return = # long compat_sys_statfs(const char __user *path, struct compat_statfs __user *buf) # probe syscall.statfs = - kernel.function("sys_statfs"), - kernel.function("compat_sys_statfs") ? + kernel.function("compat_sys_statfs") ?, + kernel.function("SyS_statfs") !, + kernel.function("sys_statfs") ? { name = "statfs" buf_uaddr = $buf @@ -2409,8 +2595,9 @@ probe syscall.statfs = } probe syscall.statfs.return = - kernel.function("sys_statfs").return, - kernel.function("compat_sys_statfs").return ? + kernel.function("compat_sys_statfs").return ?, + kernel.function("SyS_statfs").return !, + kernel.function("sys_statfs").return ? { name = "statfs" retstr = returnstr(1) @@ -2422,8 +2609,9 @@ probe syscall.statfs.return = # long compat_sys_statfs64(const char __user *path, compat_size_t sz, struct compat_statfs64 __user *buf) # probe syscall.statfs64 = - kernel.function("sys_statfs64") ?, - kernel.function("compat_sys_statfs64") ? + kernel.function("compat_sys_statfs64") ?, + kernel.function("SyS_statfs64") !, + kernel.function("sys_statfs64") ? { name = "statfs" sz = $sz @@ -2438,8 +2626,9 @@ probe syscall.statfs64 = } probe syscall.statfs64.return = - kernel.function("sys_statfs64").return ?, - kernel.function("compat_sys_statfs64").return ? + kernel.function("compat_sys_statfs64").return ?, + kernel.function("SyS_statfs64").return !, + kernel.function("sys_statfs64").return ? { name = "statfs" retstr = returnstr(1) @@ -2451,8 +2640,9 @@ probe syscall.statfs64.return = # long compat_sys_stime(compat_time_t __user *tptr) # probe syscall.stime = - kernel.function("sys_stime") ?, - kernel.function("compat_sys_stime") ? + kernel.function("compat_sys_stime") ?, + kernel.function("SyS_stime") !, + kernel.function("sys_stime") ? { name = "stime" t_uaddr = $tptr @@ -2460,8 +2650,9 @@ probe syscall.stime = argstr = sprintf("%p", $tptr) } probe syscall.stime.return = - kernel.function("sys_stime").return ?, - kernel.function("compat_sys_stime").return ? + kernel.function("compat_sys_stime").return ?, + kernel.function("SyS_stime").return !, + kernel.function("sys_stime").return ? { name = "stime" retstr = returnstr(1) @@ -2472,12 +2663,14 @@ probe syscall.stime.return = # asmlinkage long # sys_swapoff(const char __user * specialfile) # -probe syscall.swapoff = kernel.function("sys_swapoff")? { +probe syscall.swapoff = kernel.function("SyS_swapoff") !, + kernel.function("sys_swapoff") ? { name = "swapoff" path = user_string($specialfile) argstr = user_string_quoted($specialfile) } -probe syscall.swapoff.return = kernel.function("sys_swapoff").return ? { +probe syscall.swapoff.return = kernel.function("SyS_swapoff").return !, + kernel.function("sys_swapoff").return ? { name = "swapoff" retstr = returnstr(1) } @@ -2487,13 +2680,15 @@ probe syscall.swapoff.return = kernel.function("sys_swapoff").return ? { # sys_swapon(const char __user * specialfile, # int swap_flags) # -probe syscall.swapon = kernel.function("sys_swapon") ? { +probe syscall.swapon = kernel.function("SyS_swapon") !, + kernel.function("sys_swapon") ? { name = "swapon" path = user_string($specialfile) swapflags = $swap_flags argstr = sprintf("%s, %d", user_string_quoted($specialfile), swapflags) } -probe syscall.swapon.return = kernel.function("sys_swapon").return ? { +probe syscall.swapon.return = kernel.function("SyS_swapon").return !, + kernel.function("sys_swapon").return ? { name = "swapon" retstr = returnstr(1) } @@ -2501,14 +2696,16 @@ probe syscall.swapon.return = kernel.function("sys_swapon").return ? { # symlink ____________________________________________________ # long sys_symlink(const char __user * oldname, # const char __user * newname) -probe syscall.symlink = kernel.function("sys_symlink") { +probe syscall.symlink = kernel.function("SyS_symlink") !, + kernel.function("sys_symlink") { name = "symlink" oldpath = user_string($oldname) newpath = user_string($newname) argstr = sprintf("%s, %s", user_string_quoted($oldname), user_string_quoted($newname)) } -probe syscall.symlink.return = kernel.function("sys_symlink").return { +probe syscall.symlink.return = kernel.function("SyS_symlink").return !, + kernel.function("sys_symlink").return { name = "symlink" retstr = returnstr(1) } @@ -2517,7 +2714,8 @@ probe syscall.symlink.return = kernel.function("sys_symlink").return { # new function with 2.6.16 # long sys_symlinkat(const char __user *oldname, int newdfd, # const char __user *newname) -probe syscall.symlinkat = kernel.function("sys_symlinkat") ? { +probe syscall.symlinkat = kernel.function("SyS_symlinkat") !, + kernel.function("sys_symlinkat") ? { name = "symlinkat" oldname = $oldname oldname_str = user_string($oldname) @@ -2528,7 +2726,8 @@ probe syscall.symlinkat = kernel.function("sys_symlinkat") ? { argstr = sprintf("%s, %s, %s", user_string_quoted($oldname), newdfd_str, user_string_quoted($newname)) } -probe syscall.symlinkat.return = kernel.function("sys_symlinkat").return ? { +probe syscall.symlinkat.return = kernel.function("SyS_symlinkat").return !, + kernel.function("sys_symlinkat").return ? { name = "symlinkat" retstr = returnstr(1) } @@ -2551,15 +2750,17 @@ probe syscall.sync.return = kernel.function("sys_sync").return { # long sys_sysctl(struct __sysctl_args __user *args) # probe syscall.sysctl = - kernel.function("sys_sysctl") ?, - kernel.function("compat_sys_sysctl") ? + kernel.function("compat_sys_sysctl") ?, + kernel.function("SyS_sysctl") !, + kernel.function("sys_sysctl") ? { name = "sysctl" argstr = sprintf("%p", $args) } probe syscall.sysctl.return = - kernel.function("sys_sysctl").return ?, - kernel.function("compat_sys_sysctl").return ? + kernel.function("compat_sys_sysctl").return ?, + kernel.function("SyS_sysctl").return !, + kernel.function("sys_sysctl").return ? { name = "sysctl" retstr = returnstr(1) @@ -2572,7 +2773,8 @@ probe syscall.sysctl.return = # unsigned long arg1, # unsigned long arg2) # -probe syscall.sysfs = kernel.function("sys_sysfs") { +probe syscall.sysfs = kernel.function("SyS_sysfs") !, + kernel.function("sys_sysfs") { name = "sysfs" option = $option arg1 = $arg1 @@ -2586,7 +2788,8 @@ probe syscall.sysfs = kernel.function("sys_sysfs") { else argstr = sprintf("%d, %d, %d", $option, $arg1, $arg2) } -probe syscall.sysfs.return = kernel.function("sys_sysfs").return { +probe syscall.sysfs.return = kernel.function("SyS_sysfs").return !, + kernel.function("sys_sysfs").return { name = "sysfs" retstr = returnstr(1) } @@ -2595,16 +2798,18 @@ probe syscall.sysfs.return = kernel.function("sys_sysfs").return { # long sys_sysinfo(struct sysinfo __user *info) # long compat_sys_sysinfo(struct compat_sysinfo __user *info) probe syscall.sysinfo = - kernel.function("sys_sysinfo"), - kernel.function("compat_sys_sysinfo") ? + kernel.function("compat_sys_sysinfo") ?, + kernel.function("SyS_sysinfo") !, + kernel.function("sys_sysinfo") { name = "sysinfo" info_uaddr = $info argstr = sprintf("%p", $info) } probe syscall.sysinfo.return = - kernel.function("sys_sysinfo").return, - kernel.function("compat_sys_sysinfo").return ? + kernel.function("compat_sys_sysinfo").return ?, + kernel.function("SyS_sysinfo").return !, + kernel.function("sys_sysinfo").return { name = "sysinfo" retstr = returnstr(1) @@ -2614,14 +2819,16 @@ probe syscall.sysinfo.return = # # long sys_syslog(int type, char __user * buf, int len) # -probe syscall.syslog = kernel.function("sys_syslog") { +probe syscall.syslog = kernel.function("SyS_syslog") !, + kernel.function("sys_syslog") { name = "syslog" type = $type bufp_uaddr = $buf len = $len argstr = sprintf("%d, %p, %d", $type, $buf, $len) } -probe syscall.syslog.return = kernel.function("sys_syslog").return { +probe syscall.syslog.return = kernel.function("SyS_syslog").return !, + kernel.function("sys_syslog").return { name = "syslog" retstr = returnstr(1) } @@ -2630,11 +2837,13 @@ probe syscall.syslog.return = kernel.function("sys_syslog").return { # # long sys_tee(int fdin, int fdout, size_t len, unsigned int flags) # -probe syscall.tee = kernel.function("sys_tee") ? { +probe syscall.tee = kernel.function("SyS_tee") !, + kernel.function("sys_tee") ? { name = "tee" argstr = sprintf("%d, %d, %d, 0x%x", $fdin, $fdout, $len, $flags) } -probe syscall.tee.return = kernel.function("sys_tee").return ? { +probe syscall.tee.return = kernel.function("SyS_tee").return !, + kernel.function("sys_tee").return ? { name = "tee" retstr = returnstr(1) } @@ -2646,14 +2855,16 @@ probe syscall.tee.return = kernel.function("sys_tee").return ? { # int pid, # int sig) # -probe syscall.tgkill = kernel.function("sys_tgkill") { +probe syscall.tgkill = kernel.function("SyS_tgkill") !, + kernel.function("sys_tgkill") { name = "tgkill" tgid = $tgid pid = $pid sig = $sig argstr = sprintf("%d, %d, %s", $tgid, $pid, _signal_name($sig)) } -probe syscall.tgkill.return = kernel.function("sys_tgkill").return { +probe syscall.tgkill.return = kernel.function("SyS_tgkill").return !, + kernel.function("sys_tgkill").return { name = "tgkill" retstr = returnstr(1) } @@ -2665,20 +2876,22 @@ probe syscall.tgkill.return = kernel.function("sys_tgkill").return { # long compat_sys_time(compat_time_t __user * tloc) # probe syscall.time = - kernel.function("sys_time")?, kernel.function("sys32_time") ?, kernel.function("sys_time64") ?, - kernel.function("compat_sys_time") ? + kernel.function("compat_sys_time") ?, + kernel.function("SyS_time") !, + kernel.function("sys_time") ? { name = "time" t_uaddr = $tloc argstr = sprintf("%p", $tloc) } probe syscall.time.return = - kernel.function("sys_time").return?, kernel.function("sys32_time").return ?, kernel.function("sys_time64").return ?, - kernel.function("compat_sys_time").return ? + kernel.function("compat_sys_time").return ?, + kernel.function("SyS_time").return !, + kernel.function("sys_time").return ? { name = "time" retstr = returnstr(1) @@ -2690,7 +2903,8 @@ probe syscall.time.return = # struct sigevent __user *timer_event_spec, # timer_t __user * created_timer_id) # -probe syscall.timer_create = kernel.function("sys_timer_create") { +probe syscall.timer_create = kernel.function("SyS_timer_create") !, + kernel.function("sys_timer_create") { name = "timer_create" clockid = $which_clock clockid_str = _get_wc_str($which_clock) @@ -2699,6 +2913,7 @@ probe syscall.timer_create = kernel.function("sys_timer_create") { argstr = sprintf("%s, %p, %p", clockid_str, $timer_event_spec, $created_timer_id) } probe syscall.timer_create.return = + kernel.function("SyS_timer_create").return !, kernel.function("sys_timer_create").return { name = "timer_create" retstr = returnstr(1) @@ -2708,12 +2923,14 @@ probe syscall.timer_create.return = # # long sys_timer_delete(timer_t timer_id) # -probe syscall.timer_delete = kernel.function("sys_timer_delete") { +probe syscall.timer_delete = kernel.function("SyS_timer_delete") !, + kernel.function("sys_timer_delete") { name = "timer_delete" timerid = $timer_id argstr = sprint($timer_id) } -probe syscall.timer_delete.return = kernel.function("sys_timer_delete").return { +probe syscall.timer_delete.return = kernel.function("SyS_timer_delete").return !, + kernel.function("sys_timer_delete").return { name = "timer_delete" retstr = returnstr(1) } @@ -2722,12 +2939,14 @@ probe syscall.timer_delete.return = kernel.function("sys_timer_delete").return { # # long sys_timer_getoverrun(timer_t timer_id) # -probe syscall.timer_getoverrun = kernel.function("sys_timer_getoverrun") { +probe syscall.timer_getoverrun = kernel.function("SyS_timer_getoverrun") !, + kernel.function("sys_timer_getoverrun") { name = "timer_getoverrun" timerid = $timer_id argstr = sprint($timer_id) } probe syscall.timer_getoverrun.return = + kernel.function("SyS_timer_getoverrun").return !, kernel.function("sys_timer_getoverrun").return { name = "timer_getoverrun" retstr = returnstr(1) @@ -2738,13 +2957,15 @@ probe syscall.timer_getoverrun.return = # long sys_timer_gettime(timer_t timer_id, # struct itimerspec __user *setting) # -probe syscall.timer_gettime = kernel.function("sys_timer_gettime") { +probe syscall.timer_gettime = kernel.function("SyS_timer_gettime") !, + kernel.function("sys_timer_gettime") { name = "timer_gettime" timerid = $timer_id value_uaddr = $setting argstr = sprintf("%d, %p", $timer_id, $setting) } probe syscall.timer_gettime.return = + kernel.function("SyS_timer_gettime").return !, kernel.function("sys_timer_gettime").return { name = "timer_gettime" retstr = returnstr(1) @@ -2757,7 +2978,8 @@ probe syscall.timer_gettime.return = # const struct itimerspec __user *new_setting, # struct itimerspec __user *old_setting) # -probe syscall.timer_settime = kernel.function("sys_timer_settime") { +probe syscall.timer_settime = kernel.function("SyS_timer_settime") !, + kernel.function("sys_timer_settime") { name = "timer_settime" timerid = $timer_id flags = $flags @@ -2768,6 +2990,7 @@ probe syscall.timer_settime = kernel.function("sys_timer_settime") { $old_setting) } probe syscall.timer_settime.return = + kernel.function("SyS_timer_settime").return !, kernel.function("sys_timer_settime").return { name = "timer_settime" retstr = returnstr(1) @@ -2800,15 +3023,17 @@ probe syscall.timerfd.return = # long sys_times(struct tms __user * tbuf) # long compat_sys_times(struct compat_tms __user *tbuf) probe syscall.times = - kernel.function("sys_times") ?, - kernel.function("compat_sys_times") ? + kernel.function("compat_sys_times") ?, + kernel.function("SyS_times") !, + kernel.function("sys_times") ? { name = "times" argstr = sprintf("%p", $tbuf) } probe syscall.times.return = - kernel.function("sys_times").return ?, - kernel.function("compat_sys_times").return ? + kernel.function("compat_sys_times").return ?, + kernel.function("SyS_times").return !, + kernel.function("sys_times").return ? { name = "times" retstr = returnstr(1) @@ -2820,13 +3045,15 @@ probe syscall.times.return = # sys_tkill(int pid, # int sig) # -probe syscall.tkill = kernel.function("sys_tkill") { +probe syscall.tkill = kernel.function("SyS_tkill") !, + kernel.function("sys_tkill") { name = "tkill" pid = $pid sig = $sig argstr = sprintf("%d, %s", $pid, _signal_name($sig)) } -probe syscall.tkill.return = kernel.function("sys_tkill").return { +probe syscall.tkill.return = kernel.function("SyS_tkill").return !, + kernel.function("sys_tkill").return { name = "tkill" retstr = returnstr(1) } @@ -2836,14 +3063,18 @@ probe syscall.tkill.return = kernel.function("sys_tkill").return { # sys_truncate(const char __user * path, unsigned long length) # sys_truncate64(const char __user * path, loff_t length) # -probe syscall.truncate = kernel.function("sys_truncate")?, kernel.function("sys_truncate64") ? { +probe syscall.truncate = kernel.function("SyS_truncate") !, + kernel.function("sys_truncate") ?, + kernel.function("sys_truncate64") ? { name = "truncate" path_uaddr = $path path = user_string($path) length = $length argstr = sprintf("%s, %d", user_string_quoted($path), $length) } -probe syscall.truncate.return = kernel.function("sys_truncate").return ?, kernel.function("sys_truncate64").return ? { +probe syscall.truncate.return = kernel.function("SyS_truncate").return !, + kernel.function("sys_truncate").return ?, + kernel.function("sys_truncate64").return ? { name = "truncate" retstr = returnstr(1) } @@ -2865,12 +3096,14 @@ probe syscall.tux.return = kernel.function("sys_tux").return ? { # umask ______________________________________________________ # long sys_umask(int mask) # -probe syscall.umask = kernel.function("sys_umask") { +probe syscall.umask = kernel.function("SyS_umask") !, + kernel.function("sys_umask") { name = "umask" mask = $mask argstr = sprintf("%#o", $mask) } -probe syscall.umask.return = kernel.function("sys_umask").return { +probe syscall.umask.return = kernel.function("SyS_umask").return !, + kernel.function("sys_umask").return { name = "umask" retstr = returnstr(3) } @@ -2878,14 +3111,16 @@ probe syscall.umask.return = kernel.function("sys_umask").return { # umount _____________________________________________________ # long sys_umount(char __user * name, int flags) # -probe syscall.umount = kernel.function("sys_umount") { +probe syscall.umount = kernel.function("SyS_umount") !, + kernel.function("sys_umount") { name = "umount" target = user_string($name) flags = $flags flags_str = _umountflags_str($flags) argstr = sprintf("%s, %s", user_string_quoted($name), flags_str) } -probe syscall.umount.return = kernel.function("sys_umount").return { +probe syscall.umount.return = kernel.function("SyS_umount").return !, + kernel.function("sys_umount").return { name = "umount" retstr = returnstr(1) } @@ -2902,6 +3137,7 @@ probe syscall.uname = kernel.function("sys_olduname") ?, kernel.function("sys32_olduname") ?, kernel.function("sys32_uname") ?, + kernel.function("SyS_newuname") !, kernel.function("sys_newuname") ? { name = "uname" @@ -2913,6 +3149,7 @@ probe syscall.uname.return = kernel.function("sys_olduname").return ?, kernel.function("sys32_olduname").return ?, kernel.function("sys32_uname").return ?, + kernel.function("SyS_newuname").return !, kernel.function("sys_newuname").return ? { name = "uname" @@ -2922,13 +3159,15 @@ probe syscall.uname.return = # unlink _____________________________________________________ # long sys_unlink(const char __user * pathname) # -probe syscall.unlink = kernel.function("sys_unlink") { +probe syscall.unlink = kernel.function("SyS_unlink") !, + kernel.function("sys_unlink") { name = "unlink" pathname_uaddr = $pathname pathname = user_string($pathname) argstr = user_string_quoted($pathname) } -probe syscall.unlink.return = kernel.function("sys_unlink").return { +probe syscall.unlink.return = kernel.function("SyS_unlink").return !, + kernel.function("sys_unlink").return { name = "unlink" retstr = returnstr(1) } @@ -2937,7 +3176,8 @@ probe syscall.unlink.return = kernel.function("sys_unlink").return { # new function with 2.6.16 # long sys_unlinkat(int dfd, const char __user *pathname, # int flag) -probe syscall.unlinkat = kernel.function("sys_unlinkat") ? { +probe syscall.unlinkat = kernel.function("SyS_unlinkat") !, + kernel.function("sys_unlinkat") ? { name = "unlinkat" dfd = $dfd dfd_str = _dfd_str($dfd) @@ -2947,7 +3187,8 @@ probe syscall.unlinkat = kernel.function("sys_unlinkat") ? { flag_str = _at_flag_str($flag) argstr = sprintf("%s, %s, %s", dfd_str, user_string_quoted($pathname), flag_str) } -probe syscall.unlinkat.return = kernel.function("sys_unlinkat").return ? { +probe syscall.unlinkat.return = kernel.function("SyS_unlinkat").return !, + kernel.function("sys_unlinkat").return ? { name = "unlinkat" retstr = returnstr(1) } @@ -2955,12 +3196,14 @@ probe syscall.unlinkat.return = kernel.function("sys_unlinkat").return ? { # unshare ____________________________________________________ # new function with 2.6.16 # long sys_unshare(unsigned long unshare_flags) -probe syscall.unshare = kernel.function("sys_unshare") ? { +probe syscall.unshare = kernel.function("SyS_unshare") !, + kernel.function("sys_unshare") ? { name = "unshare" unshare_flags = $unshare_flags argstr = __fork_flags(unshare_flags) } -probe syscall.unshare.return = kernel.function("sys_unshare").return ? { +probe syscall.unshare.return = kernel.function("SyS_unshare").return !, + kernel.function("sys_unshare").return ? { name = "unshare" retstr = returnstr(1) } @@ -2970,20 +3213,23 @@ probe syscall.unshare.return = kernel.function("sys_unshare").return ? { # asmlinkage long # sys_uselib(const char __user * library) # -probe syscall.uselib = kernel.function("sys_uselib") { +probe syscall.uselib = kernel.function("SyS_uselib") !, + kernel.function("sys_uselib") { name = "uselib" library_uaddr = $library library = user_string($library) argstr = user_string_quoted($library) } -probe syscall.uselib.return = kernel.function("sys_uselib").return { +probe syscall.uselib.return = kernel.function("SyS_uselib").return !, + kernel.function("sys_uselib").return { name = "uselib" retstr = returnstr(1) } # ustat ______________________________________________________ # long sys_ustat(unsigned dev, struct ustat __user * ubuf) # -probe syscall.ustat = kernel.function("sys_ustat") { +probe syscall.ustat = kernel.function("SyS_ustat") !, + kernel.function("sys_ustat") { name = "ustat" dev = $dev ubuf_uaddr = $ubuf @@ -2998,7 +3244,8 @@ probe syscall.ustat32 = kernel.function("sys32_ustat") ? { } probe syscall.ustat.return = - kernel.function("sys_ustat").return, + kernel.function("SyS_ustat").return ?, + kernel.function("sys_ustat").return?, kernel.function("sys32_ustat").return ? { name = "ustat" @@ -3007,7 +3254,8 @@ probe syscall.ustat.return = # utime ______________________________________________________ # long sys_utime(char __user * filename, struct utimbuf __user * times) -probe syscall.utime = kernel.function("sys_utime") ? { +probe syscall.utime = kernel.function("SyS_utime") !, + kernel.function("sys_utime") ? { name = "utime" filename_uaddr = $filename filename = user_string($filename) @@ -3017,7 +3265,8 @@ probe syscall.utime = kernel.function("sys_utime") ? { argstr = sprintf("%s, [%s, %s]", user_string_quoted($filename), ctime(actime), ctime(modtime)) } -probe syscall.utime.return = kernel.function("sys_utime").return ? { +probe syscall.utime.return = kernel.function("SyS_utime").return !, + kernel.function("sys_utime").return ? { name = "utime" retstr = returnstr(1) } @@ -3042,7 +3291,8 @@ probe syscall.compat_utime.return = kernel.function("compat_sys_utime").return ? # # long sys_utimes(char __user * filename, struct timeval __user * utimes) # -probe syscall.utimes = kernel.function("sys_utimes") { +probe syscall.utimes = kernel.function("SyS_utimes") !, + kernel.function("sys_utimes") { name = "utimes" filename_uaddr = $filename filename = user_string($filename) @@ -3050,7 +3300,8 @@ probe syscall.utimes = kernel.function("sys_utimes") { argstr = sprintf("%s, %s", user_string_quoted($filename), _struct_timeval_u($utimes, 2)) } -probe syscall.utimes.return = kernel.function("sys_utimes").return { +probe syscall.utimes.return = kernel.function("SyS_utimes").return !, + kernel.function("sys_utimes").return { name = "utimes" retstr = returnstr(1) } @@ -3073,7 +3324,8 @@ probe syscall.compat_sys_utimes.return = kernel.function("compat_sys_utimes").re # long sys_utimensat(int dfd, char __user *filename, struct timespec __user *utimes, int flags) # long compat_sys_utimensat(unsigned int dfd, char __user *filename, struct compat_timespec __user *t, int flags) # -probe syscall.utimensat = kernel.function("sys_utimensat") ? { +probe syscall.utimensat = kernel.function("SyS_utimensat") !, + kernel.function("sys_utimensat") ? { name = "utimensat" argstr = sprintf("%s, %s, %s, %s", _dfd_str($dfd), user_string_quoted($filename), _struct_timespec_u($utimes,2), _at_flag_str($flags)) @@ -3083,7 +3335,8 @@ probe syscall.compat_utimensat = kernel.function("compat_sys_utimensat") ? { argstr = sprintf("%s, %s, %s, %s", _dfd_str($dfd), user_string_quoted($filename), _struct_compat_timespec_u($t,2), _at_flag_str($flags)) } -probe syscall.utimensat.return = kernel.function("sys_utimensat").return ? { +probe syscall.utimensat.return = kernel.function("SyS_utimensat").return !, + kernel.function("sys_utimensat").return ? { name = "utimensat" retstr = returnstr(1) } @@ -3113,7 +3366,8 @@ probe syscall.vhangup.return = kernel.function("sys_vhangup").return { # long compat_sys_vmsplice(int fd, const struct compat_iovec __user *iov32, # unsigned int nr_segs, unsigned int flags) # -probe syscall.vmsplice = kernel.function("sys_vmsplice") ? { +probe syscall.vmsplice = kernel.function("SyS_vmsplice") !, + kernel.function("sys_vmsplice") ? { name = "vmsplice" argstr = sprintf("%d, %p, %d, 0x%x", $fd, $iov, $nr_segs, $flags) } @@ -3121,7 +3375,8 @@ probe syscall.compat_vmsplice = kernel.function("compat_sys_vmsplice") ? { name = "vmsplice" argstr = sprintf("%d, %p, %d, 0x%x", $fd, $iov32, $nr_segs, $flags) } -probe syscall.vmsplice.return = kernel.function("sys_vmsplice").return ? { +probe syscall.vmsplice.return = kernel.function("SyS_vmsplice").return !, + kernel.function("sys_vmsplice").return ? { name = "vmsplice" retstr = returnstr(1) } @@ -3137,7 +3392,8 @@ probe syscall.compat_vmsplice.return = kernel.function("compat_sys_vmsplice").re # int options, # struct rusage __user *ru) # -probe syscall.wait4 = kernel.function("sys_wait4") { +probe syscall.wait4 = kernel.function("SyS_wait4") !, + kernel.function("sys_wait4") { name = "wait4" pid = %( kernel_vr >= "2.6.25" %? $upid %: $pid%) status_uaddr = $stat_addr @@ -3148,7 +3404,8 @@ probe syscall.wait4 = kernel.function("sys_wait4") { %( kernel_vr >= "2.6.25" %? $upid %: $pid%), $stat_addr,_wait4_opt_str($options), $ru) } -probe syscall.wait4.return = kernel.function("sys_wait4").return { +probe syscall.wait4.return = kernel.function("SyS_wait4").return !, + kernel.function("sys_wait4").return { name = "wait4" retstr = returnstr(1) } @@ -3160,7 +3417,8 @@ probe syscall.wait4.return = kernel.function("sys_wait4").return { # int options, # struct rusage __user *ru) # -probe syscall.waitid = kernel.function("sys_waitid") { +probe syscall.waitid = kernel.function("SyS_waitid") !, + kernel.function("sys_waitid") { name = "waitid" pid = %( kernel_vr >= "2.6.25" %? $upid %: $pid%) which = $which @@ -3173,7 +3431,8 @@ probe syscall.waitid = kernel.function("sys_waitid") { %( kernel_vr >= "2.6.25" %? $upid %: $pid%), $infop, _waitid_opt_str($options), $ru) } -probe syscall.waitid.return = kernel.function("sys_waitid").return { +probe syscall.waitid.return = kernel.function("SyS_waitid").return !, + kernel.function("sys_waitid").return { name = "waitid" retstr = returnstr(1) } @@ -3185,7 +3444,8 @@ probe syscall.waitid.return = kernel.function("sys_waitid").return { # int options, # struct rusage __user *ru) # -probe syscall.waitpid = kernel.function("sys_wait4") { +probe syscall.waitpid = kernel.function("SyS_wait4") !, + kernel.function("sys_wait4") { name = "waitpid" pid = $pid status_uaddr = $stat_addr @@ -3195,7 +3455,8 @@ probe syscall.waitpid = kernel.function("sys_wait4") { argstr = sprintf("%d, %p, %s, %p", $pid, $stat_addr, options_str, $ru) } -probe syscall.waitpid.return = kernel.function("sys_wait4").return { +probe syscall.waitpid.return = kernel.function("SyS_wait4").return !, + kernel.function("sys_wait4").return { name = "waitpid" retstr = returnstr(1) } @@ -3207,14 +3468,16 @@ probe syscall.waitpid.return = kernel.function("sys_wait4").return { # const char __user * buf, # size_t count) # -probe syscall.write = kernel.function("sys_write") { +probe syscall.write = kernel.function("SyS_write") !, + kernel.function("sys_write") { name = "write" fd = $fd buf_uaddr = $buf count = $count argstr = sprintf("%d, %s, %d", $fd, text_strn(user_string($buf),syscall_string_trunc,1), $count) } -probe syscall.write.return = kernel.function("sys_write").return { +probe syscall.write.return = kernel.function("SyS_write").return !, + kernel.function("sys_write").return { name = "write" retstr = returnstr(1) } @@ -3229,8 +3492,9 @@ probe syscall.write.return = kernel.function("sys_write").return { # unsigned long vlen) # probe syscall.writev = - kernel.function("sys_writev"), - kernel.function("compat_sys_writev") ? + kernel.function("compat_sys_writev") ?, + kernel.function("SyS_writev") !, + kernel.function("sys_writev") { name = "writev" vector_uaddr = $vec @@ -3244,8 +3508,9 @@ probe syscall.writev = %) } probe syscall.writev.return = - kernel.function("sys_writev").return, - kernel.function("compat_sys_writev").return ? + kernel.function("compat_sys_writev").return ?, + kernel.function("SyS_writev").return !, + kernel.function("sys_writev").return { name = "writev" retstr = returnstr(1) diff --git a/tapset/task.stp b/tapset/task.stp index 684cef93..f1a10b0a 100644 --- a/tapset/task.stp +++ b/tapset/task.stp @@ -43,35 +43,55 @@ function task_parent:long (task:long) %{ /* pure */ // TASK_TRACED 8 // EXIT_ZOMBIE 16 // EXIT_DEAD 32 -function task_state:long (task:long) %{ /* pure */ - struct task_struct *t = (struct task_struct *)(long)THIS->task; - THIS->__retvalue = kread(&(t->state)); - CATCH_DEREF_FAULT(); -%} +function task_state:long (task:long) +{ + return @cast(task, "task_struct", "kernel")->state +} // Return the name of the given task -function task_execname:string (task:long) %{ /* pure */ - struct task_struct *t = (struct task_struct *)(long)THIS->task; - deref_string(THIS->__retvalue, t->comm, MAXSTRINGLEN); - CATCH_DEREF_FAULT(); -%} +function task_execname:string (task:long) +{ + return kernel_string(@cast(task, "task_struct", "kernel")->comm) +} // Return the process id of the given task -function task_pid:long (task:long) %{ /* pure */ - struct task_struct *t = (struct task_struct *)(long)THIS->task; - THIS->__retvalue = kread(&(t->tgid)); +function task_pid:long (task:long) +{ + return @cast(task, "task_struct", "kernel")->tgid +} + + +// Return the task of the given process id +function pid2task:long (pid:long) %{ /* pure */ + struct task_struct *t = NULL; + pid_t t_pid = (pid_t)(long)THIS->pid; + rcu_read_lock(); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) + t = find_task_by_vpid (t_pid); +#else + t = find_task_by_pid (t_pid); +#endif + rcu_read_unlock(); + THIS->__retvalue = (long)t; CATCH_DEREF_FAULT(); %} +// Return the name of the given process id +function pid2execname:string (pid:long) { + tsk = pid2task(pid) + if (tsk) + return task_execname(tsk) + return "" +} + // Return the thread id of the given task -function task_tid:long (task:long) %{ /* pure */ - struct task_struct *t = (struct task_struct *)(long)THIS->task; - THIS->__retvalue = kread(&(t->pid)); - CATCH_DEREF_FAULT(); -%} +function task_tid:long (task:long) +{ + return @cast(task, "task_struct", "kernel")->pid +} // Return the group id of the given task @@ -156,22 +176,14 @@ function task_nice:long (task:long) %{ /* pure */ // Return the scheduled cpu for the given task function task_cpu:long (task:long) +{ %( kernel_v >= "2.6.22" %? -%{ /* pure */ - struct task_struct *t = (struct task_struct *)(long)THIS->task; - struct thread_info *ti = kread(&(t->stack)); - THIS->__retvalue = kread(&(ti->cpu)); - CATCH_DEREF_FAULT(); -%} + ti = @cast(task, "task_struct", "kernel")->stack %: -%{ /* pure */ - struct task_struct *t = (struct task_struct *)(long)THIS->task; - struct thread_info *ti = kread(&(t->thread_info)); - THIS->__retvalue = kread(&(ti->cpu)); - CATCH_DEREF_FAULT(); -%} + ti = @cast(task, "task_struct", "kernel")->thread_info %) - + return @cast(ti, "thread_info", "kernel")->cpu +} // Return the number of open file handlers for the given task function task_open_file_handles:long (task:long) diff --git a/tapset/tcp.stp b/tapset/tcp.stp index 995d6abc..1375f115 100644 --- a/tapset/tcp.stp +++ b/tapset/tcp.stp @@ -7,7 +7,9 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// This family of probe points is used to probe events that occur in the TCP layer, +// </tapsetdescription> %{ #include <linux/version.h> #include <net/sock.h> diff --git a/tapset/timestamp.stp b/tapset/timestamp.stp index 29763cb9..0b9d350a 100644 --- a/tapset/timestamp.stp +++ b/tapset/timestamp.stp @@ -6,11 +6,11 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - -%{ -#include <linux/time.h> -%} - +// <tapsetdescription> +// Each timestamp function returns a value to indicate when a function is executed. These +//returned values can then be used to indicate when an event occurred, provide an ordering for events, +//or compute the amount of time elapsed between two time stamps. +// </tapsetdescription> /** * sfunction get_cycles - Processor cycle count. * @@ -21,43 +21,4 @@ function get_cycles:long () %{ /* pure */ THIS->__retvalue = (int64_t) c; %} - -/** - * sfunction gettimeofday_ns - Number of nanoseconds since UNIX epoch. - * - * Return the number of nanoseconds since the UNIX epoch. - */ -function gettimeofday_ns:long () %{ /* pure */ - /* NOTE: we can't use do_gettimeofday because we could be called from a - * context where xtime_lock is already held. See bug #2525. */ - THIS->__retvalue = _stp_gettimeofday_ns(); -%} - -/** - * sfunction gettimeofday_us - Number of microseconds since UNIX epoch. - * - * Return the number of microseconds since the UNIX epoch. - */ -function gettimeofday_us:long () { - return gettimeofday_ns() / 1000; -} - -/** - * sfunction gettimeofday_ms - Number of milliseconds since UNIX epoch. - * - * Return the number of milliseconds since the UNIX epoch. - */ -function gettimeofday_ms:long () { - return gettimeofday_ns() / 1000000; -} - -/** - * sfunction gettimeofday_s - Number of seconds since UNIX epoch. - * - * Return the number of seconds since the UNIX epoch. - */ -function gettimeofday_s:long () { - return gettimeofday_ns() / 1000000000; -} - // likewise jiffies, monotonic_clock ... diff --git a/tapset/timestamp_gtod.stp b/tapset/timestamp_gtod.stp new file mode 100644 index 00000000..43b127dc --- /dev/null +++ b/tapset/timestamp_gtod.stp @@ -0,0 +1,68 @@ +// timestamp tapset -- gettimeofday variants +// Copyright (C) 2005-2009 Red Hat Inc. +// Copyright (C) 2006 Intel Corporation. +// +// This file is part of systemtap, and is free software. You can +// redistribute it and/or modify it under the terms of the GNU General +// Public License (GPL); either version 2, or (at your option) any +// later version. + +function _gettimeofday_init:long() %{ + THIS->__retvalue = _stp_init_time(); /* Kick off the Big Bang. */ +%} + +probe begin(-0x8000000000000000) { + if (_gettimeofday_init() != 0) + error("couldn't initialize gettimeofday") +} + +function _gettimeofday_kill() %{ + _stp_kill_time(); /* Go to a beach. Drink a beer. */ +%} + +probe end(0x7FFFFFFFFFFFFFFF), error(0x7FFFFFFFFFFFFFFF) { + _gettimeofday_kill() +} + + +/** + * sfunction gettimeofday_ns - Number of nanoseconds since UNIX epoch. + * + * Return the number of nanoseconds since the UNIX epoch. + */ +function gettimeofday_ns:long () %{ /* pure */ + /* NOTE: we can't use do_gettimeofday because we could be called from a + * context where xtime_lock is already held. See bug #2525. */ + THIS->__retvalue = _stp_gettimeofday_ns(); + if (THIS->__retvalue < 0) + CONTEXT->last_error = "gettimeofday not initialized"; +%} + +/** + * sfunction gettimeofday_us - Number of microseconds since UNIX epoch. + * + * Return the number of microseconds since the UNIX epoch. + */ +function gettimeofday_us:long () { + return gettimeofday_ns() / 1000; +} + +/** + * sfunction gettimeofday_ms - Number of milliseconds since UNIX epoch. + * + * Return the number of milliseconds since the UNIX epoch. + */ +function gettimeofday_ms:long () { + return gettimeofday_ns() / 1000000; +} + +/** + * sfunction gettimeofday_s - Number of seconds since UNIX epoch. + * + * Return the number of seconds since the UNIX epoch. + */ +function gettimeofday_s:long () { + return gettimeofday_ns() / 1000000000; +} + +// likewise jiffies, monotonic_clock ... diff --git a/tapset/udp.stp b/tapset/udp.stp index 707cf77d..2255074a 100644 --- a/tapset/udp.stp +++ b/tapset/udp.stp @@ -5,7 +5,9 @@ // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. - +// <tapsetdescription> +// This family of probe points is used to probe events that occur in the UDP layer. +// </tapsetdescription> %{ #include <linux/version.h> #include <net/sock.h> @@ -15,12 +17,12 @@ /** * probe udp.sendmsg - Fires whenever a process sends a UDP message - * @name: Name of this probe - * @sock: Network socket - * @size: Number of bytes to send + * @name: The name of this probe + * @sock: Network socket used by the process + * @size: Number of bytes sent by the process * * Context: - * The process which sends a udp message + * The process which sent a UDP message */ probe udp.sendmsg = kernel.function("udp_sendmsg") { name = "udp.sendmsg" @@ -30,11 +32,11 @@ probe udp.sendmsg = kernel.function("udp_sendmsg") { /** * probe udp.sendmsg.return - Fires whenever an attempt to send a UDP message is completed - * @name: Name of this probe - * @size: Number of bytes sent + * @name: The name of this probe + * @size: Number of bytes sent by the process * * Context: - * The process which sends a udp message + * The process which sent a UDP message */ probe udp.sendmsg.return = kernel.function("udp_sendmsg").return { name = "udp.sendmsg" @@ -43,12 +45,12 @@ probe udp.sendmsg.return = kernel.function("udp_sendmsg").return { /** * probe udp.recvmsg - Fires whenever a UDP message is received - * @name: Name of this probe - * @sock: Network socket - * @size: Number of bytes received + * @name: The name of this probe + * @sock: Network socket used by the process + * @size: Number of bytes received by the process * * Context: - * The process which receives a udp message + * The process which received a UDP message */ probe udp.recvmsg = kernel.function("udp_recvmsg") { name = "udp.recvmsg" @@ -57,12 +59,12 @@ probe udp.recvmsg = kernel.function("udp_recvmsg") { } /** - * probe udp.recvmsg.return - An attempt to receive a UDP message received has been completed - * @name: Name of this probe - * @size: Number of bytes received + * probe udp.recvmsg.return - Fires whenever an attempt to receive a UDP message received is completed + * @name: The name of this probe + * @size: Number of bytes received by the process * * Context: - * The process which receives a udp message + * The process which received a UDP message */ probe udp.recvmsg.return = kernel.function("udp_recvmsg").return { name = "udp.recvmsg" @@ -70,13 +72,13 @@ probe udp.recvmsg.return = kernel.function("udp_recvmsg").return { } /** - * probe udp.disconnect - A process requests for UPD to be UDP disconnected - * @name: Name of this probe - * @sock: Network socket + * probe udp.disconnect - Fires when a process requests for a UDP disconnection + * @name: The name of this probe + * @sock: Network socket used by the process * @flags: Flags (e.g. FIN, etc) * * Context: - * The process which disconnects UDP + * The process which requests a UDP disconnection */ probe udp.disconnect = kernel.function("udp_disconnect") { name = "udp.disconnect" @@ -86,11 +88,11 @@ probe udp.disconnect = kernel.function("udp_disconnect") { /** * probe udp.disconnect.return - UDP has been disconnected successfully - * @name: Name of this probe + * @name: The name of this probe * @ret: Error code (0: no error) * * Context: - * The process which disconnects udp + * The process which requested a UDP disconnection */ probe udp.disconnect.return = kernel.function("udp_disconnect").return { name = "udp.disconnect" diff --git a/tapset/vfs.stp b/tapset/vfs.stp index 43603177..23d95098 100644 --- a/tapset/vfs.stp +++ b/tapset/vfs.stp @@ -51,139 +51,93 @@ function ppos_pos:long (ppos:long) %{ /* pure */ CATCH_DEREF_FAULT(); %} -function __page_ino:long (page:long) %{ /* pure */ - struct page *page = (struct page *)(long)THIS->page; - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - if (mapping == NULL) { - THIS->__retvalue = -1; - } else { - struct inode *host = kread(&(mapping->host)); - THIS->__retvalue = kread(&(host->i_ino)); - } - CATCH_DEREF_FAULT(); -%} - -function __address_inode:long (page:long) %{ /* pure */ - struct page *page = (struct page *)(long)THIS->page; - struct address_space *mapping = kread(&(page->mapping)); - if (mapping == NULL) { - THIS->__retvalue = -1; - } else { - THIS->__retvalue = (long)kread(&(mapping->host)); - } - CATCH_DEREF_FAULT(); -%} +function __address_inode:long (page:long) +{ + mapping = page? @cast(page, "page", "kernel")->mapping : 0 + if (mapping == 0) + return -1 + else + return @cast(mapping, "address_space", "kernel")->host +} -function __page_dev:long (page:long) %{ /* pure */ - struct page *page = (struct page *)(long)THIS->page; - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - if (mapping == NULL) { - THIS->__retvalue = -1; - } else { - struct inode *host = kread(&(mapping->host)); - struct super_block *i_sb = kread(&(host->i_sb)); - THIS->__retvalue = kread(&(i_sb->s_dev)); - } - CATCH_DEREF_FAULT(); -%} +function __page_ino:long (page:long) +{ + host = __address_inode(page) + if (host == -1) + return -1 + else + return @cast(host, "inode", "kernel")->i_ino +} -function __page_bdev:long (page:long) %{ /* pure */ - struct page *page = (struct page *)(long)THIS->page; - struct address_space *mapping = page? kread(&(page->mapping)) : NULL; - if (mapping == NULL) { - THIS->__retvalue = 0; - } else { - struct inode *host = kread(&(mapping->host)); - struct super_block *i_sb = kread(&(host->i_sb)); - THIS->__retvalue = (long)kread(&(i_sb->s_bdev)); - } - CATCH_DEREF_FAULT(); -%} +function __page_dev:long (page:long) +{ + host = __address_inode(page) + if (host == -1) + return -1 + return @cast(host, "inode", "kernel")->i_sb->s_dev +} -function __page_index:long (page:long) %{ /* pure */ - struct page *page = (struct page *)(long)THIS->page; - THIS->__retvalue = (long)kread(&(page->index)); - CATCH_DEREF_FAULT(); -%} +function __page_bdev:long (page:long) +{ + host = __address_inode(page) + if (host == -1) + return 0 + return @cast(host, "inode", "kernel")->i_sb->s_bdev +} -function __file_dev:long (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - if (dentry == NULL) { - THIS->__retvalue = 0; - } else { - struct inode *d_inode = kread(&(dentry->d_inode)); - struct super_block *i_sb = kread(&(d_inode->i_sb)); - THIS->__retvalue = kread(&(i_sb->s_dev)); - } - CATCH_DEREF_FAULT(); -%} +function __page_index:long (page:long) +{ + return @cast(page, "page", "kernel")->index +} -function __file_bdev:long (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - if (dentry == NULL) { - THIS->__retvalue = 0; - } else { - struct inode *d_inode = kread(&(dentry->d_inode)); - struct super_block *i_sb = kread(&(d_inode->i_sb)); - THIS->__retvalue = (long)kread(&(i_sb->s_bdev)); - } - CATCH_DEREF_FAULT(); -%} +function __file_dev:long (file:long) +{ + d_inode = __file_inode(file) + if (d_inode == 0) + return 0 + return @cast(d_inode, "inode", "kernel")->i_sb->s_dev +} -function __file_ino:long (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - if (dentry == NULL) { - THIS->__retvalue = 0; - } else { - struct inode *d_inode = kread(&(dentry->d_inode)); - THIS->__retvalue = kread(&(d_inode->i_ino)); - } - CATCH_DEREF_FAULT(); -%} +function __file_bdev:long (file:long) +{ + d_inode = __file_inode(file) + if (d_inode == 0) + return 0 + return @cast(d_inode, "inode", "kernel")->i_sb->s_bdev +} -function __file_maxbytes:long (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - if (dentry == NULL) { - THIS->__retvalue = 0; - } else { - struct inode *d_inode = kread(&(dentry->d_inode)); - struct super_block *i_sb = kread(&(d_inode->i_sb)); - THIS->__retvalue = kread(&(i_sb->s_maxbytes)); - } - CATCH_DEREF_FAULT(); -%} +function __file_ino:long (file:long) +{ + d_inode = __file_inode(file) + if (d_inode == 0) + return 0 + return @cast(d_inode, "inode", "kernel")->i_ino +} -function __file_filename:string (file:long) %{ /* pure */ - struct file *file = (struct file *)(long)THIS->file; - struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL; - const unsigned char *name = dentry? kread(&(dentry->d_name.name)) : NULL; - if (name == NULL) { - strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN); - } else { - deref_string(THIS->__retvalue, name, MAXSTRINGLEN); - } - CATCH_DEREF_FAULT(); -%} +function __file_maxbytes:long (file:long) +{ + d_inode = __file_inode(file) + if (d_inode == 0) + return 0 + return @cast(d_inode, "inode", "kernel")->i_sb->s_maxbytes +} -function __inode_num:long(file:long) -%{ - struct file *file = NULL; - struct dentry *dentry = NULL; - struct inode *inode = NULL; - - file = (struct file *)(long)THIS->file; - dentry = file? kread(&(file->f_dentry)) : NULL; - inode = dentry? kread(&(dentry->d_inode)) : NULL; - THIS->__retvalue = inode? (long)(kread(&(inode->i_ino))) : 0; - CATCH_DEREF_FAULT(); -%} +function __file_filename:string (file:long) +{ +%( kernel_v >= "2.6.20" %? + dentry = file? @cast(file, "file", "kernel")->f_path->dentry : 0 +%: + dentry = file? @cast(file, "file", "kernel")->f_dentry : 0 +%) + name = dentry? @cast(dentry, "dentry", "kernel")->d_name->name : 0 + if (name == 0) + return "NULL" + else + return kernel_string(name) +} function _get_fopv_size:long (iov:long, nr_segs:long) -%{ +%{ /* pure */ struct iovec *iovp = (struct iovec *)(long)THIS->iov; if (iovp) { int i; diff --git a/tapset/x86_64/registers.stp b/tapset/x86_64/registers.stp index dd5eefb0..2e21f3eb 100644 --- a/tapset/x86_64/registers.stp +++ b/tapset/x86_64/registers.stp @@ -40,6 +40,16 @@ function _stp_register_regs() { function _stp_get_register_by_offset:long (offset:long) %{ /* pure */ long value; + if (!CONTEXT->regs) { + CONTEXT->last_error = "No registers available in this context"; + return; + } + if (THIS->offset < 0 || THIS->offset > sizeof(struct pt_regs) - sizeof(long)) { + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), + "Bad register offset: %lld", THIS->offset); + CONTEXT->last_error = CONTEXT->error_buffer; + return; + } memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value)); THIS->__retvalue = value; %} diff --git a/tapsets.cxx b/tapsets.cxx index 62c9e897..632e8d95 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -15,6 +15,7 @@ #include "translate.h" #include "session.h" #include "util.h" +#include "buildrun.h" #include "dwarf_wrappers.h" #include "auto_free.h" @@ -41,7 +42,6 @@ extern "C" { #include <fcntl.h> #include <elfutils/libdwfl.h> #include <elfutils/libdw.h> -#include <elfutils/libebl.h> #include <dwarf.h> #include <elf.h> #include <obstack.h> @@ -158,12 +158,13 @@ be_derived_probe::join_group (systemtap_session& s) // ------------------------------------------------------------------------ void common_probe_entryfn_prologue (translator_output* o, string statestr, - bool overload_processing = true, - bool interruptible = true) + string new_pp, + bool overload_processing = true) { o->newline() << "struct context* __restrict__ c;"; - if (! interruptible) - o->newline() << "unsigned long flags;"; + o->newline() << "#if !INTERRUPTIBLE"; + o->newline() << "unsigned long flags;"; + o->newline() << "#endif"; if (overload_processing) o->newline() << "#if defined(STP_TIMING) || defined(STP_OVERLOAD)"; @@ -181,10 +182,11 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline() << "static int _pfm_num_pmd_x;"; #endif - if (! interruptible) - o->newline() << "local_irq_save (flags);"; - else - o->newline() << "preempt_disable ();"; + o->newline() << "#if INTERRUPTIBLE"; + o->newline() << "preempt_disable ();"; + o->newline() << "#else"; + o->newline() << "local_irq_save (flags);"; + o->newline() << "#endif"; // Check for enough free enough stack space o->newline() << "if (unlikely ((((unsigned long) (& c)) & (THREAD_SIZE-1))"; // free space @@ -207,6 +209,15 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline(1) << "atomic_inc (& skipped_count);"; o->newline() << "#ifdef STP_TIMING"; o->newline() << "atomic_inc (& skipped_count_reentrant);"; + o->newline() << "#ifdef DEBUG_REENTRANCY"; + o->newline() << "_stp_warn (\"Skipped %s due to %s residency on cpu %u\\n\", " + << new_pp << ", c->probe_point ?: \"?\", smp_processor_id());"; + // NB: There is a conceivable race condition here with reading + // c->probe_point, knowing that this other probe is sort of running. + // However, in reality, it's interrupted. Plus even if it were able + // to somehow start again, and stop before we read c->probe_point, + // at least we have that ?: "?" bit in there to avoid a NULL deref. + o->newline() << "#endif"; o->newline() << "#endif"; o->newline() << "atomic_dec (& c->busy);"; o->newline() << "goto probe_epilogue;"; @@ -217,16 +228,18 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline() << "c->nesting = 0;"; o->newline() << "c->regs = 0;"; o->newline() << "c->unwaddr = 0;"; + o->newline() << "c->probe_point = " << new_pp << ";"; // reset unwound address cache o->newline() << "c->pi = 0;"; o->newline() << "c->regparm = 0;"; o->newline() << "c->marker_name = NULL;"; o->newline() << "c->marker_format = NULL;"; - o->newline() << "c->probe_point = 0;"; - if (! interruptible) - o->newline() << "c->actionremaining = MAXACTION;"; - else - o->newline() << "c->actionremaining = MAXACTION_INTERRUPTIBLE;"; + + o->newline() << "#if INTERRUPTIBLE"; + o->newline() << "c->actionremaining = MAXACTION_INTERRUPTIBLE;"; + o->newline() << "#else"; + o->newline() << "c->actionremaining = MAXACTION;"; + o->newline() << "#endif"; o->newline() << "#ifdef STP_TIMING"; o->newline() << "c->statp = 0;"; o->newline() << "#endif"; @@ -245,8 +258,7 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, void common_probe_entryfn_epilogue (translator_output* o, - bool overload_processing = true, - bool interruptible = true) + bool overload_processing = true) { if (overload_processing) o->newline() << "#if defined(STP_TIMING) || defined(STP_OVERLOAD)"; @@ -298,6 +310,7 @@ common_probe_entryfn_epilogue (translator_output* o, o->newline(-1) << "}"; o->newline() << "#endif"; + o->newline() << "c->probe_point = 0;"; // vacated o->newline() << "if (unlikely (c->last_error && c->last_error[0])) {"; o->newline(1) << "if (c->last_stmt != NULL)"; o->newline(1) << "_stp_softerror (\"%s near %s\", c->last_error, c->last_stmt);"; @@ -321,10 +334,11 @@ common_probe_entryfn_epilogue (translator_output* o, o->newline() << "_stp_exit ();"; o->newline(-1) << "}"; - if (! interruptible) - o->newline() << "local_irq_restore (flags);"; - else - o->newline() << "preempt_enable_no_resched ();"; + o->newline() << "#if INTERRUPTIBLE"; + o->newline() << "preempt_enable_no_resched ();"; + o->newline() << "#else"; + o->newline() << "local_irq_restore (flags);"; + o->newline() << "#endif"; } @@ -338,26 +352,23 @@ be_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "/* ---- begin/end probes ---- */"; s.op->newline() << "static void enter_begin_probe (void (*fn)(struct context*), const char* pp) {"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_STARTING", false, true); - s.op->newline() << "c->probe_point = pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_STARTING", "pp", false); s.op->newline() << "(*fn) (c);"; - common_probe_entryfn_epilogue (s.op, false, true); + common_probe_entryfn_epilogue (s.op, false); s.op->newline(-1) << "}"; s.op->newline() << "static void enter_end_probe (void (*fn)(struct context*), const char* pp) {"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_STOPPING", false, true); - s.op->newline() << "c->probe_point = pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_STOPPING", "pp", false); s.op->newline() << "(*fn) (c);"; - common_probe_entryfn_epilogue (s.op, false, true); + common_probe_entryfn_epilogue (s.op, false); s.op->newline(-1) << "}"; s.op->newline() << "static void enter_error_probe (void (*fn)(struct context*), const char* pp) {"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_ERROR", false, true); - s.op->newline() << "c->probe_point = pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_ERROR", "pp", false); s.op->newline() << "(*fn) (c);"; - common_probe_entryfn_epilogue (s.op, false, true); + common_probe_entryfn_epilogue (s.op, false); s.op->newline(-1) << "}"; s.op->newline() << "static struct stap_be_probe {"; @@ -466,6 +477,7 @@ static string TOK_STATEMENT("statement"); static string TOK_ABSOLUTE("absolute"); static string TOK_PROCESS("process"); static string TOK_MARK("mark"); +static string TOK_TRACE("trace"); static string TOK_LABEL("label"); // Can we handle this query with just symbol-table info? @@ -959,6 +971,9 @@ struct dwflpp void setup_user(string module_name, bool debuginfo_needed = true) { + if (! sess.module_cache) + sess.module_cache = new module_cache (); + static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); // NB: kernel_build_tree doesn't enter into this, as it's for @@ -1191,8 +1206,9 @@ struct dwflpp return DWARF_CB_OK; } - int iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg), - void * data); + int iterate_over_functions (int (* callback)(Dwarf_Die * func, base_query * q), + base_query * q, const string& function, + bool has_statement_num=false); int iterate_over_globals (int (* callback)(Dwarf_Die *, void *), void * data); @@ -1330,7 +1346,10 @@ struct dwflpp const char * sym = label_val.c_str(); Dwarf_Die die; - dwarf_child (cu, &die); + int res = dwarf_child (cu, &die); + if (res != 0) + return; // die without children, bail out. + static string function_name; do { @@ -1338,13 +1357,11 @@ struct dwflpp Dwarf_Attribute *attr = dwarf_attr (&die, DW_AT_name, &attr_mem); int tag = dwarf_tag(&die); const char *name = dwarf_formstring (attr); - if (name == NULL) - continue; - if (tag == DW_TAG_subprogram) + if (tag == DW_TAG_subprogram && name != 0) { function_name = name; } - else if (tag == DW_TAG_label + else if (tag == DW_TAG_label && name != 0 && ((strncmp(name, sym, strlen(sym)) == 0) || (name_has_wildcard (sym) && function_name_matches_pattern (name, sym)))) @@ -2296,9 +2313,9 @@ struct dwflpp assert(memstream); fprintf(memstream, "{\n"); - fprintf(memstream, prelude.c_str()); + fprintf(memstream, "%s", prelude.c_str()); bool deref = c_emit_location (memstream, head, 1); - fprintf(memstream, postlude.c_str()); + fprintf(memstream, "%s", postlude.c_str()); fprintf(memstream, " goto out;\n"); // dummy use of deref_fault label, to disable warning if deref() not used @@ -2934,13 +2951,13 @@ dwflpp::iterate_over_globals (int (* callback)(Dwarf_Die *, void *), } int -dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg), - void * data) +dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, base_query * q), + base_query * q, const string& function, + bool has_statement_num) { int rc = DWARF_CB_OK; assert (module); assert (cu); - dwarf_query * q = static_cast<dwarf_query *>(data); string key = module_name + ":" + cu_name; cu_function_cache_t *v = cu_function_cache[key]; @@ -2953,13 +2970,13 @@ dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg), clog << "function cache " << key << " size " << v->size() << endl; } - string subkey = q->function; + string subkey = function; if (v->find(subkey) != v->end()) { Dwarf_Die die = v->find(subkey)->second; if (q->sess.verbose > 4) clog << "function cache " << key << " hit " << subkey << endl; - return (*callback)(& die, data); + return (*callback)(& die, q); } else if (name_has_wildcard (subkey)) { @@ -2973,17 +2990,17 @@ dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg), if (q->sess.verbose > 4) clog << "function cache " << key << " match " << func_name << " vs " << subkey << endl; - rc = (*callback)(& die, data); + rc = (*callback)(& die, q); if (rc != DWARF_CB_OK) break; } } } - else if (q->has_statement_num) // searching all for kernel.statement + else if (has_statement_num) // searching all for kernel.statement { for (cu_function_cache_t::iterator it = v->begin(); it != v->end(); it++) { Dwarf_Die die = it->second; - rc = (*callback)(& die, data); + rc = (*callback)(& die, q); if (rc != DWARF_CB_OK) break; } } @@ -3873,9 +3890,9 @@ query_dwarf_inline_instance (Dwarf_Die * die, void * arg) } static int -query_dwarf_func (Dwarf_Die * func, void * arg) +query_dwarf_func (Dwarf_Die * func, base_query * bq) { - dwarf_query * q = static_cast<dwarf_query *>(arg); + dwarf_query * q = static_cast<dwarf_query *>(bq); try { @@ -3889,7 +3906,7 @@ query_dwarf_func (Dwarf_Die * func, void * arg) if (q->sess.verbose>3) clog << "checking instances of inline " << q->dw.function_name << "\n"; - q->dw.iterate_over_inline_instances (query_dwarf_inline_instance, arg); + q->dw.iterate_over_inline_instances (query_dwarf_inline_instance, q); if (q->dw.function_name_final_match (q->function)) return DWARF_CB_ABORT; @@ -3906,9 +3923,9 @@ query_dwarf_func (Dwarf_Die * func, void * arg) else if (q->has_function_num || q->has_statement_num) { Dwarf_Addr query_addr = - q->dw.module_address_to_global(q->has_function_num ? q->function_num_val : - q->has_statement_num ? q->statement_num_val : - (assert(0) , 0)); + (q->has_function_num ? q->function_num_val : + q->has_statement_num ? q->statement_num_val : + (assert(0) , 0)); Dwarf_Die d; q->dw.function_die (&d); @@ -4023,7 +4040,9 @@ query_cu (Dwarf_Die * cudie, void * arg) // Pick up [entrypc, name, DIE] tuples for all the functions // matching the query, and fill in the prologue endings of them // all in a single pass. - int rc = q->dw.iterate_over_functions (query_dwarf_func, q); + int rc = q->dw.iterate_over_functions (query_dwarf_func, q, + q->function, + q->has_statement_num); if (rc != DWARF_CB_OK) q->query_done = true; @@ -4823,18 +4842,31 @@ dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e) } catch (const semantic_error& er) { - // We suppress this error message, and pass the unresolved - // target_symbol to the next pass. We hope that this value ends - // up not being referenced after all, so it can be optimized out - // quietly. - provide (e); - semantic_error* saveme = new semantic_error (er); // copy it - saveme->tok1 = e->tok; // XXX: token not passed to q.dw code generation routines - // NB: we can have multiple errors, since a $target variable - // may be expanded in several different contexts: - // function ("*") { $var } - saveme->chain = e->saved_conversion_error; - e->saved_conversion_error = saveme; + if (!q.sess.skip_badvars) + { + // We suppress this error message, and pass the unresolved + // target_symbol to the next pass. We hope that this value ends + // up not being referenced after all, so it can be optimized out + // quietly. + provide (e); + semantic_error* saveme = new semantic_error (er); // copy it + saveme->tok1 = e->tok; // XXX: token not passed to q.dw code generation routines + // NB: we can have multiple errors, since a $target variable + // may be expanded in several different contexts: + // function ("*") { $var } + saveme->chain = e->saved_conversion_error; + e->saved_conversion_error = saveme; + } + else + { + // Upon user request for ignoring context, the symbol is replaced + // with a literal 0 and a warning message displayed + literal_number* ln_zero = new literal_number (0); + ln_zero->tok = e->tok; + provide (ln_zero); + q.sess.print_warning ("Bad variable being substituted with literal 0", + e->tok); + } delete fdecl; delete ec; return; @@ -4894,14 +4926,14 @@ struct dwarf_cast_query : public base_query { const cast_op& e; const bool lvalue; - exp_type& pe_type; - bool resolved; - string code; + exp_type& pe_type; + string& code; - dwarf_cast_query(dwflpp& dw, const cast_op& e, bool lvalue, exp_type& pe_type): - base_query(dw, e.module), e(e), lvalue(lvalue), pe_type(pe_type), resolved(false) {} - const string& get_code(); + dwarf_cast_query(dwflpp& dw, const string& module, const cast_op& e, + bool lvalue, exp_type& pe_type, string& code): + base_query(dw, module), e(e), lvalue(lvalue), + pe_type(pe_type), code(code) {} void handle_query_module(); int handle_query_cu(Dwarf_Die * cudie); @@ -4910,23 +4942,10 @@ struct dwarf_cast_query : public base_query }; -const string& -dwarf_cast_query::get_code() -{ - if (!resolved) - dw.query_modules(this); - - if (!resolved) - throw semantic_error("type definition not found"); - - return code; -} - - void dwarf_cast_query::handle_query_module() { - if (resolved) + if (!code.empty()) return; // look for the type in each CU @@ -4937,7 +4956,7 @@ dwarf_cast_query::handle_query_module() int dwarf_cast_query::handle_query_cu(Dwarf_Die * cudie) { - if (resolved) + if (!code.empty()) return DWARF_CB_ABORT; dw.focus_on_cu (cudie); @@ -4954,10 +4973,7 @@ dwarf_cast_query::handle_query_cu(Dwarf_Die * cudie) // XXX might be better to save the error // and try again in another CU sess.print_error (e); - return DWARF_CB_ABORT; } - - resolved = true; return DWARF_CB_ABORT; } return DWARF_CB_OK; @@ -4993,17 +5009,20 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) if (e->module.empty()) e->module = "kernel"; // "*" may also be reasonable to search all kernel modules - if (! s.module_cache) - s.module_cache = new module_cache (); - string code; exp_type type = pe_long; - try + size_t mod_end = -1; + do { + // split the module string by ':' for alternatives + size_t mod_begin = mod_end + 1; + mod_end = e->module.find(':', mod_begin); + string module = e->module.substr(mod_begin, mod_end - mod_begin); + // NB: This uses '/' to distinguish between kernel modules and userspace, // which means that userspace modules won't get any PATH searching. dwflpp* dw; - if (e->module.find('/') == string::npos) + if (module.find('/') == string::npos) { // kernel or kernel module target if (! db.kern_dw) @@ -5015,36 +5034,37 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) } else { - e->module = find_executable (e->module); // canonicalize it + module = find_executable (module); // canonicalize it // user-space target; we use one dwflpp instance per module name // (= program or shared library) - if (db.user_dw.find(e->module) == db.user_dw.end()) + if (db.user_dw.find(module) == db.user_dw.end()) { dw = new dwflpp(s); - dw->setup_user(e->module); - db.user_dw[e->module] = dw; + dw->setup_user(module); + db.user_dw[module] = dw; } else - dw = db.user_dw[e->module]; + dw = db.user_dw[module]; } - dwarf_cast_query q (*dw, *e, lvalue, type); - code = q.get_code(); + dwarf_cast_query q (*dw, module, *e, lvalue, type, code); + dw->query_modules(&q); } - catch (const semantic_error& er) + while (code.empty() && mod_end != string::npos); + + if (code.empty()) { - // We suppress this error message, and pass the unresolved + // We generate an error message, and pass the unresolved // cast_op to the next pass. We hope that this value ends // up not being referenced after all, so it can be optimized out // quietly. - semantic_error* saveme = new semantic_error (er); // copy it - saveme->tok1 = e->tok; // XXX: token not passed to dw code generation routines + semantic_error* er = new semantic_error ("type definition not found", e->tok); // NB: we can have multiple errors, since a @cast // may be expanded in several different contexts: // function ("*") { @cast(...) } - saveme->chain = e->saved_conversion_error; - e->saved_conversion_error = saveme; + er->chain = e->saved_conversion_error; + e->saved_conversion_error = er; provide (e); return; } @@ -5462,8 +5482,7 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->line() << "kprobe_idx:0)"; // NB: at least we avoid memory corruption // XXX: it would be nice to give a more verbose error though; BUG_ON later? s.op->line() << "];"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = sdp->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "sdp->pp"); s.op->newline() << "c->regs = regs;"; s.op->newline() << "(*sdp->ph) (c);"; common_probe_entryfn_epilogue (s.op); @@ -5485,8 +5504,7 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) // XXX: it would be nice to give a more verbose error though; BUG_ON later? s.op->line() << "];"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = sdp->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "sdp->pp"); s.op->newline() << "c->regs = regs;"; s.op->newline() << "c->pi = inst;"; // for assisting runtime's backtrace logic s.op->newline() << "(*sdp->ph) (c);"; @@ -5655,10 +5673,6 @@ dwarf_builder::build(systemtap_session & sess, dwflpp* dw = 0; - if (! sess.module_cache) - sess.module_cache = new module_cache (); - - string module_name; if (has_null_param (parameters, TOK_KERNEL) || get_param (parameters, TOK_MODULE, module_name)) @@ -5706,6 +5720,7 @@ dwarf_builder::build(systemtap_session & sess, size_t shstrndx; Elf_Scn *probe_scn = NULL; bool probe_found = false; + bool dynamic = (dwfl_module_relocations (dw->module) == 1); dwfl_assert ("getshstrndx", elf_getshstrndx (elf, &shstrndx)); GElf_Shdr *shdr = NULL; @@ -5723,6 +5738,8 @@ dwarf_builder::build(systemtap_session & sess, break; } } + if (dynamic || sess.listing_mode) + probe_type = dwarf_no_probes; if (probe_type == probes_and_dwarf) { @@ -5748,17 +5765,22 @@ dwarf_builder::build(systemtap_session & sess, if (probe_scn_offset % (sizeof(__uint64_t))) probe_scn_offset += sizeof(__uint64_t) - (probe_scn_offset % sizeof(__uint64_t)); probe_arg = *((__uint64_t*)((char*)pdata->d_buf + probe_scn_offset)); - if (strcmp (location->components[1]->arg->tok->content.c_str(), probe_name.c_str()) == 0) - { - probe_found = true; - break; - } if (probe_scn_offset % (sizeof(__uint64_t)*2)) probe_scn_offset = (probe_scn_offset + sizeof(__uint64_t)*2) - (probe_scn_offset % (sizeof(__uint64_t)*2)); + if (strcmp (location->components[1]->arg->tok->content.c_str(), probe_name.c_str()) == 0) + probe_found = true; + else + continue; + const token* sv_tok = location->components[1]->arg->tok; + location->components[1]->functor = TOK_STATEMENT; + location->components[1]->arg = new literal_number((int)probe_arg); + location->components[1]->arg->tok = sv_tok; + ((literal_map_t&)parameters)[TOK_STATEMENT] = location->components[1]->arg; + dwarf_query q(sess, base, location, *dw, parameters, finished_results); + dw->query_modules(&q); } - location->components[1]->functor = TOK_STATEMENT; - location->components[1]->arg = new literal_number((int)probe_arg); - ((literal_map_t&)parameters)[TOK_STATEMENT] = location->components[1]->arg; + if (probe_found) + return; } if (probe_type == dwarf_no_probes || ! probe_found) @@ -6357,6 +6379,7 @@ itrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(); s.op->newline() << "/* ---- itrace probes ---- */"; + s.op->newline() << "#include \"task_finder.c\""; s.op->newline() << "struct stap_itrace_probe {"; s.op->indent(1); s.op->newline() << "struct stap_task_finder_target tgt;"; @@ -6371,8 +6394,7 @@ itrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "static void enter_itrace_probe(struct stap_itrace_probe *p, struct pt_regs *regs, void *data) {"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = p->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "p->pp"); s.op->newline() << "c->regs = regs;"; s.op->newline() << "c->data = data;"; @@ -6963,8 +6985,7 @@ utrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "static void stap_utrace_probe_handler(struct task_struct *tsk, struct stap_utrace_probe *p) {"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = p->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "p->pp"); // call probe function s.op->newline() << "(*p->ph) (c);"; @@ -6986,8 +7007,7 @@ utrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->indent(1); s.op->newline() << "struct stap_utrace_probe *p = (struct stap_utrace_probe *)engine->data;"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = p->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "p->pp"); s.op->newline() << "c->regs = regs;"; // call probe function @@ -7470,10 +7490,9 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "static void enter_uprobe_probe (struct uprobe *inst, struct pt_regs *regs) {"; s.op->newline(1) << "struct stap_uprobe *sup = container_of(inst, struct stap_uprobe, up);"; s.op->newline() << "struct stap_uprobe_spec *sups = &stap_uprobe_specs [sup->spec_index];"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "sups->pp"); s.op->newline() << "if (sup->spec_index < 0 ||" << "sup->spec_index >= " << probes.size() << ") return;"; // XXX: should not happen - s.op->newline() << "c->probe_point = sups->pp;"; s.op->newline() << "c->regs = regs;"; s.op->newline() << "(*sups->ph) (c);"; common_probe_entryfn_epilogue (s.op); @@ -7482,10 +7501,9 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "static void enter_uretprobe_probe (struct uretprobe_instance *inst, struct pt_regs *regs) {"; s.op->newline(1) << "struct stap_uprobe *sup = container_of(inst->rp, struct stap_uprobe, urp);"; s.op->newline() << "struct stap_uprobe_spec *sups = &stap_uprobe_specs [sup->spec_index];"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "sups->pp"); s.op->newline() << "if (sup->spec_index < 0 ||" << "sup->spec_index >= " << probes.size() << ") return;"; // XXX: should not happen - s.op->newline() << "c->probe_point = sups->pp;"; // XXX: kretprobes saves "c->pi = inst;" too s.op->newline() << "c->regs = regs;"; s.op->newline() << "(*sups->ph) (c);"; @@ -7812,8 +7830,7 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->line() << ");"; s.op->newline(-1) << "{"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = stp->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "stp->pp"); s.op->newline() << "(*stp->ph) (c);"; common_probe_entryfn_epilogue (s.op); s.op->newline(-1) << "}"; @@ -7935,8 +7952,8 @@ profile_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "static void enter_all_profile_probes (struct pt_regs *regs) {"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = \"timer.profile\";"; // NB: hard-coded for convenience + string pp = lex_cast_qstring("timer.profile"); // hard-coded for convenience + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", pp); s.op->newline() << "c->regs = regs;"; for (unsigned i=0; i<probes.size(); i++) @@ -8192,8 +8209,7 @@ procfs_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "int bytes = 0;"; s.op->newline() << "string_t strdata = {'\\0'};"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = spp->read_pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "spp->read_pp"); s.op->newline() << "if (c->data == NULL)"; s.op->newline(1) << "c->data = &strdata;"; @@ -8235,8 +8251,7 @@ procfs_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(1) << "struct stap_procfs_probe *spp = (struct stap_procfs_probe *)data;"; s.op->newline() << "string_t strdata = {'\\0'};"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = spp->write_pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "spp->write_pp"); s.op->newline() << "if (count > (MAXSTRINGLEN - 1))"; s.op->newline(1) << "count = MAXSTRINGLEN - 1;"; @@ -8515,6 +8530,7 @@ struct mark_derived_probe: public derived_probe void join_group (systemtap_session& s); void emit_probe_context_vars (translator_output* o); void initialize_probe_context_vars (translator_output* o); + void printargs (std::ostream &o) const; void parse_probe_format (); }; @@ -8959,6 +8975,27 @@ mark_derived_probe::initialize_probe_context_vars (translator_output* o) o->newline() << "deref_fault: ;"; } +void +mark_derived_probe::printargs(std::ostream &o) const +{ + for (unsigned i = 0; i < mark_args.size(); i++) + { + string localname = "$arg" + lex_cast<string>(i+1); + switch (mark_args[i]->stp_type) + { + case pe_long: + o << " " << localname << ":long"; + break; + case pe_string: + o << " " << localname << ":string"; + break; + default: + o << " " << localname << ":unknown"; + break; + } + } +} + void mark_derived_probe_group::emit_module_decls (systemtap_session& s) @@ -8996,8 +9033,7 @@ mark_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(); s.op->newline() << "static void enter_marker_probe (void *probe_data, void *call_data, const char *fmt, va_list *args) {"; s.op->newline(1) << "struct stap_marker_probe *smp = (struct stap_marker_probe *)probe_data;"; - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = smp->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "smp->pp"); s.op->newline() << "c->marker_name = smp->name;"; s.op->newline() << "c->marker_format = smp->format;"; s.op->newline() << "c->mark_va_list = args;"; @@ -9187,6 +9223,764 @@ mark_builder::build(systemtap_session & sess, // ------------------------------------------------------------------------ +// statically inserted kernel-tracepoint derived probes +// ------------------------------------------------------------------------ + +struct tracepoint_arg +{ + string name, c_type; + bool used, isptr; + Dwarf_Die type_die; + tracepoint_arg(): used(false), isptr(false) {} +}; + +struct tracepoint_derived_probe: public derived_probe +{ + tracepoint_derived_probe (systemtap_session& s, + dwflpp& dw, Dwarf_Die& func_die, + const string& tracepoint_name, + probe* base_probe, probe_point* location); + + systemtap_session& sess; + string tracepoint_name, header; + vector <struct tracepoint_arg> args; + + void build_args(dwflpp& dw, Dwarf_Die& func_die); + void printargs (std::ostream &o) const; + void join_group (systemtap_session& s); + void emit_probe_context_vars (translator_output* o); +}; + + +struct tracepoint_derived_probe_group: public generic_dpg<tracepoint_derived_probe> +{ + void emit_module_decls (systemtap_session& s); + void emit_module_init (systemtap_session& s); + void emit_module_exit (systemtap_session& s); +}; + + +struct tracepoint_var_expanding_visitor: public var_expanding_visitor +{ + tracepoint_var_expanding_visitor(dwflpp& dw, const string& probe_name, + vector <struct tracepoint_arg>& args): + dw (dw), probe_name (probe_name), args (args) {} + dwflpp& dw; + const string& probe_name; + vector <struct tracepoint_arg>& args; + + void visit_target_symbol (target_symbol* e); + void visit_target_symbol_arg (target_symbol* e); + void visit_target_symbol_context (target_symbol* e); +}; + + +void +tracepoint_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e) +{ + string argname = e->base_name.substr(1); + + // search for a tracepoint parameter matching this name + tracepoint_arg *arg = NULL; + for (unsigned i = 0; i < args.size(); ++i) + if (args[i].name == argname) + { + arg = &args[i]; + arg->used = true; + break; + } + + if (arg == NULL) + { + stringstream alternatives; + for (unsigned i = 0; i < args.size(); ++i) + alternatives << " $" << args[i].name; + alternatives << " $$name $$parms $$vars"; + + // We hope that this value ends up not being referenced after all, so it + // can be optimized out quietly. + semantic_error* saveme = + new semantic_error("unable to find tracepoint variable '" + e->base_name + + "' (alternatives:" + alternatives.str () + ")", e->tok); + // NB: we can have multiple errors, since a target variable + // may be expanded in several different contexts: + // trace ("*") { $foo->bar } + saveme->chain = e->saved_conversion_error; + e->saved_conversion_error = saveme; + provide (e); + return; + } + + // make sure we're not dereferencing base types + if (!e->components.empty() && !arg->isptr) + switch (e->components[0].first) + { + case target_symbol::comp_literal_array_index: + throw semantic_error("tracepoint variable '" + e->base_name + + "' may not be used as array", e->tok); + case target_symbol::comp_struct_member: + throw semantic_error("tracepoint variable '" + e->base_name + + "' may not be used as a structure", e->tok); + default: + throw semantic_error("invalid use of tracepoint variable '" + + e->base_name + "'", e->tok); + } + + // we can only write to dereferenced fields, and only if guru mode is on + bool lvalue = is_active_lvalue(e); + if (lvalue && (!dw.sess.guru_mode || e->components.empty())) + throw semantic_error("write to tracepoint variable '" + e->base_name + + "' not permitted", e->tok); + + if (e->components.empty()) + { + // Synthesize a simple function to grab the parameter + functiondecl *fdecl = new functiondecl; + fdecl->tok = e->tok; + embeddedcode *ec = new embeddedcode; + ec->tok = e->tok; + + string fname = (string("_tracepoint_tvar_get") + + "_" + e->base_name.substr(1) + + "_" + lex_cast<string>(tick++)); + + fdecl->name = fname; + fdecl->body = ec; + fdecl->type = pe_long; + + ec->code = (string("THIS->__retvalue = CONTEXT->locals[0].") + + probe_name + string(".__tracepoint_arg_") + + arg->name + string (";/* pure */")); + + dw.sess.functions[fdecl->name] = fdecl; + + // Synthesize a functioncall. + functioncall* n = new functioncall; + n->tok = e->tok; + n->function = fname; + n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session + + provide (n); + } + else + { + // Synthesize a function to dereference the dwarf fields, + // with a pointer parameter that is the base tracepoint variable + functiondecl *fdecl = new functiondecl; + fdecl->tok = e->tok; + embeddedcode *ec = new embeddedcode; + ec->tok = e->tok; + + string fname = (string(lvalue ? "_tracepoint_tvar_set" : "_tracepoint_tvar_get") + + "_" + e->base_name.substr(1) + + "_" + lex_cast<string>(tick++)); + + fdecl->name = fname; + fdecl->body = ec; + + try + { + ec->code = dw.literal_stmt_for_pointer (&arg->type_die, e->components, + lvalue, fdecl->type); + } + catch (const semantic_error& er) + { + // We suppress this error message, and pass the unresolved + // variable to the next pass. We hope that this value ends + // up not being referenced after all, so it can be optimized out + // quietly. + semantic_error* saveme = new semantic_error (er); // copy it + saveme->tok1 = e->tok; // XXX: token not passed to dw code generation routines + // NB: we can have multiple errors, since a target variable + // may be expanded in several different contexts: + // trace ("*") { $foo->bar } + saveme->chain = e->saved_conversion_error; + e->saved_conversion_error = saveme; + provide (e); + return; + } + + // Give the fdecl an argument for the raw tracepoint value + vardecl *v1 = new vardecl; + v1->type = pe_long; + v1->name = "pointer"; + v1->tok = e->tok; + fdecl->formal_args.push_back(v1); + + if (lvalue) + { + // Modify the fdecl so it carries a pe_long formal + // argument called "value". + + // FIXME: For the time being we only support setting target + // variables which have base types; these are 'pe_long' in + // stap's type vocabulary. Strings and pointers might be + // reasonable, some day, but not today. + + vardecl *v2 = new vardecl; + v2->type = pe_long; + v2->name = "value"; + v2->tok = e->tok; + fdecl->formal_args.push_back(v2); + } + else + ec->code += "/* pure */"; + + dw.sess.functions[fdecl->name] = fdecl; + + // Synthesize a functioncall. + functioncall* n = new functioncall; + n->tok = e->tok; + n->function = fname; + n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session + + // make the original a bare target symbol for the tracepoint value, + // which will be passed into the dwarf dereferencing code + e->components.clear(); + n->args.push_back(require(e)); + + if (lvalue) + { + // Provide the functioncall to our parent, so that it can be + // used to substitute for the assignment node immediately above + // us. + assert(!target_symbol_setter_functioncalls.empty()); + *(target_symbol_setter_functioncalls.top()) = n; + } + + provide (n); + } +} + + +void +tracepoint_var_expanding_visitor::visit_target_symbol_context (target_symbol* e) +{ + if (is_active_lvalue (e)) + throw semantic_error("write to tracepoint '" + e->base_name + "' not permitted", e->tok); + + if (!e->components.empty()) + switch (e->components[0].first) + { + case target_symbol::comp_literal_array_index: + throw semantic_error("tracepoint '" + e->base_name + "' may not be used as array", + e->tok); + case target_symbol::comp_struct_member: + throw semantic_error("tracepoint '" + e->base_name + "' may not be used as a structure", + e->tok); + default: + throw semantic_error("invalid tracepoint '" + e->base_name + "' use", e->tok); + } + + if (e->base_name == "$$name") + { + // Synthesize a functioncall. + functioncall* n = new functioncall; + n->tok = e->tok; + n->function = "_mark_name_get"; + n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session + provide (n); + } + else if (e->base_name == "$$vars" || e->base_name == "$$parms") + { + target_symbol *tsym = new target_symbol; + print_format* pf = new print_format; + + // Convert $$vars to sprintf of a list of vars which we recursively evaluate + // NB: we synthesize a new token here rather than reusing + // e->tok, because print_format::print likes to use + // its tok->content. + token* pf_tok = new token(*e->tok); + pf_tok->content = "sprintf"; + + pf->tok = pf_tok; + pf->print_to_stream = false; + pf->print_with_format = true; + pf->print_with_delim = false; + pf->print_with_newline = false; + pf->print_char = false; + + for (unsigned i = 0; i < args.size(); ++i) + { + if (i > 0) + pf->raw_components += " "; + pf->raw_components += args[i].name; + tsym->tok = e->tok; + tsym->base_name = "$" + args[i].name; + + // every variable should always be accessible! + tsym->saved_conversion_error = 0; + expression *texp = require (tsym); // NB: throws nothing ... + assert (!tsym->saved_conversion_error); // ... but this is how we know it happened. + + pf->raw_components += "=%#x"; + pf->args.push_back(texp); + } + + pf->components = print_format::string_to_components(pf->raw_components); + provide (pf); + } + else + assert(0); // shouldn't get here +} + +void +tracepoint_var_expanding_visitor::visit_target_symbol (target_symbol* e) +{ + assert(e->base_name.size() > 0 && e->base_name[0] == '$'); + + if (e->base_name == "$$name" || + e->base_name == "$$parms" || + e->base_name == "$$vars") + visit_target_symbol_context (e); + else + visit_target_symbol_arg (e); +} + + + +tracepoint_derived_probe::tracepoint_derived_probe (systemtap_session& s, + dwflpp& dw, Dwarf_Die& func_die, + const string& tracepoint_name, + probe* base, probe_point* loc): + derived_probe (base, new probe_point(*loc) /* .components soon rewritten */), + sess (s), tracepoint_name (tracepoint_name) +{ + // create synthetic probe point name; preserve condition + vector<probe_point::component*> comps; + comps.push_back (new probe_point::component (TOK_KERNEL)); + comps.push_back (new probe_point::component (TOK_TRACE, new literal_string (tracepoint_name))); + this->sole_location()->components = comps; + + // fill out the available arguments in this tracepoint + build_args(dw, func_die); + + // determine which header defined this tracepoint + string decl_file = dwarf_decl_file(&func_die); + size_t header_pos = decl_file.rfind("trace/"); + if (header_pos == string::npos) + throw semantic_error ("cannot parse header location for tracepoint '" + + tracepoint_name + "' in '" + + decl_file + "'"); + header = decl_file.substr(header_pos); + + // tracepoints from FOO_event_types.h should really be included from FOO.h + // XXX can dwarf tell us the include hierarchy? it would be better to + // ... walk up to see which one was directly included by tracequery.c + header_pos = header.find("_event_types"); + if (header_pos != string::npos) + header.erase(header_pos, 12); + + // Now expand the local variables in the probe body + tracepoint_var_expanding_visitor v (dw, name, args); + this->body = v.require (this->body); + + if (sess.verbose > 2) + clog << "tracepoint-based " << name << " tracepoint='" << tracepoint_name + << "'" << endl; +} + + +static bool +dwarf_type_name(Dwarf_Die& type_die, string& c_type) +{ + // if this die has a direct name, then we're done + const char *diename = dwarf_diename_integrate(&type_die); + if (diename != NULL) + { + switch (dwarf_tag(&type_die)) + { + case DW_TAG_structure_type: + c_type.append("struct "); + break; + case DW_TAG_union_type: + c_type.append("union "); + break; + } + c_type.append(diename); + return true; + } + + // otherwise, this die is a type modifier. + + // recurse into the referent type + Dwarf_Attribute subtype_attr; + Dwarf_Die subtype_die; + if (!dwarf_attr_integrate(&type_die, DW_AT_type, &subtype_attr) + || !dwarf_formref_die(&subtype_attr, &subtype_die) + || !dwarf_type_name(subtype_die, c_type)) + return false; + + const char *suffix = NULL; + switch (dwarf_tag(&type_die)) + { + case DW_TAG_pointer_type: + suffix = "*"; + break; + case DW_TAG_array_type: + suffix = "[]"; + break; + case DW_TAG_const_type: + suffix = " const"; + break; + case DW_TAG_volatile_type: + suffix = " volatile"; + break; + default: + return false; + } + c_type.append(suffix); + return true; +} + + +static bool +resolve_tracepoint_arg_type(Dwarf_Die& type_die, bool& isptr) +{ + Dwarf_Attribute type_attr; + switch (dwarf_tag(&type_die)) + { + case DW_TAG_typedef: + case DW_TAG_const_type: + case DW_TAG_volatile_type: + // iterate on the referent type + return (dwarf_attr_integrate(&type_die, DW_AT_type, &type_attr) + && dwarf_formref_die(&type_attr, &type_die) + && resolve_tracepoint_arg_type(type_die, isptr)); + case DW_TAG_base_type: + // base types will simply be treated as script longs + isptr = false; + return true; + case DW_TAG_pointer_type: + // pointers can be either script longs, + // or dereferenced with their referent type + isptr = true; + return (dwarf_attr_integrate(&type_die, DW_AT_type, &type_attr) + && dwarf_formref_die(&type_attr, &type_die)); + default: + // should we consider other types too? + return false; + } +} + + +void +tracepoint_derived_probe::build_args(dwflpp& dw, Dwarf_Die& func_die) +{ + Dwarf_Die arg; + if (dwarf_child(&func_die, &arg) == 0) + do + if (dwarf_tag(&arg) == DW_TAG_formal_parameter) + { + // build a tracepoint_arg for this parameter + tracepoint_arg tparg; + tparg.name = dwarf_diename_integrate(&arg); + + // read the type of this parameter + Dwarf_Attribute type_attr; + if (!dwarf_attr_integrate (&arg, DW_AT_type, &type_attr) + || !dwarf_formref_die (&type_attr, &tparg.type_die) + || !dwarf_type_name(tparg.type_die, tparg.c_type) + || !resolve_tracepoint_arg_type(tparg.type_die, tparg.isptr)) + throw semantic_error ("cannot get type of tracepoint '" + + tracepoint_name + "' parameter '" + + tparg.name + "'"); + + args.push_back(tparg); + if (sess.verbose > 4) + clog << "found parameter for tracepoint '" << tracepoint_name + << "': type:'" << tparg.c_type + << "' name:'" << tparg.name << "'" << endl; + } + while (dwarf_siblingof(&arg, &arg) == 0); +} + +void +tracepoint_derived_probe::printargs(std::ostream &o) const +{ + for (unsigned i = 0; i < args.size(); ++i) + o << " $" << args[i].name << ":" << args[i].c_type; +} + +void +tracepoint_derived_probe::join_group (systemtap_session& s) +{ + if (! s.tracepoint_derived_probes) + s.tracepoint_derived_probes = new tracepoint_derived_probe_group (); + s.tracepoint_derived_probes->enroll (this); +} + + +void +tracepoint_derived_probe::emit_probe_context_vars (translator_output* o) +{ + for (unsigned i = 0; i < args.size(); i++) + if (args[i].used) + o->newline() << "int64_t __tracepoint_arg_" << args[i].name << ";"; +} + + +void +tracepoint_derived_probe_group::emit_module_decls (systemtap_session& s) +{ + if (probes.empty()) + return; + + s.op->newline() << "/* ---- tracepoint probes ---- */"; + s.op->newline(); + + for (unsigned i = 0; i < probes.size(); ++i) + { + tracepoint_derived_probe *p = probes[i]; + + // emit a separate entry function for each probe, since tracepoints + // don't provide any sort of context pointer. + s.op->newline() << "#include <" << p->header << ">"; + s.op->newline() << "static void enter_tracepoint_probe_" << i << "("; + for (unsigned j = 0; j < p->args.size(); ++j) + { + if (j > 0) + s.op->line() << ", "; + s.op->line() << p->args[j].c_type << " __tracepoint_arg_" << p->args[j].name; + } + s.op->line() << ") {"; + s.op->indent(1); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", + lex_cast_qstring (*p->sole_location())); + s.op->newline() << "c->marker_name = " + << lex_cast_qstring (p->tracepoint_name) + << ";"; + for (unsigned j = 0; j < p->args.size(); ++j) + if (p->args[j].used) + { + s.op->newline() << "c->locals[0]." << p->name << ".__tracepoint_arg_" + << p->args[j].name << " = (int64_t)"; + if (p->args[j].isptr) + s.op->line() << "(intptr_t)"; + s.op->line() << "__tracepoint_arg_" << p->args[j].name << ";"; + } + s.op->newline() << p->name << " (c);"; + common_probe_entryfn_epilogue (s.op); + s.op->newline(-1) << "}"; + + // emit normalized registration functions + s.op->newline() << "static int register_tracepoint_probe_" << i << "(void) {"; + s.op->newline(1) << "return register_trace_" << p->tracepoint_name + << "(enter_tracepoint_probe_" << i << ");"; + s.op->newline(-1) << "}"; + + // NB: we're not prepared to deal with unreg failures. However, failures + // can only occur if the tracepoint doesn't exist (yet?), or if we + // weren't even registered. The former should be OKed by the initial + // registration call, and the latter is safe to ignore. + s.op->newline() << "static void unregister_tracepoint_probe_" << i << "(void) {"; + s.op->newline(1) << "(void) unregister_trace_" << p->tracepoint_name + << "(enter_tracepoint_probe_" << i << ");"; + s.op->newline(-1) << "}"; + s.op->newline(); + } + + // emit an array of registration functions for easy init/shutdown + s.op->newline() << "static struct stap_tracepoint_probe {"; + s.op->newline(1) << "int (*reg)(void);"; + s.op->newline(0) << "void (*unreg)(void);"; + s.op->newline(-1) << "} stap_tracepoint_probes[] = {"; + s.op->indent(1); + for (unsigned i = 0; i < probes.size(); ++i) + { + s.op->newline () << "{"; + s.op->line() << " .reg=®ister_tracepoint_probe_" << i << ","; + s.op->line() << " .unreg=&unregister_tracepoint_probe_" << i; + s.op->line() << " },"; + } + s.op->newline(-1) << "};"; + s.op->newline(); +} + + +void +tracepoint_derived_probe_group::emit_module_init (systemtap_session &s) +{ + if (probes.size () == 0) + return; + + s.op->newline() << "/* init tracepoint probes */"; + s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {"; + s.op->newline(1) << "rc = stap_tracepoint_probes[i].reg();"; + s.op->newline() << "if (rc) {"; + s.op->newline(1) << "for (j=i-1; j>=0; j--)"; // partial rollback + s.op->newline(1) << "stap_tracepoint_probes[j].unreg();"; + s.op->newline(-1) << "break;"; // don't attempt to register any more probes + s.op->newline(-1) << "}"; + s.op->newline(-1) << "}"; + + // This would be technically proper (on those autoconf-detectable + // kernels that include this function in tracepoint.h), however we + // already make several calls to synchronze_sched() during our + // shutdown processes. + + // s.op->newline() << "if (rc)"; + // s.op->newline(1) << "tracepoint_synchronize_unregister();"; + // s.op->indent(-1); +} + + +void +tracepoint_derived_probe_group::emit_module_exit (systemtap_session& s) +{ + if (probes.empty()) + return; + + s.op->newline() << "/* deregister tracepoint probes */"; + s.op->newline() << "for (i=0; i<" << probes.size() << "; i++)"; + s.op->newline(1) << "stap_tracepoint_probes[i].unreg();"; + s.op->indent(-1); + + // Not necessary: see above. + + // s.op->newline() << "tracepoint_synchronize_unregister();"; +} + + +struct tracepoint_query : public base_query +{ + tracepoint_query(dwflpp & dw, const string & tracepoint, + probe * base_probe, probe_point * base_loc, + vector<derived_probe *> & results): + base_query(dw, "*"), tracepoint(tracepoint), + base_probe(base_probe), base_loc(base_loc), + results(results) {} + + const string& tracepoint; + + probe * base_probe; + probe_point * base_loc; + vector<derived_probe *> & results; + + void handle_query_module(); + int handle_query_cu(Dwarf_Die * cudie); + int handle_query_func(Dwarf_Die * func); + + static int tracepoint_query_cu (Dwarf_Die * cudie, void * arg); + static int tracepoint_query_func (Dwarf_Die * func, base_query * query); +}; + + +void +tracepoint_query::handle_query_module() +{ + // look for the tracepoints in each CU + dw.iterate_over_cus(tracepoint_query_cu, this); +} + + +int +tracepoint_query::handle_query_cu(Dwarf_Die * cudie) +{ + dw.focus_on_cu (cudie); + + // look at each function to see if it's a tracepoint + string function = "stapprobe_" + tracepoint; + return dw.iterate_over_functions (tracepoint_query_func, this, function); +} + + +int +tracepoint_query::handle_query_func(Dwarf_Die * func) +{ + dw.focus_on_function (func); + + assert(dw.function_name.compare(0, 10, "stapprobe_") == 0); + string tracepoint_instance = dw.function_name.substr(10); + derived_probe *dp = new tracepoint_derived_probe (dw.sess, dw, *func, + tracepoint_instance, + base_probe, base_loc); + results.push_back (dp); + return DWARF_CB_OK; +} + + +int +tracepoint_query::tracepoint_query_cu (Dwarf_Die * cudie, void * arg) +{ + tracepoint_query * q = static_cast<tracepoint_query *>(arg); + if (pending_interrupts) return DWARF_CB_ABORT; + return q->handle_query_cu(cudie); +} + + +int +tracepoint_query::tracepoint_query_func (Dwarf_Die * func, base_query * query) +{ + tracepoint_query * q = static_cast<tracepoint_query *>(query); + if (pending_interrupts) return DWARF_CB_ABORT; + return q->handle_query_func(func); +} + + +struct tracepoint_builder: public derived_probe_builder +{ +private: + dwflpp *dw; + bool init_dw(systemtap_session& s); + +public: + tracepoint_builder(): dw(0) {} + ~tracepoint_builder() { delete dw; } + + void build_no_more (systemtap_session& s) + { + if (dw && s.verbose > 3) + clog << "tracepoint_builder releasing dwflpp" << endl; + delete dw; + dw = NULL; + } + + void build(systemtap_session& s, + probe *base, probe_point *location, + literal_map_t const& parameters, + vector<derived_probe*>& finished_results); +}; + + +bool +tracepoint_builder::init_dw(systemtap_session& s) +{ + if (dw != NULL) + return true; + + string tracequery_ko; + int rc = make_tracequery(s, tracequery_ko); + if (rc != 0) + return false; + + // TODO cache tracequery.ko + + dw = new dwflpp(s); + dw->setup_user(tracequery_ko); + return true; +} + + +void +tracepoint_builder::build(systemtap_session& s, + probe *base, probe_point *location, + literal_map_t const& parameters, + vector<derived_probe*>& finished_results) +{ + if (!init_dw(s)) + return; + + string tracepoint; + assert(get_param (parameters, TOK_TRACE, tracepoint)); + + tracepoint_query q(*dw, tracepoint, base, location, finished_results); + dw->query_modules(&q); +} + + + +// ------------------------------------------------------------------------ // hrtimer derived probes // ------------------------------------------------------------------------ // This is a new timer interface that provides more flexibility in specifying @@ -9325,8 +10119,7 @@ hrtimer_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(-1) << "}"; s.op->newline() << "{"; s.op->indent(1); - common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); - s.op->newline() << "c->probe_point = stp->pp;"; + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING", "stp->pp"); s.op->newline() << "(*stp->ph) (c);"; common_probe_entryfn_epilogue (s.op); s.op->newline(-1) << "}"; @@ -9690,7 +10483,8 @@ perfmon_derived_probe::emit_probe_entries (translator_output * o) emit_probe_prologue (o, (mode == perfmon_count ? "STAP_SESSION_STARTING" : - "STAP_SESSION_RUNNING")); + "STAP_SESSION_RUNNING"), + "probe_point"); // NB: locals are initialized by probe function itself o->newline() << name << " (c);"; @@ -9988,6 +10782,10 @@ register_standard_tapsets(systemtap_session & s) s.pattern_root->bind(TOK_KERNEL)->bind_str(TOK_MARK)->bind_str(TOK_FORMAT) ->bind(new mark_builder()); + // kernel tracepoint probes + s.pattern_root->bind(TOK_KERNEL)->bind_str(TOK_TRACE) + ->bind(new tracepoint_builder()); + // procfs parts s.pattern_root->bind(TOK_PROCFS)->bind(TOK_READ)->bind(new procfs_builder()); s.pattern_root->bind_str(TOK_PROCFS)->bind(TOK_READ) @@ -10016,6 +10814,7 @@ all_session_groups(systemtap_session& s) DOONE(timer); DOONE(profile); DOONE(mark); + DOONE(tracepoint); DOONE(hrtimer); DOONE(perfmon); DOONE(procfs); diff --git a/testsuite/buildok/task-embedded.stp b/testsuite/buildok/task-embedded.stp index 4d1f5300..d35f3e0d 100755 --- a/testsuite/buildok/task-embedded.stp +++ b/testsuite/buildok/task-embedded.stp @@ -14,6 +14,8 @@ probe begin { task_nice (0) + task_cpu (0) + task_open_file_handles (0) + - task_max_file_handles (0)) + task_max_file_handles (0) + + pid2task(0)) print (task_execname (0)) + print (pid2execname (0)) } diff --git a/testsuite/buildok/task_test.stp b/testsuite/buildok/task_test.stp index c8da7da5..792f96ea 100755 --- a/testsuite/buildok/task_test.stp +++ b/testsuite/buildok/task_test.stp @@ -16,5 +16,7 @@ probe begin { log(sprint(task_cpu(c))) log(sprint(task_open_file_handles(c))) log(sprint(task_max_file_handles(c))) + log(sprint(pid2task(pid()))) + log(sprint(pid2execname(pid()))) exit() } diff --git a/testsuite/lib/stap_run2.exp b/testsuite/lib/stap_run2.exp index 9849aefb..b734a1e7 100644 --- a/testsuite/lib/stap_run2.exp +++ b/testsuite/lib/stap_run2.exp @@ -10,12 +10,27 @@ proc stap_run2 { TEST_NAME args } { # zap the srcdir prefix - set test_file_name $TEST_NAME + set TEST_FILE $TEST_NAME set TEST_NAME [regsub {.*/testsuite/} $TEST_NAME ""] - + if {[llength $args] == 0} { + stap_run3 $TEST_NAME $TEST_FILE + } else { + stap_run3 $TEST_NAME $TEST_FILE $args + } +} + +# stap_run3 TEST_NAME TEST_FILE +# TEST_NAME is the name of the test as shown in PASS/FAIL/SKIPPED messages. +# TEST_FILE is the path to the current test +# Additional arguments are passed to stap as-is. +# +# global result_string must be set to the expected output + +proc stap_run3 { TEST_NAME TEST_FILE args } { if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return } - - set cmd [concat stap $args $test_file_name] + + set cmd [concat stap $args $TEST_FILE] + send_log "executing: $cmd\n" catch {eval exec $cmd} res set n 0 @@ -29,5 +44,10 @@ proc stap_run2 { TEST_NAME args } { } incr n } - pass "$TEST_NAME" + if {[expr $n == [llength $expected]]} { + pass "$TEST_NAME" + } else { + fail "$TEST_NAME" + send_log "too few lines of output, got $n, expected [llength $expected]\n" + } } diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 5bf125b9..c80ad171 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -37,7 +37,7 @@ proc print_systemtap_version {} { proc setup_systemtap_environment {} { - global srcdir prefix env server_pid net_path + global srcdir env # need an absolute SRCDIR for the top-level src/ tree # XXX: or, we could change nearby uses of ${SRCDIR}/testsuite to ${SRCDIR} @@ -53,40 +53,9 @@ proc setup_systemtap_environment {} { # Find or start a systemtap server, if requested. if {[use_server_p]} then { - print "Testing using a systemtap server" - - # A place for some temporary files and scripts. - set net_path [exec pwd]/net - exec /bin/mkdir -p $net_path - - # Server management scripts and data are installed if this is an - # install test, otherwise there is some setup to do. - if {! [installtest_p]} then { - # Make sure the server management scripts and tools are on the $PATH. - set env(PATH) "$srcdir/..:[exec pwd]/..:$env(PATH)" + if {! [setup_server]} then { + return 0 } - - # Try to find or start the server. - set server_pid [exec stap-find-or-start-server] - if { "$server_pid" == "-1" } then { - print "Cannot find or start a systemtap server" - set server_pid 0 - # TODO: How do we abort here? - } elseif { "$server_pid" == "0" } then { - print "A compatible systemtap server is already available" - } else { - print "Started a systemtap server as PID==$server_pid" - } - - # Make a copy of 'stap-client' as 'stap' and make sure it's at the - # beginning of the $PATH. Do this after starting the server so that - # The server does not call this instance of 'stap' - if {[installtest_p]} then { - exec /bin/cp -p [exec which stap-client] $net_path/stap - } else { - exec /bin/cp -p $srcdir/../stap-client $net_path/stap - } - set env(PATH) "$net_path:$env(PATH)" } # PATH, SYSTEMTAP_TAPSET, SYSTEMTAP_RUNTIME, LD_LIBRARY_PATH are already set. @@ -95,6 +64,78 @@ proc setup_systemtap_environment {} { verbose -log "env $var = $env($var)" } } + + return 1 +} + +# Set up the environment so that tests will be performed using the systemtap +# client and server. +proc setup_server {} { + global srcdir env server_pid net_path + + # Make sure that the necessary resources are available to run the client/server. + if {[installtest_p]} then { + if {[exec /usr/bin/which stap-client-connect] == ""} then { + print "Unable to start a server: stap-client-connect is not found in PATH" + return 0 + } + } elseif {! [file exists [exec pwd]/../stap-client-connect]} then { + print "Unable to start a server: [exec pwd]/../stap-client-connect is not found" + return 0 + } + if {[exec /usr/bin/which avahi-publish-service] == ""} then { + print "Unable to start a server: avahi-publish-service is not found in PATH" + return 0 + } + + print "Testing using a systemtap server" + + # A place for some temporary files and scripts. + set net_path [exec pwd]/net + exec /bin/mkdir -p $net_path + + # Server management scripts and data are installed if this is an + # install test, otherwise there is some setup to do. + if {! [installtest_p]} then { + # Make sure the server management scripts and tools are on the $PATH. + set env(PATH) "$srcdir/..:[exec pwd]/..:$env(PATH)" + } + + # Try to find or start the server. + set server_pid [exec stap-find-or-start-server] + if { "$server_pid" == "-1" } then { + print "Cannot find or start a systemtap server" + set server_pid 0 + return 0 + } elseif { "$server_pid" == "0" } then { + print "A compatible systemtap server is already available" + } else { + print "Started a systemtap server as PID==$server_pid" + } + + # Make a copy of 'stap-client' as 'stap' and make sure it's at the + # beginning of the $PATH. Do this after starting the server so that + # The server does not call this instance of 'stap' + if {[installtest_p]} then { + exec /bin/cp -p [exec which stap-client] $net_path/stap + } else { + exec /bin/cp -p $srcdir/../stap-client $net_path/stap + } + set env(PATH) "$net_path:$env(PATH)" + + return 1 +} + +proc shutdown_server {} { + global server_pid net_path + + if { $server_pid != 0 } then { + print "Stopping the systemtap server with PID==$server_pid" + exec stap-stop-server $server_pid + } + + # Remove the temporary stap script + exec /bin/rm -fr $net_path } proc get_system_info {} { @@ -116,7 +157,10 @@ proc get_system_info {} { if [file exists /etc/debian_version] {set Distro [exec /bin/cat /etc/debian_version]} } -setup_systemtap_environment +if {! [setup_systemtap_environment]} then { + return 0 +} + print_systemtap_version get_system_info @@ -124,17 +168,9 @@ proc systemtap_init {args} {} proc systemtap_version {} {} proc systemtap_exit {} { - global server_pid net_path - # Stop the stap server, if we started it. if {[use_server_p]} then { - if { $server_pid != 0 } then { - print "Stopping the systemtap server with PID==$server_pid" - exec stap-stop-server $server_pid - } - - # Remove the temporary stap script - exec /bin/rm -fr $net_path + shutdown_server } } diff --git a/testsuite/semok/badvar.stp b/testsuite/semok/badvar.stp new file mode 100755 index 00000000..b3bd2d67 --- /dev/null +++ b/testsuite/semok/badvar.stp @@ -0,0 +1,7 @@ +#! stap --skip-badvars + +probe syscall.read { + if ($foo == 0) + printf ("Voila! It works..\n") + exit () +} diff --git a/testsuite/semok/cast.stp b/testsuite/semok/cast.stp new file mode 100755 index 00000000..93da18ef --- /dev/null +++ b/testsuite/semok/cast.stp @@ -0,0 +1,13 @@ +#! stap -p2 + +probe begin { + // basic @cast test, with and without specifying kernel + println(@cast(0, "task_struct")->tgid) + println(@cast(0, "task_struct", "kernel")->tgid) + + // check module-search paths + println(@cast(0, "task_struct", "foo:kernel:bar")->tgid) + + // would be nice to test usermode @cast too, + // but who knows what debuginfo is installed... +} diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp index 390af054..b10a4f28 100644 --- a/testsuite/systemtap.base/cache.exp +++ b/testsuite/systemtap.base/cache.exp @@ -116,6 +116,7 @@ set env(SYSTEMTAP_DIR) /dev/null stap_compile DISABLED1 [F_UNCACHED_COMPILE] $basic_script1 stap_compile DISABLED2 [F_UNCACHED_COMPILE] $basic_script1 set env(SYSTEMTAP_DIR) $local_systemtap_dir +eval [list exec /bin/rm -f] [glob "stap_*.ko"] # Disable the cache with '-m' stap_compile MODNAM1 [F_UNCACHED_COMPILE] $basic_script1 -m modnam diff --git a/testsuite/systemtap.base/cast.exp b/testsuite/systemtap.base/cast.exp new file mode 100644 index 00000000..df3246e8 --- /dev/null +++ b/testsuite/systemtap.base/cast.exp @@ -0,0 +1,4 @@ +set test "cast" +set ::result_string {PID OK +execname OK} +stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/cast.stp b/testsuite/systemtap.base/cast.stp new file mode 100644 index 00000000..bec0cc9b --- /dev/null +++ b/testsuite/systemtap.base/cast.stp @@ -0,0 +1,22 @@ +probe begin +{ + curr = task_current() + + // Compare PIDs + pid = pid() + cast_pid = @cast(curr, "task_struct")->tgid + if (pid == cast_pid) + println("PID OK") + else + printf("PID %d != %d\n", pid, cast_pid) + + // Compare execnames + name = execname() + cast_name = kernel_string(@cast(curr, "task_struct")->comm) + if (name == cast_name) + println("execname OK") + else + printf("execname \"%s\" != \"%s\"\n", name, cast_name) + + exit() +} diff --git a/testsuite/systemtap.base/ctime.exp b/testsuite/systemtap.base/ctime.exp index f6db096a..d5ae07d5 100644 --- a/testsuite/systemtap.base/ctime.exp +++ b/testsuite/systemtap.base/ctime.exp @@ -13,6 +13,5 @@ a long, long time ago... Tue Jan 19 03:14:07 2038 far far in the future... a long, long time ago... -far far in the future... -} +far far in the future...} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/gtod_init.exp b/testsuite/systemtap.base/gtod_init.exp new file mode 100644 index 00000000..48616b1f --- /dev/null +++ b/testsuite/systemtap.base/gtod_init.exp @@ -0,0 +1,29 @@ +# test for checking initialization of the time subsystem +set test "gtod_init" + +# check that init and kill are both present with a gettimeofday +set time_init 0 +set time_kill 0 +spawn stap -p2 -e {probe begin { println(gettimeofday_s()) }} +expect { + -timeout 120 + -re {\n_gettimeofday_init:} { incr time_init; exp_continue } + -re {\n_gettimeofday_kill:} { incr time_kill; exp_continue } + timeout { fail "$test (timeout)" } + eof { + if {$time_init == 1} { pass "$test (init)" } { fail "$test (init $time_init)" } + if {$time_kill == 1} { pass "$test (kill)" } { fail "$test (kill $time_kill)" } + } +} +wait + +# check that init and kill are both NOT present without a gettimeofday +spawn stap -p2 -e {probe begin { println(get_cycles()) }} +expect { + -timeout 120 + -re {\n_gettimeofday_init:} { fail "$test (bad init)" } + -re {\n_gettimeofday_kill:} { fail "$test (bad kill)" } + timeout { fail "$test (timeout)" } + eof { pass "$test (no init/kill)" } +} +wait diff --git a/testsuite/systemtap.base/labels.exp b/testsuite/systemtap.base/labels.exp index 9c92d69c..6db81c54 100644 --- a/testsuite/systemtap.base/labels.exp +++ b/testsuite/systemtap.base/labels.exp @@ -13,6 +13,7 @@ if {$utrace_support_found == 0} { untested "$test"; return } # Compile a C program to use as the user-space probing target set label_srcpath "[pwd]/labels.c" set label_exepath "[pwd]/labels.x" +set label_sopath "[pwd]/labels.so" set label_flags "additional_flags=-g" set fp [open $label_srcpath "w"] puts $fp " @@ -54,9 +55,12 @@ if { $res != "" } { pass "compiling labels.c -g" } +# label in an executable + verbose -log "spawn stap -c $label_exepath $label_stppath" spawn stap -c $label_exepath $label_stppath +wait expect { -timeout 180 -re {VARS a=0x0 b=0x0.*VARS a=0x2 b=0x0.*VARS a=0x2 b=0x3 c=0x[a-f01-9]} { incr ok; exp_continue } @@ -64,7 +68,83 @@ expect { eof { } } -wait +if {$ok == 1} { pass "$test exe .label" } { fail "$test exe .label" } + +# address of label in an executable + +set label_shpath "[pwd]/label.sh" +set fp [open $label_shpath "w"] +puts $fp " +readelf --debug-dump $label_exepath | awk \" +/init_another_int/ {have_label=1} +/DW_AT_low_pc/ {if (have_label) {print \$3;exit;}} +\" +" +close $fp +spawn sh $label_shpath +expect { + -re {0x[0-9a-f]*} +} +set nomatch 0 +spawn stap -p2 -l "process\(\"$label_exepath\"\).statement($expect_out(0,string))" +expect { + -timeout 180 + -re {semantic error: no match} { incr nomatch; exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} + +if {$nomatch == 0} { pass "$test exe .statement" } { fail "$test exe .statement" } + +set ok 0 + +set label_flags "additional_flags=-g additional_flags=-shared additional_flags=-fPIC" +set res [target_compile $label_srcpath $label_sopath executable $label_flags] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "compiling labels.c -g" + catch {exec rm -f $label_srcpath $label_stppath} + return +} else { + pass "compiling labels.c -g" +} + +# label in a shared object + +spawn stap -p2 -l "process\(\"$label_sopath\"\).function\(\"\*\"\).label\(\"init_another_int\"\)" +expect { + -timeout 180 + -re {process.*function} { incr ok; exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} + +if {$ok == 1} { pass "$test so .label" } { fail "$test so .label" } + +# address of label in a shared object + +set label_shpath "[pwd]/label.sh" +set fp [open $label_shpath "w"] +puts $fp " +readelf --debug-dump $label_sopath | awk \" +/init_another_int/ {have_label=1} +/DW_AT_low_pc/ {if (have_label) {print \$3;exit;}} +\" +" +close $fp +spawn sh $label_shpath +expect { + -re {0x[0-9a-f]*} +} +set nomatch 0 +spawn stap -p2 -l "process\(\"$label_sopath\"\).statement($expect_out(0,string))" +expect { + -timeout 180 + -re {semantic error: no match} { incr nomatch; exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} + +if {$nomatch == 0} { pass "$test so .statement" } { fail "$test so .statement" } -if {$ok == 1} { pass "$test" } { fail "$test ($ok)" } -catch {exec rm -f $label_srcpath $label_stppath $label_exepath} +catch {exec rm -f $label_srcpath $label_stppath $label_exepath $label_shpath $label_sopath} diff --git a/testsuite/systemtap.base/limits.exp b/testsuite/systemtap.base/limits.exp index c5328e8f..c04d507d 100644 --- a/testsuite/systemtap.base/limits.exp +++ b/testsuite/systemtap.base/limits.exp @@ -32,7 +32,6 @@ Minimum signed 64-bit number -9223372036854775808 0x8000000000000000 -9223372036854775808 0x8000000000000000 -9223372036854775808 0x8000000000000000 --9223372036854775808 0x8000000000000000 -} +-9223372036854775808 0x8000000000000000} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/overflow_error.exp b/testsuite/systemtap.base/overflow_error.exp new file mode 100644 index 00000000..33be90a7 --- /dev/null +++ b/testsuite/systemtap.base/overflow_error.exp @@ -0,0 +1,32 @@ +# Test overflow errors point to the correct thing. + +set test "overflow_error" +if {![installtest_p]} { untested $test; return } + +set error_msg1 "ERROR: Array overflow, check size limit (3) near identifier 'overflow1' at $srcdir/$subdir/$test.stp" +set error_msg2 "ERROR: Array overflow, check size limit (5) near identifier 'overflow2' at $srcdir/$subdir/$test.stp" +set exit_warning "WARNING: Number of errors: 2, skipped probes: 0" + +set pass 0 + +spawn stap -DMAXERRORS=1 $srcdir/$subdir/$test.stp +expect { + $error_msg1 {incr pass; exp_continue} + $error_msg2 {incr pass; exp_continue} + $exit_warning {incr pass; exp_continue} + timeout { + exec kill -INT -[exp_pid] + fail "$test timed out" + } + eof {} +} +catch { close } +wait + +if {$pass == 3} { + pass $test +} else { + fail "$test ($pass)" +} + + diff --git a/testsuite/systemtap.base/overflow_error.stp b/testsuite/systemtap.base/overflow_error.stp new file mode 100644 index 00000000..f5a3e917 --- /dev/null +++ b/testsuite/systemtap.base/overflow_error.stp @@ -0,0 +1,22 @@ +# overflow some stuff to see if error message point to the correct thing. +global count; +global overflow1[3]; +global overflow2[5]; + +probe timer.ms(10) +{ + if (count <= 3) + { + overflow1[count++] = gettimeofday_ns(); + } + else + { + overflow2[count++] <<< gettimeofday_ns(); + } +} + +probe timer.s(3) +{ + exit(); +} + diff --git a/testsuite/systemtap.base/sdt.c b/testsuite/systemtap.base/sdt.c new file mode 100644 index 00000000..7c7398e5 --- /dev/null +++ b/testsuite/systemtap.base/sdt.c @@ -0,0 +1,71 @@ +#include "sdt.h" /* Really <sys/sdt.h>, but pick current source version. */ + +static void call1(int a) +{ + STAP_PROBE1(test, mark_a, a); +} + +static void call2(int a, int b) +{ + STAP_PROBE2(test, mark_b, a, b); +} + +static void call3(int a, int b, int c) +{ + STAP_PROBE3(test, mark_c, a, b, c); +} + +static void call4(int a, int b, int c, int d) +{ + STAP_PROBE4(test, mark_d, a, b, c, d); +} + +static void call5(int a, int b, int c, int d, int e) +{ + STAP_PROBE5(test, mark_e, a, b, c, d, e); +} + +static void call6(int a, int b, int c, int d, int e, int f) +{ + STAP_PROBE6(test, mark_f, a, b, c, d, e, f); +} + +static void call7(int a, int b, int c, int d, int e, int f, int g) +{ + STAP_PROBE7(test, mark_g, a, b, c, d, e, f, g); +} + +static void call8(int a, int b, int c, int d, int e, int f, int g, int h) +{ + STAP_PROBE8(test, mark_h, a, b, c, d, e, f, g, h); +} + +static void call9(int a, int b, int c, int d, int e, int f, int g, int h, int i) +{ + STAP_PROBE9(test, mark_i, a, b, c, d, e, f, g, h, i); +} + +static void call10(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) +{ + STAP_PROBE10(test, mark_j, a, b, c, d, e, f, g, h, i, j); +} + +int +main (int argc, char **argv) +{ + int a, b, c, d, e, f, g, h, i, j; + a = 1; b = 2; c = 3; d = 4; e = 5; f = 6; g = 7; h = 8; i = 9; j = 10; + call1(a); + call2(a, b); + call3(a, b, c); + call4(a, b, c, d); + call5(a, b, c, d, e); + call6(a, b, c, d, e, f); + call7(a, b, c, d, e, f, g); + call8(a, b, c, d, e, f, g, h); + call9(a, b, c, d, e, f, g, h, i); + call10(a, b, c, d, e, f, g, h, i, j); + (void) argv; + (void) argc; + return 0; +} diff --git a/testsuite/systemtap.base/sdt.exp b/testsuite/systemtap.base/sdt.exp new file mode 100644 index 00000000..21b94810 --- /dev/null +++ b/testsuite/systemtap.base/sdt.exp @@ -0,0 +1,64 @@ +set test "sdt" +set ::result_string {1 +1 2 +1 2 3 +1 2 3 4 +1 2 3 4 5 +1 2 3 4 5 6 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 8 +1 2 3 4 5 6 7 8 9 +1 2 3 4 5 6 7 8 9 10} + +set extra_flags {{""} {additional_flags=-std=gnu89} {additional_flags=-ansi} {additional_flags=-pedantic} {additional_flags=-ansi additional_flags=-pedantic} {additional_flags=-O2} {additional_flags="-O3"}} + +# Iterate extra_flags, trying each with C and C++ +for {set i 0} {$i < [llength $extra_flags]} {incr i} { +set extra_flag [lindex $extra_flags $i] + +# C +set test_flags "additional_flags=-g" +set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" +set test_flags "$test_flags additional_flags=-Wall" +set test_flags "$test_flags additional_flags=-Wextra" +set test_flags "$test_flags additional_flags=-Werror" + +set res [target_compile $srcdir/$subdir/$test.c $test.prog executable "$test_flags $extra_flag"] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "compiling $test.c $extra_flag" + return +} else { + pass "compiling $test.c $extra_flag" +} + +if {[installtest_p]} { + stap_run3 "$test $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog +} else { + untested "$test $extra_flag" +} + +# C++ +set test_flags "additional_flags=-g" +set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" +set test_flags "$test_flags additional_flags=-Wall" +set test_flags "$test_flags additional_flags=-Werror" +set test_flags "$test_flags additional_flags=-x additional_flags=c++" + +set res [target_compile $srcdir/$subdir/$test.c $test.prog executable "$test_flags $extra_flag"] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "compiling $test.c c++ $extra_flag" + return +} else { + pass "compiling $test.c c++ $extra_flag" +} + +if {[installtest_p]} { + stap_run3 "$test c++ $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog +} else { + untested "$test c++ $extra_flag" +} +} + +catch {exec rm -f $test.prog} diff --git a/testsuite/systemtap.base/sdt.stp b/testsuite/systemtap.base/sdt.stp new file mode 100644 index 00000000..1f075bca --- /dev/null +++ b/testsuite/systemtap.base/sdt.stp @@ -0,0 +1,49 @@ +probe process("sdt.prog").mark("mark_a") +{ + printf("%d\n", $arg1); +} + +probe process("sdt.prog").mark("mark_b") +{ + printf("%d %d\n", $arg1, $arg2); +} + +probe process("sdt.prog").mark("mark_c") +{ + printf("%d %d %d\n", $arg1, $arg2, $arg3); +} + +probe process("sdt.prog").mark("mark_d") +{ + printf("%d %d %d %d\n", $arg1, $arg2, $arg3, $arg4); +} + +probe process("sdt.prog").mark("mark_e") +{ + printf("%d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5); +} + +probe process("sdt.prog").mark("mark_f") +{ + printf("%d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6); +} + +probe process("sdt.prog").mark("mark_g") +{ + printf("%d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7); +} + +probe process("sdt.prog").mark("mark_h") +{ + printf("%d %d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8); +} + +probe process("sdt.prog").mark("mark_i") +{ + printf("%d %d %d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8, $arg9); +} + +probe process("sdt.prog").mark("mark_j") +{ + printf("%d %d %d %d %d %d %d %d %d %d\n", $arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8, $arg9, $arg10); +} diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp index 11fec9b1..a4bd5e2c 100644 --- a/testsuite/systemtap.base/static_uprobes.exp +++ b/testsuite/systemtap.base/static_uprobes.exp @@ -14,6 +14,7 @@ puts $fp " void bar (int i) { + STATIC_UPROBES_TEST_PROBE_2(i); if (i == 0) i = 1000; STAP_PROBE1(static_uprobes,test_probe_2,i); @@ -88,6 +89,7 @@ if {[installtest_p]} { if {[catch {exec $dtrace -h -s $sup_dpath} res]} { verbose -log "unable to run $dtrace: $res" } +catch {exec rm -f $sup_dpath} if {[file exists $sup_hpath]} then { pass "$test generating header" } else { @@ -96,8 +98,6 @@ if {[file exists $sup_hpath]} then { return } -catch {exec rm -f $sup_dpath} - if {[installtest_p]} { set sdtdir $env(SYSTEMTAP_INCLUDES) } else { @@ -159,7 +159,7 @@ expect { wait -if {$ok == 4} { pass "$test C" } { fail "$test C ($ok)" } +if {$ok == 5} { pass "$test C" } { fail "$test C ($ok)" } set ok 0 @@ -170,7 +170,6 @@ verbose -log "spawn stap -c $sup_exepath $sup_stppath" spawn stap -c $sup_exepath $sup_stppath expect { -timeout 180 - -re {In test_probe_1 probe} { incr ok; exp_continue } -re {In test_probe_2 probe 0x2} { incr ok; exp_continue } -re {In test_probe_0 probe 0x3} { incr ok; exp_continue } -re {In test_probe_3 probe 0x3 0x[0-9a-f][0-9a-f]} { incr ok; exp_continue } @@ -181,9 +180,9 @@ expect { wait -if {$ok == 4} { pass "$test C++" } { fail "$test C++ ($ok)" } +if {$ok == 5} { pass "$test C++" } { fail "$test C++ ($ok)" } # catch {exec rm -f $sup_srcpath $sup_exepath $supcplus_exepath $sup_hpath $sup_stppath} # It's not so important to clean up, and it's unhelpful if -# one needs to diagnose a test failure.
\ No newline at end of file +# one needs to diagnose a test failure. diff --git a/testsuite/systemtap.base/stmt_rel.exp b/testsuite/systemtap.base/stmt_rel.exp index 25156d9b..be51fef9 100644 --- a/testsuite/systemtap.base/stmt_rel.exp +++ b/testsuite/systemtap.base/stmt_rel.exp @@ -3,7 +3,6 @@ set test "stmt_rel" set ::result_string {PASS bio_init PASS line number -PASS wildcard -} +PASS wildcard} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/tracepoints.exp b/testsuite/systemtap.base/tracepoints.exp new file mode 100644 index 00000000..bea461c4 --- /dev/null +++ b/testsuite/systemtap.base/tracepoints.exp @@ -0,0 +1,3 @@ +set test "tracepoints" +set ::result_string {tracepoints OK} +stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/tracepoints.stp b/testsuite/systemtap.base/tracepoints.stp new file mode 100644 index 00000000..bdb4d730 --- /dev/null +++ b/testsuite/systemtap.base/tracepoints.stp @@ -0,0 +1,23 @@ +// This checks that we can compile and register every tracepoint +// we can find, along with all of their context variables. +global hits +probe all_tracepoints = kernel.trace("*") +{ + if ($$name . $$vars . $$parms == "") + next + + // Allow it to quit once we hit our hundredth tracepoint + if (++hits < 100) + next +} + +// If there aren't any tracepoints in the kernel, +// we use "begin" instead to quit right away. +probe all_tracepoints!, begin { + println("tracepoints OK") + exit() +} + +// give hits a use so there's no warning +// when we don't have tracepoints +probe never { hits++ } diff --git a/testsuite/systemtap.examples/interrupt/scf.stp b/testsuite/systemtap.examples/interrupt/scf.stp index f84c2494..f84c2494 100644..100755 --- a/testsuite/systemtap.examples/interrupt/scf.stp +++ b/testsuite/systemtap.examples/interrupt/scf.stp diff --git a/testsuite/systemtap.examples/io/iostats.stp b/testsuite/systemtap.examples/io/iostats.stp index 90bb4f5b..90bb4f5b 100644..100755 --- a/testsuite/systemtap.examples/io/iostats.stp +++ b/testsuite/systemtap.examples/io/iostats.stp diff --git a/testsuite/systemtap.examples/memory/pfaults.stp b/testsuite/systemtap.examples/memory/pfaults.stp index 5bf1a8a6..5bf1a8a6 100644..100755 --- a/testsuite/systemtap.examples/memory/pfaults.stp +++ b/testsuite/systemtap.examples/memory/pfaults.stp diff --git a/testsuite/systemtap.examples/network/tcp_connections.stp b/testsuite/systemtap.examples/network/tcp_connections.stp index bd2db76a..bd2db76a 100644..100755 --- a/testsuite/systemtap.examples/network/tcp_connections.stp +++ b/testsuite/systemtap.examples/network/tcp_connections.stp diff --git a/testsuite/systemtap.examples/profiling/latencytap.stp b/testsuite/systemtap.examples/profiling/latencytap.stp index 28956129..28956129 100644..100755 --- a/testsuite/systemtap.examples/profiling/latencytap.stp +++ b/testsuite/systemtap.examples/profiling/latencytap.stp diff --git a/testsuite/systemtap.examples/profiling/timeout.stp b/testsuite/systemtap.examples/profiling/timeout.stp index 48d6d21d..48d6d21d 100644..100755 --- a/testsuite/systemtap.examples/profiling/timeout.stp +++ b/testsuite/systemtap.examples/profiling/timeout.stp diff --git a/testsuite/systemtap.examples/profiling/topsys.stp b/testsuite/systemtap.examples/profiling/topsys.stp index 34cf826c..34cf826c 100644..100755 --- a/testsuite/systemtap.examples/profiling/topsys.stp +++ b/testsuite/systemtap.examples/profiling/topsys.stp diff --git a/testsuite/systemtap.maps/exists.exp b/testsuite/systemtap.maps/exists.exp index ea043a6b..bbdac737 100755 --- a/testsuite/systemtap.maps/exists.exp +++ b/testsuite/systemtap.maps/exists.exp @@ -9,8 +9,7 @@ comlete list for b: [0,0] [1,10] [2,20] [3,30] [4,40] [5,50] [6,60] [7,70] [8,80 [0,0] is still there emtpy string there hello there -emtpy string still there -} +emtpy string still there} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/foreach_foreach.exp b/testsuite/systemtap.maps/foreach_foreach.exp index f79d290a..07a2d871 100644 --- a/testsuite/systemtap.maps/foreach_foreach.exp +++ b/testsuite/systemtap.maps/foreach_foreach.exp @@ -114,8 +114,7 @@ bar[21] = 9261 bar[22] = 10648 bar[23] = 12167 bar[24] = 13824 -foo[10] = 100 -} +foo[10] = 100} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/foreach_limit.exp b/testsuite/systemtap.maps/foreach_limit.exp index 97305c4b..4cc87ec8 100644 --- a/testsuite/systemtap.maps/foreach_limit.exp +++ b/testsuite/systemtap.maps/foreach_limit.exp @@ -94,8 +94,7 @@ bucket 69: 13 bucket 70: 28 loop had 71 iterations -Done. -} +Done.} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/foreach_limit2.exp b/testsuite/systemtap.maps/foreach_limit2.exp index 00696fe1..224a0aa7 100644 --- a/testsuite/systemtap.maps/foreach_limit2.exp +++ b/testsuite/systemtap.maps/foreach_limit2.exp @@ -82,8 +82,7 @@ agg_array[6]: count:2 sum:18 avg:9 min:6 max:12 loop had 4 iterations x ended up as 5 -Done. -} +Done.} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/ii.exp b/testsuite/systemtap.maps/ii.exp index f7ce95fb..1f4a972a 100644 --- a/testsuite/systemtap.maps/ii.exp +++ b/testsuite/systemtap.maps/ii.exp @@ -61,8 +61,7 @@ foo[6] = 91 foo[7] = 140 foo[8] = 204 foo[9] = 285 -foo[10] = 385 -} +foo[10] = 385} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/iiiiii.exp b/testsuite/systemtap.maps/iiiiii.exp index 3c8dbaf0..aeddbbac 100644 --- a/testsuite/systemtap.maps/iiiiii.exp +++ b/testsuite/systemtap.maps/iiiiii.exp @@ -64,8 +64,7 @@ foo[1,1,0,1,1] = 4 foo[1,1,1,0,0] = 3 foo[1,1,1,0,1] = 4 foo[1,1,1,1,0] = 4 -foo[1,1,1,1,1] = 5 -} +foo[1,1,1,1,1] = 5} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/is.exp b/testsuite/systemtap.maps/is.exp index 5dffb850..31e96e77 100644 --- a/testsuite/systemtap.maps/is.exp +++ b/testsuite/systemtap.maps/is.exp @@ -61,8 +61,7 @@ foo[6] = # 36 foo[7] = # 49 foo[8] = # 64 foo[9] = # 81 -foo[10] = # 100 -} +foo[10] = # 100} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/ix.exp b/testsuite/systemtap.maps/ix.exp index 578e8e38..11de73c1 100644 --- a/testsuite/systemtap.maps/ix.exp +++ b/testsuite/systemtap.maps/ix.exp @@ -41,8 +41,7 @@ foo[9]: count:4 sum:117 avg:29 min:-2 max:100 foo[10]: count:4 sum:118 avg:29 min:-2 max:100 Run a quick foreach without sorting... -complete sum of foo:1243 -} +complete sum of foo:1243} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear.exp b/testsuite/systemtap.maps/linear.exp index 5519ee11..23b5f871 100644 --- a/testsuite/systemtap.maps/linear.exp +++ b/testsuite/systemtap.maps/linear.exp @@ -38,7 +38,6 @@ value |-------------------------------------------------- count 1400 | 3 1450 | 3 1500 | 0 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear_empty.exp b/testsuite/systemtap.maps/linear_empty.exp index 88a53a31..922ff0b9 100644 --- a/testsuite/systemtap.maps/linear_empty.exp +++ b/testsuite/systemtap.maps/linear_empty.exp @@ -1,8 +1,7 @@ # Test empty linear histogram set test "linear_empty" -set ::result_string {count=0 -} +set ::result_string {count=0} stap_run2 $srcdir/$subdir/$test.stp -w diff --git a/testsuite/systemtap.maps/linear_large.exp b/testsuite/systemtap.maps/linear_large.exp index 51df3c92..d2a03f0a 100644 --- a/testsuite/systemtap.maps/linear_large.exp +++ b/testsuite/systemtap.maps/linear_large.exp @@ -19,7 +19,6 @@ avg=1115333333 900000000 | 0 1000000000 |@@@@ 4 >1000000000 |@ 1 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear_large_neg.exp b/testsuite/systemtap.maps/linear_large_neg.exp index bdffba7b..470414a3 100644 --- a/testsuite/systemtap.maps/linear_large_neg.exp +++ b/testsuite/systemtap.maps/linear_large_neg.exp @@ -19,7 +19,6 @@ avg=-1284615384 -200000000 | 0 -100000000 |@@ 2 0 |@ 1 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear_over.exp b/testsuite/systemtap.maps/linear_over.exp index 5b0fafa4..25eca1e1 100644 --- a/testsuite/systemtap.maps/linear_over.exp +++ b/testsuite/systemtap.maps/linear_over.exp @@ -10,7 +10,6 @@ value |-------------------------------------------------- count 90 | 0 100 | 0 >100 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9000 - } stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 diff --git a/testsuite/systemtap.maps/linear_overunder.exp b/testsuite/systemtap.maps/linear_overunder.exp index 80b74c72..e5275524 100644 --- a/testsuite/systemtap.maps/linear_overunder.exp +++ b/testsuite/systemtap.maps/linear_overunder.exp @@ -25,7 +25,6 @@ value |-------------------------------------------------- count 950 |@ 27 1000 |@ 23 >1000 |@@@@@@@ 102 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear_under.exp b/testsuite/systemtap.maps/linear_under.exp index 8efc45be..28d24886 100644 --- a/testsuite/systemtap.maps/linear_under.exp +++ b/testsuite/systemtap.maps/linear_under.exp @@ -10,7 +10,6 @@ value |-------------------------------------------------- count <1800 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 100 1800 | 0 1900 | 0 - } stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 diff --git a/testsuite/systemtap.maps/log.exp b/testsuite/systemtap.maps/log.exp index 2bc54a33..d19082b4 100644 --- a/testsuite/systemtap.maps/log.exp +++ b/testsuite/systemtap.maps/log.exp @@ -130,7 +130,6 @@ set ::result_string { value |------------------------------------- 1152921504606846976 |@ 1 2305843009213693952 |@ 1 4611686018427387904 |@ 1 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/log_edge.exp b/testsuite/systemtap.maps/log_edge.exp index 051021b1..6ce546d9 100644 --- a/testsuite/systemtap.maps/log_edge.exp +++ b/testsuite/systemtap.maps/log_edge.exp @@ -43,8 +43,7 @@ value |-------------------------------------------------- count bucket 65: 1 bucket 66: 2 -bucket 67: 1 -} +bucket 67: 1} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/si.exp b/testsuite/systemtap.maps/si.exp index 600687ed..eb1b05c7 100644 --- a/testsuite/systemtap.maps/si.exp +++ b/testsuite/systemtap.maps/si.exp @@ -61,8 +61,7 @@ foo[6] = 91 foo[7] = 140 foo[8] = 204 foo[9] = 285 -foo[10] = 385 -} +foo[10] = 385} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/ss.exp b/testsuite/systemtap.maps/ss.exp index 548a888e..9978ead0 100644 --- a/testsuite/systemtap.maps/ss.exp +++ b/testsuite/systemtap.maps/ss.exp @@ -61,7 +61,6 @@ foo[6] = # 36 foo[7] = # 49 foo[8] = # 64 foo[9] = # 81 -foo[10] = # 100 -} +foo[10] = # 100} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/basic3.exp b/testsuite/systemtap.printf/basic3.exp index e3beb9ed..5c4f7e79 100644 --- a/testsuite/systemtap.printf/basic3.exp +++ b/testsuite/systemtap.printf/basic3.exp @@ -1,5 +1,4 @@ set test "basic3" set ::result_string {Hello -World -} +World} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/bin6.exp b/testsuite/systemtap.printf/bin6.exp Binary files differindex 0de41e78..4c5e7f2b 100644 --- a/testsuite/systemtap.printf/bin6.exp +++ b/testsuite/systemtap.printf/bin6.exp diff --git a/testsuite/systemtap.printf/char1.exp b/testsuite/systemtap.printf/char1.exp index 0e9232e9..35aa479f 100644 --- a/testsuite/systemtap.printf/char1.exp +++ b/testsuite/systemtap.printf/char1.exp @@ -1,4 +1,3 @@ set test "char1" -set ::result_string {stap -} -stap_run2 $srcdir/$subdir/$test.stp
\ No newline at end of file +set ::result_string {stap} +stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/int1.exp b/testsuite/systemtap.printf/int1.exp index bb30b4f3..b308848c 100644 --- a/testsuite/systemtap.printf/int1.exp +++ b/testsuite/systemtap.printf/int1.exp @@ -19,6 +19,5 @@ set ::result_string {1,10,9000000000000,-1,-1024 1,12,202757163310000,1777777777777777777777,1777777777777777776000 1,12,202757163310000,1777777777777777777777,1777777777777777776000 1, 12, 202757163310000,1777777777777777777777,1777777777777777776000 -0000000000000001,0000000000000012,0202757163310000,1777777777777777777777,1777777777777777776000 -} +0000000000000001,0000000000000012,0202757163310000,1777777777777777777777,1777777777777777776000} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/memory1.exp b/testsuite/systemtap.printf/memory1.exp index 7b55a3d7..c5f03610 100644 --- a/testsuite/systemtap.printf/memory1.exp +++ b/testsuite/systemtap.printf/memory1.exp @@ -1,4 +1,3 @@ set test "memory1" -set ::result_string {Test passed -} +set ::result_string {Test passed} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/print.exp b/testsuite/systemtap.printf/print.exp index 3a4de529..151de10d 100644 --- a/testsuite/systemtap.printf/print.exp +++ b/testsuite/systemtap.printf/print.exp @@ -13,6 +13,5 @@ foo99 888 123456789 hello999 -999hello -} +999hello} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/print_char.exp b/testsuite/systemtap.printf/print_char.exp index bab056dd..a9d63be6 100644 --- a/testsuite/systemtap.printf/print_char.exp +++ b/testsuite/systemtap.printf/print_char.exp @@ -1,5 +1,4 @@ set test "print_char" set ::result_string {ABC -ABCDEFGHIJKLMNOPQRSTUVWXYZ -} +ABCDEFGHIJKLMNOPQRSTUVWXYZ} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/println.exp b/testsuite/systemtap.printf/println.exp index 8deba53f..fcbe0c82 100644 --- a/testsuite/systemtap.printf/println.exp +++ b/testsuite/systemtap.printf/println.exp @@ -13,6 +13,5 @@ foo99 99foo 123456789 hello999 -999hello -} +999hello} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/ptr.exp b/testsuite/systemtap.printf/ptr.exp index f25a7a02..3eb412a7 100644 --- a/testsuite/systemtap.printf/ptr.exp +++ b/testsuite/systemtap.printf/ptr.exp @@ -29,8 +29,7 @@ if {$::tcl_platform(wordSize) == 8} { 0x000001X 0x12345678X 0x12345678abcdef00X -0x12345678X -" +0x12345678X" } else { set ::result_string "0x00000000 0x00000001 @@ -60,7 +59,6 @@ if {$::tcl_platform(wordSize) == 8} { 0x000001X 0x12345678X 0xabcdef00X -0x12345678X -" +0x12345678X" } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/string1.exp b/testsuite/systemtap.printf/string1.exp index aee0b71a..7c94d645 100644 --- a/testsuite/systemtap.printf/string1.exp +++ b/testsuite/systemtap.printf/string1.exp @@ -1,6 +1,5 @@ set test "string1" set ::result_string {The string is <Foobar!> Foobar!XYZZY -XYZZYFoobar!XYZZYFoobar! -} +XYZZYFoobar!XYZZYFoobar!} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.server/hello.stp b/testsuite/systemtap.server/hello.stp new file mode 100755 index 00000000..a1c4aacb --- /dev/null +++ b/testsuite/systemtap.server/hello.stp @@ -0,0 +1,8 @@ +#! stap + +probe begin +{ + printf("Hello "); + printf("From Server\n"); + exit() +} diff --git a/testsuite/systemtap.server/server.exp b/testsuite/systemtap.server/server.exp new file mode 100644 index 00000000..c2c60b97 --- /dev/null +++ b/testsuite/systemtap.server/server.exp @@ -0,0 +1,39 @@ +# Don't attempt these tests if the client/server are not available +# Start a systemtap server, if one is not already started. +if {! [use_server_p]} then { + if {! [setup_server]} then { + untested "Server Tests" + return + } +} + +# Run the buildok tests using the server +set self buildok +foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] { + set test "$self/[file tail $file] with server" + verbose -log "Running $file" + set rc [stap_run_batch $file] + # some tests are known to fail. + switch $test { + "buildok/perfmon01.stp with server" {setup_kfail 909 *-*-*} + "buildok/twentysix.stp with server" {setup_kfail 4105 *-*-*} + "buildok/twentyseven.stp with server" {setup_kfail 4166 *-*-*} + "buildok/sched_test.stp with server" {setup_kfail 1155 *-*-*} + "buildok/process_test.stp with server" {setup_kfail 1155 *-*-*} + "buildok/rpc-all-probes.stp with server" {setup_kfail 4413 *-*-*} + "buildok/nfs-all-probes.stp with server" {setup_kfail 4413 *-*-*} + } + if {$rc == 0} { pass $test } else { fail $test } +} + +# If this is an installcheck, then run a basic execution test. +if {[installtest_p]} then { + set test "Hello from server" + set rc [stap_run_batch $srcdir/systemtap.server/hello.stp] + if {$rc == 0} { pass $test } else { fail $test } +} + +# Shudown the server, if we started it. +if {! [use_server_p]} then { + shutdown_server +} diff --git a/testsuite/systemtap.string/dot.exp b/testsuite/systemtap.string/dot.exp index b1d38172..14f329db 100644 --- a/testsuite/systemtap.string/dot.exp +++ b/testsuite/systemtap.string/dot.exp @@ -5,6 +5,5 @@ helloworld 0 100 -42 -66 -} +66} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/isinstr.exp b/testsuite/systemtap.string/isinstr.exp index 986043e8..ed0474de 100644 --- a/testsuite/systemtap.string/isinstr.exp +++ b/testsuite/systemtap.string/isinstr.exp @@ -1,6 +1,5 @@ set test "isinstr" set ::result_string {"foo" is in "abcfoobad" "foo" is NOT in "abcdefg" -"" is in "" -} +"" is in ""} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/sprint.exp b/testsuite/systemtap.string/sprint.exp index c8f9826a..b4f0b453 100644 --- a/testsuite/systemtap.string/sprint.exp +++ b/testsuite/systemtap.string/sprint.exp @@ -3,6 +3,5 @@ set ::result_string {helloworld helloworld EQUAL EQUAL -hello-world helloworld FOO helloworld -} +hello-world helloworld FOO helloworld} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/strlen.exp b/testsuite/systemtap.string/strlen.exp index 40c790fe..b93564ef 100644 --- a/testsuite/systemtap.string/strlen.exp +++ b/testsuite/systemtap.string/strlen.exp @@ -2,6 +2,5 @@ set test "strlen" set ::result_string {strlen("") = 0 strlen("1") = 1 strlen("0123456789") = 10 -strlen("012345678901234567890123456789012345678901234567890123456789012") = 63 -} +strlen("012345678901234567890123456789012345678901234567890123456789012") = 63} stap_run2 $srcdir/$subdir/$test.stp -DMAXSTRINGLEN=64 diff --git a/testsuite/systemtap.string/strtol.exp b/testsuite/systemtap.string/strtol.exp index 12d63f0d..25cc21a0 100644 --- a/testsuite/systemtap.string/strtol.exp +++ b/testsuite/systemtap.string/strtol.exp @@ -10,6 +10,5 @@ set ::result_string {1 1000 4096 512 -8 -0} +8} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/substr.exp b/testsuite/systemtap.string/substr.exp index c9884935..5f1b662b 100644 --- a/testsuite/systemtap.string/substr.exp +++ b/testsuite/systemtap.string/substr.exp @@ -13,6 +13,5 @@ set ::result_string {Hello World! 12,1: 0,10: Hello Worl 0,100: Hello World! -0,100000: Hello World! -} +0,100000: Hello World!} stap_run2 $srcdir/$subdir/$test.stp diff --git a/translate.cxx b/translate.cxx index 530b077d..377a11fb 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1236,6 +1236,11 @@ c_unparser::emit_module_init () o->newline() << getvar (v).fini(); } + // For any partially registered/unregistered kernel facilities. + o->newline() << "#ifdef STAPCONF_SYNCHRONIZE_SCHED"; + o->newline() << "synchronize_sched();"; + o->newline() << "#endif"; + o->newline() << "return rc;"; o->newline(-1) << "}\n"; } @@ -3882,7 +3887,7 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e) assert (rvalue->type == pe_long); mapvar mvar = parent->getmap (array->referent, e->tok); - // o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; + o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; o->newline() << mvar.add (idx, rvar) << ";"; res = rvar; // no need for these dummy assignments @@ -3892,7 +3897,7 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e) else { mapvar mvar = parent->getmap (array->referent, e->tok); - // o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; + o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; if (op != "=") // don't bother fetch slot if we will just overwrite it parent->c_assign (lvar, mvar.get(idx), e->tok); c_assignop (res, lvar, rvar, e->tok); @@ -4453,6 +4458,9 @@ dump_unwindsyms (Dwfl_Module *m, string modname = name; + if (pending_interrupts) + return DWARF_CB_ABORT; + // skip modules/files we're not actually interested in if (c->session.unwindsym_modules.find(modname) == c->session.unwindsym_modules.end()) return DWARF_CB_OK; @@ -4489,17 +4497,35 @@ dump_unwindsyms (Dwfl_Module *m, // see https://bugzilla.redhat.com/show_bug.cgi?id=465872 // and http://sourceware.org/ml/systemtap/2008-q4/msg00579.html #ifdef _ELFUTILS_PREREQ -#if _ELFUTILS_PREREQ(0,138) + #if _ELFUTILS_PREREQ(0,138) // Let's standardize to the buggy "end of build-id bits" behavior. build_id_vaddr += build_id_len; + #endif + #if !_ELFUTILS_PREREQ(0,141) + #define NEED_ELFUTILS_BUILDID_WORKAROUND + #endif +#else + #define NEED_ELFUTILS_BUILDID_WORKAROUND #endif + + // And check for another workaround needed. + // see https://bugzilla.redhat.com/show_bug.cgi?id=489439 + // and http://sourceware.org/ml/systemtap/2009-q1/msg00513.html +#ifdef NEED_ELFUTILS_BUILDID_WORKAROUND + if (build_id_vaddr < base && dwfl_module_relocations (m) == 1) + { + GElf_Addr main_bias; + dwfl_module_getelf (m, &main_bias); + build_id_vaddr += main_bias; + } #endif - if (c->session.verbose > 1) { - clog << "Found build-id in " << name - << ", length " << build_id_len; - clog << ", end at 0x" << hex << build_id_vaddr - << dec << endl; - } + if (c->session.verbose > 1) + { + clog << "Found build-id in " << name + << ", length " << build_id_len; + clog << ", end at 0x" << hex << build_id_vaddr + << dec << endl; + } } // Look up the relocation basis for symbols @@ -4534,6 +4560,10 @@ dump_unwindsyms (Dwfl_Module *m, ki = dwfl_module_relocate_address (m, &extra_offset); dwfl_assert ("dwfl_module_relocate_address extra_offset", ki >= 0); + // Sadly dwfl_module_relocate_address is broken on + // elfutils < 0.138, so we need to adjust for the module + // base address outself. (see also below). + extra_offset = sym.st_value - base; if (c->session.verbose > 2) clog << "Found kernel _stext 0x" << hex << extra_offset << dec << endl; } @@ -4670,6 +4700,15 @@ dump_unwindsyms (Dwfl_Module *m, c->output << "static struct _stp_module _stp_module_" << stpmod_idx << " = {\n"; c->output << ".name = " << lex_cast_qstring (modname) << ", \n"; + + // Get the canonical path of the main file for comparison at runtime. + // When given directly by the user through -d or in case of the kernel + // name and path might differ. path should be used for matching. + const char *mainfile; + dwfl_module_info (m, NULL, NULL, NULL, NULL, NULL, &mainfile, NULL); + mainfile = canonicalize_file_name(mainfile); + c->output << ".path = " << lex_cast_qstring (mainfile) << ",\n"; + c->output << ".dwarf_module_base = 0x" << hex << base << dec << ", \n"; if (unwind != NULL) @@ -4896,6 +4935,9 @@ translate_pass (systemtap_session& s) s.op->newline() << "#ifndef MINSTACKSPACE"; s.op->newline() << "#define MINSTACKSPACE 1024"; s.op->newline() << "#endif"; + s.op->newline() << "#ifndef INTERRUPTIBLE"; + s.op->newline() << "#define INTERRUPTIBLE 1"; + s.op->newline() << "#endif"; // Overload processing s.op->newline() << "#ifndef STP_OVERLOAD_INTERVAL"; @@ -4950,21 +4992,23 @@ translate_pass (systemtap_session& s) s.op->newline() << s.embeds[i]->code << "\n"; } - s.op->newline() << "static struct {"; - s.op->indent(1); - for (unsigned i=0; i<s.globals.size(); i++) - { - s.up->emit_global (s.globals[i]); - } - s.op->newline(-1) << "} global = {"; - s.op->newline(1); - for (unsigned i=0; i<s.globals.size(); i++) - { - if (pending_interrupts) return 1; - s.up->emit_global_init (s.globals[i]); - } - s.op->newline(-1) << "};"; - s.op->assert_0_indent(); + if (s.globals.size()>0) { + s.op->newline() << "static struct {"; + s.op->indent(1); + for (unsigned i=0; i<s.globals.size(); i++) + { + s.up->emit_global (s.globals[i]); + } + s.op->newline(-1) << "} global = {"; + s.op->newline(1); + for (unsigned i=0; i<s.globals.size(); i++) + { + if (pending_interrupts) return 1; + s.up->emit_global_init (s.globals[i]); + } + s.op->newline(-1) << "};"; + s.op->assert_0_indent(); + } for (map<string,functiondecl*>::iterator it = s.functions.begin(); it != s.functions.end(); it++) { @@ -5009,11 +5053,11 @@ translate_pass (systemtap_session& s) s.op->newline(); // XXX impedance mismatch - s.op->newline() << "static int probe_start () {"; + s.op->newline() << "static int probe_start (void) {"; s.op->newline(1) << "return systemtap_module_init () ? -1 : 0;"; s.op->newline(-1) << "}"; s.op->newline(); - s.op->newline() << "static void probe_exit () {"; + s.op->newline() << "static void probe_exit (void) {"; s.op->newline(1) << "systemtap_module_exit ();"; s.op->newline(-1) << "}"; s.op->assert_0_indent(); |