diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-02-20 14:56:38 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-02-20 14:56:38 +0100 |
commit | 02615365a92ca2570c1f96abc8a97674aa2ccae1 (patch) | |
tree | ebedfd91a0f6d299b39e84295e091e12c0767dc8 | |
parent | c3bad3042df505a3470f1e20b09822a9df1d4761 (diff) | |
parent | adc67597f327cd43d58b1d0cb740dab14a75a058 (diff) | |
download | systemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.tar.gz systemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.tar.xz systemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.zip |
Merge branch 'master' into pr6866
Conflicts:
ChangeLog: Removed
runtime/ChangeLog: Removed
runtime/sym.c: Merged
runtime/task_finder.c: Merged
tapset/ChangeLog: Removed
testsuite/ChangeLog: Removed
221 files changed, 9178 insertions, 24130 deletions
@@ -12,12 +12,15 @@ config.status *.[158] .deps loc2c-test +run-stap stamp-h1 stap staprun testresults stapio stap_merge +stap-client-connect +stap-server-connect CVS .checkstyle .cproject @@ -28,3 +31,7 @@ SNAPSHOT *.o git_version.h Makefile +build-elfutils +include-elfutils +lib-elfutils +stamp-elfutils diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000..2bf15895 --- /dev/null +++ b/.mailmap @@ -0,0 +1,58 @@ +# Early history did not include userid->full-name mappings, so we do +# that explicitly here. + +Ananth N Mavinakayanahalli <ananth> +Anil Keshavamurthy <askeshav> +bibo mao <maobibo> +Brad Chen <bradchen> +Charles Spirakis <cspiraki> +Dave Brolley <brolley> +Dave Nomura <dcnomura> +David Smith <dsmith> +David Wilder <dwilder> +Denys Vlasenko <dvlasenk> +Don Domingo <ddomingo> +Elliott Baron <ebaron> +Eugene Teo <eteo> +Frank Ch. Eigler <fche> +Graydon Hoare <graydon> +Hien Nguyen <hien> +Jim Keniston <kenistoj> +Josh Stone <jistone> +Kent Sebastian <ksebasti> +Kevin Stafford <kevinrs> +K.Prasad <prasadkr> +Li Guanglei <guanglei> +Mark McLoughlin <markmc> +Martin Hunt <hunt> +Masami Hiramatsu <hiramatu> +Maynard Johnson <maynardj> +Michael Behm <mbehm> +Mike Mason <mmason> +Prasanna S Panchamukhi <prasannasp> +Prerna Saxena <prerna> +Rajan Arora <rarora> +Roland McGrath <roland> +Rusty Lynch <rustyl> +Shaohua Li <shli> +Srikar Dronamraju <srikar> +Srinivasa DS <srinivasa> +Thang Nguyen <tpnguyen> +Tom Zanussi <trz> +Wenji Huang <wenji> +William Cohen <wcohen> +Zhaolei <ostrichfly> +Zhaolei <zhaolei> + +# Normalize a few git commit names too + +Anithra Janakiraman <anithra@linux.vnet.ibm.com> +Dave Nomura <dcn@vervainp2.rchland.ibm.com> +Don Domingo <ddomingo@redhat.com> +K.Prasad <prasad@linux.vnet.ibm.com> +K.Prasad <root@srdronam.in.ibm.com> +Kent Sebastian <root@toddy.(none)> +Prerna Saxena <prerna@linux.vnet.ibm.com> +Srinivasa DS <srinivasa@in.ibm.com> +Wenji Huang <wjhuang@dhcp-beijing-cdc-10-182-120-233.cn.oracle.com> +William Cohen <wcohen@peloton.usersys.redhat.com> @@ -1,12 +1,44 @@ -Frank Ch. Eigler <fche@redhat.com> -Martin Hunt <hunt@redhat.com> -Li Guanglei <guanglei@cn.ibm.com> -Joshua Stone <joshua.i.stone@intel.com> -David Smith <dsmith@redhat.com> -Graydon Hoare <formerly graydon@redhat.com> -Jim Keniston <jkenisto@us.ibm.com> -Roland McGrath <roland@redhat.com> -Will Cohen <wcohen@redhat.com> -Thang Nguyen <thang.p.nguyen@intel.com> -Tom Zanussi <zanussi@us.ibm.com> -... and others! +Ananth N Mavinakayanahalli +Anil Keshavamurthy +Anithra Janakiraman +Charles Spirakis +Dave Brolley +Dave Nomura +David Smith +David Wilder +Don Domingo +Elliott Baron +Eugene Teo +Eugeniy Meshcheryakov +Frank Ch. Eigler +Graydon Hoare +Hien Nguyen +James Bottomley +Jim Keniston +Josh Stone +K.Prasad +Kent Sebastian +Kevin Stafford +Li Guanglei +Mark McLoughlin +Mark Wielaard +Martin Hunt +Masami Hiramatsu +Michael Meeks +Mike Mason +Nobuhiro Tachino +Phil Muldoon +Prerna Saxena +Rajan Arora +Roland McGrath +Shaohua Li +Srikar Dronamraju +Srinivasa DS +Stan Cox +Thang Nguyen +Theodore Ts'o +Tim Moore +Tom Zanussi +Wenji Huang +William Cohen +Zhaolei diff --git a/AUTHORS.sh b/AUTHORS.sh new file mode 100755 index 00000000..08b7f222 --- /dev/null +++ b/AUTHORS.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +# Create the AUTHORS file, by searching the git history. + +# Run as "AUTHORS.sh" to get complete history +# Run with "AUTHORS.sh commitish..commitish" for history between tags + +# shortlog will canonicalize the names using the file .mailmap +git shortlog -s ${1-} | +cut -b8- # strip the commit counts diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index b8ed45fe..00000000 --- a/ChangeLog +++ /dev/null @@ -1,9070 +0,0 @@ -2008-12-17 Mark Wielaard <mjw@redhat.com> - - * translate.cxx (dump_unwindsyms): Adjust against correct p_vaddr. - -2008-12-16 Mark Wielaard <mjw@redhat.com> - - * translate.cxx (dump_unwindsyms): Simplify - dwfl_module_relocate_address workaround. - -2008-12-15 Mark Wielaard <mjw@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): - Always enable emit_vm_callback_probe_decl, don't test for - STP_NEED_TASK_FINDER_VMA. Don't include task_finder.c. - -2008-12-15 Mark Wielaard <mjw@redhat.com> - - * translate.cxx (dump_unwindsyms): Work around buggy - dwfl_module_relocate_address. - -2008-12-10 Mark Wielaard <mjw@redhat.com> - - * tapsets.cxx - (utrace_derived_probe_group::emit_vm_callback_probe_decl): - Test for STP_NEED_TASK_FINDER_VMA to enable - emit_vm_callback_probe_decl. - -2009-01-23 Mark Wielaard <mjw@redhat.com> - - * configure.ac: Use make -k install-data for elfutils. - * configure: Regenerated. - -2009-01-22 David Smith <dsmith@redhat.com> - - * systemtap.spec: Added 'nss-devel' buildreq so that the 'client' - subpackage could be built correctly. Added file-based buildreq - for xmlto's pdf support, which works on f8, f9, f9, and rhel5. - - * configure.ac: Fixed typo. - * configure: Regenerated. - -2009-01-22 Stan Cox <scox@redhat.com> - - * dtrace: Rewritten to handle dtrace -h -G - * runtime/sdt.h: New .probes layout. Make labels unique, args unused. - * tapsets.cxx (dwarf_builder::build): New .probes layout. - Don't reset location->components[0]. - -2009-01-21 Mark Wielaard <mjw@redhat.com> - - * configure.ac: Create PIECFLAGS and PIECXXFLAGS, like PIELDFLAGS. - Don't duplicate -pie in PIELDFLAGS. - * configure: Regenerated. - * Makefile.am: Add @PIECFLAGS@ and @PIECXXFLAGS@ to executable - flags. - * Makefile.in: Regenerated. - -2009-01-21 Mark Wielaard <mjw@redhat.com> - - * Makefile.am (distclean-local): Remove build-elfutils, - include-elfutils and lib-elfutils here, not in clean-local. - * Makefile.in: Regenerated. - * configure.ac: Only muck with CPPFLAGS and include-elfutils when - actually building with bundled elfutils. - * configure: Regenerated. - -2009-01-21 Mark Wielaard <mjw@redhat.com> - - * Makefile.am (clean-local): Remove build-elfutils, include-elfutils - and lib-elfutils. - * Makefile.in: Regenerated. - * aclocal.m4: Regenerated. - * configure: Regenerated. - -2009-01-20 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (dwarf..:visit_target_symbol): Print more data - for failed $$vars fields to help explain printed "var=?". - -2009-01-20 Frank Ch. Eigler <fche@elastic.org> - - * dwarf_wrappers.cxx (dwfl_assert): Tolerate rc==-1, for which - dwfl_errmsg(-1)=>NULL. - -2009-01-19 Dave Brolley <brolley@redhat.com> - - * stap-serverd (initialization): Call stap-add-server-cert only if - it has been installed. - -2009-01-13 Stan Cox <scox@redhat.com> - - * systemtap.spec (sdt-devel): New subpackage. - * Makefile.am (oldincludedir): New. - (oldinclude_HEADERS): New. - (bin_SCRIPTS): Add dtrace - * Makefile.in: Regenerated. - * runtime/sduprobes.h: Renamed to sdt.h - -2009-01-13 Dave Brolley <brolley@redhat.com> - - * stap-find-or-start-server,stap-start-server,stap-serverd,stap-server: - Ensure we call other systemtap tools from the installed location. - * stap-client: Likewise. Also, use SYSTEMTAP_STAPRUN if it is set. - -2009-01-13 Dave Brolley <brolley@redhat.com> - - * stap-add-server-cert: Failure to make the client database readable - is now only a warning. Directory argument now refers to the location - of the 'client' directory. - * stap-gen-server-cert: Ensure that the certificate is readable by - all. Warn if unsuccessful. Don't add the certificate to the local - client-side database. - * stap-serverd: Call stap-add-server-cert after stap-gen-server-cert. - -2009-01-11 Wenji Huang <wenji.huang@oracle.com> - - * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Fix too - large number on 32-bits machines. - (uprobe_derived_probe_group::emit_module_decls): Ditto. - -2009-01-11 Mark Wielaard <mjw@redhat.com> - - * configure.ac: Add prefix as STAP_PREFIX for config.h. - * config.in: Regenerated. - * configure: Regenerated. - -2009-01-09 Elliott Baron <ebaron@redhat.com> - - * stap.1.in: Added %M info. - -2009-01-09 Dave Brolley <brolley@redhat.com> - - * Makefile.am (stamp-ssl): Removed. - (ssl/server/stap-server.cert): Removed. - (install-data-local): Don't install $(builddir)/ssl. - (stap-add-server-cert): Create database directory if it does not - exist. Ensure the database is readable by others. - * stap-client (initialization): Initialize local_ssl_dbs and - public_ssl_dbs. Don't initialize ssl_db. - (parse_options): Concatenate additional_local_ssl_dbs with - local_ssl_dbs. - (process_ssl): Build up additional_local_ssl_dbs in the order - specified on the command line. - (choose_server): Set server for non-local domains. Print - $tmpdir_client/connect to stderr if we can't connect. - (send_receive): Try connecting to the given server using all of the - databases in $local_ssl_dbs and $public_ssl_dbs. Keep log in - $tmpdir_client/connect. - (interrupt): Use SIGTERM to kill stap-client-connect. - * stap-client-connect.c (prerror.h,secerror.h): #include them. - (errWarn): Try to the the error text from NSPR. Handle specific errors - manually otherwise. - (handle_connection): Stop processing on write error of the local file. - (do_connect): Cleanup on error. Call SSL_ForceHandshake to catch - authentication errors here. - * stap-gen-server-cert: Don't create the client's database directory. - * stap-server: Redirect the output of signtool to /dev/null. - * stap-server-connect.c (handle_connect): Call SSL_ForceHandshake to catch - authentication errors here. Clean up temp files on error. - (accept_connection): Don't close the socket on error. - stap-serverd (initialization): Print a message if the given socket is busy. - Search for a local certificate database. Create and initialize one if not - found. - (listen): Don't discard stderr fomr stap-server-connect. - * stap-start-server: Check for existence of local certificate database as - evidence that the server is listening. - * Makefile.in: Regenerated. - -2009-01-08 William Cohen <wcohen@redhat.com> - - * configure.ac: Check for xmlto that generates pdf. - * configure: Regenerated. - -2009-01-07 William Cohen <wcohen@redhat.com> - - * configure.ac: Add --enable-refdocs configure option and - set check for xmlto - * Makefile.in: Regenerated. - * aclocal.m4: Likewise. - * configure: Likewise. - -2009-01-07 Mark Wielaard <mjw@redhat.com> - - * configure.ac: Warn when not building docs because tools not found. - * configure: Regenerated. - -2009-01-07 Mark Wielaard <mjw@redhat.com> - - * configure.ac: Add --enable-server configure option and - set BUILD_SERVER appropriately. - * Makefile.am (man_MANS, bin_PROGRAMS, bin_SCRIPTS): Only add - stap-server and friends when BUILD_SERVER set.A - * Makefile.in: Regenerated. - * aclocal.m4: Likewise. - * configure: Likewise. - -2009-01-06 Frank Ch. Eigler <fche@elastic.org> - - PR9699. - * buildrun.cxx (compile_pass): Add $(LINUXINCLUDES) to autoconf - trial builds. Add new autoconf test for task_struct uid->cred switch. - -2009-01-06 Dave Brolley <brolley@redhat.com> - - * systemtap.spec (stap-client): Add stap-add-server-cert, - stap-client-connect. - (stap-server): Add stap-server-connect. - -2009-01-05 Dave Brolley <brolley@redhat.com> - - PR9702 - * stap-gen-server-cert: Try mkpasswd, apg and then user_enter_password - when generating the password for the server certificate/key - database. - (user_enter_password): New function. - -2008-12-31 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (dump_unwindsyms): Adapt to elfutils build-id - bug that was fixed in 0.138. - * configure.ac: Look for elfutils/version.h. - * config.in, configure: Regenerated. - -2008-12-30 Dave Brolley <brolley@redhat.com> - - PR9692 - From Eugeniy Meshcheryakov <eugen@debian.org> - * Makefile.am (stap_client_connect_CFLAGS): Use $(nss_CFLAGS) and - $(nspr_CFLAGS). - (stap_server_connect_CFLAGS): Likewise. - * configure.ac: Use PKG_CHECK_MODULES to configure nss and nspr. - * Makefile.in: Regenerated. - * aclocal.m4: Regenerated. - * configure: Regenerated. - -2008-12-30 Dave Brolley <brolley@redhat.com> - - * Makefile.am (install-data-local): Test for existence of $(builddir)/ssl - before installing it. - * Makefile.in: Regenerated. - -2008-12-29 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (install-data, uninstall-data): Use - $(DESTDIR)$(sysconfdir) instead of hard-coded /etc paths. - -2008-12-26 Dave Brolley <brolley@redhat.com> - - * Makefile.am (stamp-ssl): Disable automatic building of this target. - * Makefile.in: Regenerated. - -2008-12-24 Dave Brolley <brolley@redhat.com> - - * stap-client (netcat): Removed. - (initialization): Initialize ssl_db. - (parse_options): Handle the --ssl option. - (process_ssl): New function. - (send_request): Removed. - (receive_response): Removed. - (unpack_response): Use signtool to verify the contents of the - server's response against a local copy of the server's - certificate. - (find_and_connect_to_server): Make sure the server is referred to - as localhost if it is running on the local host. Call send_receive - in order to contact the server and perform the transaction. - (connect_to_server): Removed. - (disconnect_from_server): Removed. - (send_receive): New function. - (process_response): Work in $tmpdir_server. - (terminate, interrupt): Kill any running stap-client-connect. - * stap-find-or-start-server: Pass arguments to stap-start-server. - * stap-start-server: Pass arguments to stap-serverd. - * stap-server (port): Removed. - (netcat): Removed. - (receive_request): Removed. - (unpack_request): Use unzip. - (package_response): Use signtool to sign the response into a .jar - archive. - (send_response): Removed. - * stap-serverd (netcat): Removed. - (port1): Removed. - (initialize): Don't call recursively. Use a loop to select a port. - (listen): Call stap-server-connect. - (process_request): Removed. - (terminate): Kill any running stap-server-connect job. - * systemtap.spec: client and server sub packages require nss and nss-tools, - and no longer require nc or net-tools. - * Makefile.am (bin_PROGRAMS): Add stap-client-connect and - stap-server-connect. - (bin_SCRIPTS): Add stap-gen-server-cert. - (stap_client_connect_LDFLAGS, stap_server_connect_LDFLAGS): New. - (stamp-ssl): New target. - (ssl/server/stap-server.cert): New target. - (stap_client_connect_*): New. - (stap_server_connect_*): New. - (install-data-local): Install /etc/systemtap/ssl. - (uninstall-local): Remove /etc/systemtap. - * Makefile.in: Regenerated. - * aclocal.m4: Regenerated. - -2008-12-22 Masami Hiramatsu <mhiramat@redhat.com> - - PR7090 - * buildrun.cxx (compile_pass): Use flags macro to expand KBUILD_CFLAGS - for support kernels built with O= option. - -2008-12-21 Will Cohen <wcohen@redhat.com> - - * systemtap.spec: Add generations of tapset reference manual material. - -2008-12-21 Stan Cox <scox@redhat.com> - - * tapsets.cxx (dwflpp::die_has_pc): Don't abort if dwarf_ranges fails. - (dwflpp::find_variable_and_frame_base): A pc requires dwarf_nscopes - -2008-12-19 Elliott Baron <ebaron@redhat.com> - - PR3668 - * elaborate.cxx: Handling for %M. - * runtime/vsprintf.c: Likewise. - * staptree.cxx: Likewise. - * translate.cxx: Likewise. - * staptree.h: Added %M converter, conv_memory_hex, to enum - -2008-12-16 Roland McGrath <roland@redhat.com> - - * systemtap.spec (Requires): Add kernel-devel, is correct virtual - provide in kernel-*-devel rpms. - (with_sqlite): Typo fix in default defn check. - [%{with_sqlite}] (Requires): Remove. BuildRequires causes the correct - automatic dependency. - -2008-12-16 Stan Cox <scox@redhat.com> - - * tapsets.cxx (dwarf_builder::build): Consider alignment when - fetching .probes values. Convert .mark to .statement(0x) instead - of .statement(foo.c:N) - -2008-12-11 Dave Brolley <brolley@redhat.com> - - PR7087 - * stap-client: Don't use -d on netcat. Redirect from /dev/null instead. - * stap-server: Likewise. - * stap-serverd: Likewise. - -2008-12-09 Frank Ch. Eigler <fche@elastic.org> - - PR6961 - * tapsets.cxx (common_probe_entryfn_prologue): Add new "fakeregs" - param. Set context regs_buffer with plausible dummy values if needed. - Update callers. - (mark_builder::build): Add kernel to unwindsyms_modules. - * translate.cxx (emit_common_header): Add pt_regs regs_buffer field - to context. - -2008-12-09 Dave Brolley <brolley@redhat.com> - - PR7087 - * stap-client: Use netcat or nc, whichever is available. - * stap-server: Likewise. - * stap-serverd: Likewise. - -2008-12-08 David Smith <dsmith@redhat.com> - - RHBZ 474390 - * tapsets.cxx (dwflpp::cu_function_caching_callback): Handles NULL - return from dwarf_diename(). - (dwflpp::print_locals): Ditto. - (dwflpp::find_variable_and_frame_base): Ditto. - (dwflpp::literal_stmt_for_return): Ditto. - (dwarf_builder::build): Ditto. - -2008-12-08 Frank Ch. Eigler <fche@elastic.org> - - PR7062 - * buildrun.cxx (uprobes_home): Make local, based on - session.runtime_path. - -2008-12-05 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx, translate.cxx: Set default elfutils debuginfo_path - to start with "+", to enable debuginfo<->stripped checksum checking. - * stap.1.in: Note this. - -2008-12-05 Kent Sebastian <ksebasti@redhat.com> - - PR7051 - * doc/langref.tex, elaborate.cxx, runtime/vsprintf.c, - stap.1.in, staptree.cxx, staptree.h, translate.cxx: - Remove printf %n directive and references to it in documentation. - -2008-12-03 Roland McGrath <roland@redhat.com> - - PR6925 - * run-stap.in: New file. - * configure.ac: Generate run-stap from it. - * configure: Regenerated. - - PR7063 - * buildrun.cxx (run_pass): Obey SYSTEMTAP_STAPRUN environment variable. - -2008-12-03 Frank Ch. Eigler <fche@elastic.org> - - PR6925 - * configure.ac: Suggest --prefix if configured without. - * configure: Regenerated. - -2008-12-03 Frank Ch. Eigler <fche@elastic.org> - - PR 5982: rename -B to -r - * main.cxx (main): Treat -r REV and -r /PATH as complimentary. - Imply -p4 if target mismatches host versions. - (usage): Document -r more. - * hash.cxx (find_hash): Add in the kernel_build_tree. - * buildrun.cxx (compile_pass, kernel_built_uprobes): Simplify - logic. - * tapsets.cxx (setup_kernel, setup_user): Ditto. - * translate.cxx (emit_symbol_data): Ditto. - * stap.1.in: Document -r /PATH. - -2008-12-01 Rajan Arora <rarora@redhat.com> - - PR 5892: Add -B and parameterize all occurences of /lib/modules/... - * buildrun.cxx (compile_pass, kernel_built_uprobes): Audit - mentions of /lib/modules/... with path to kernel_build_tree - provided by -B. - * tapsets.cxx (setup_kernel, setup_user, mark_builder::build): - Likewise. - * translate.cxx (emit_symbol_data): Likewise. - * session.h (struct systemtap_session): New member kernel_build_tree. - * main.cxx (main): Add case for 'B' and attempt to fetch Version for - the kernel build tree using include/config/kernel.release in build - path, remove -r REV implies -p4 logic altogether. - - -2008-11-29 Frank Ch. Eigler <fche@elastic.org> - - Warnings cleanup. - * buildrun.cxx (verify_uprobes_uptodate, make_uprobes): Simplify - messages. - * cache.cxx (add_to_cache, clean_cache): Reset s.use_cache upon - failure. - * hash.cxx (find_hash): Ditto. - * main.cxx (main): Simplify/conditionalize warning messages. Save - module to $cwd if last_pass==4 but cache encountered errors. - -2008-11-28 Frank Ch. Eigler <fche@elastic.org> - - PR 6965. - * translate.cxx (dump_unwindsyms): Tweak symbols for - STP_NEED_{SYMBOL,UNWIND}_DATA - -2008-11-28 Elliott Baron <ebaron@redhat.com> - - PR 6965. - * translate.cxx (dump_unwindsyms): Output #ifdef for - symbol table. - -2008-11-28 Frank Ch. Eigler <fche@elastic.org> - - PR 5376. - * parse.cxx (parse::parse_probe): Prevent alias names from - being marked "?" or "!". - -2008-11-28 Frank Ch. Eigler <fche@elastic.org> - - PR 6477. - * elaborate.cxx (print_error_source, print_warning): Tolerate - NULL token. - -2008-11-27 Frank Ch. Eigler <fche@elastic.org> - - PR 7036 - From Wenji Huang <wenji.huang@oracle.com>: - * elaborate.cxx (print_error): Don't suppress if listings_mode. - * main.cxx (main): Suppress "pass N failed" if listings_mode. - -2008-11-26 Stan Cox <scox@redhat.com> - - * tapsets.cxx (dwarf_builder::build): Support debuginfo static uprobes. - -2008-11-26 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_module_exit): Add another synchronize_sched. - -2008-11-26 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): Advise users to try '--vp ...' after a pass error. - -2008-11-26 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_module_exit): Call synchronize_sched during - module shutdown if it's available. - * buildrun.cxx (compile_pass): Test for it. - -2008-11-25 Frank Ch. Eigler <fche@elastic.org> - - PR 7046. - * tapsets.cxx (uprobe*emit_module_decls): Rewrite the generated - stap_uprobe_change function, to hold mutex for a shorter period - and to produce more meaningful KERN_INFO traces if -DDEBUG_UPROBES. - (uprobe*emit_module_exit): Switch to KERN_INFO also. - -2008-11-25 Will Cohen <wcohen@redhat.com> - - * scripts/kernel-doc: Clean up SystemTap function formatting. - -2008-11-25 Will Cohen <wcohen@redhat.com> - - * scripts/kernel-doc: Make executable. - -2008-11-25 Will Cohen <wcohen@redhat.com> - - * scripts/kernel-doc: New. - * configure.ac: Add doc/SystemTap_Tapset_Reference/Makefile. - * configure, doc/SystemTap_Tapset_Reference/Makefile.in: Regenerate. - -2008-11-25 Mark Wielaard <mjw@redhat.com> - - * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): - struct stap_dwarf_probe field is called pp, not pp_name. - -2008-11-24 Kent Sebastian <ksebasti@redhat.com> - - PR 4978. - * stap.1.in (PRINTING): printf directives, more examples. - -2008-11-22 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (MAXUPROBES): Tweak its definition. Use it - consistently. - * stap.1.in (MAXUPROBES): Document it. - -2008-11-22 Frank Ch. Eigler <fche@elastic.org> - - PR 5689. - * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit,decls): - Print kprobe missed stats if STP_TIMING. - (uprobe_derived_probe_group::emit_module_exit,declx): Track - uprobe missed stats if STP_TIMING> - * translate.cxx (emit_module_exit): Print uprobe missed stats. - -2008-11-21 Frank Ch. Eigler <fche@elastic.org> - - PR 5689. - * tapsets.cxx (common_probe_entryfn_{pro,epi}logue): - Track separate skip counts for low-stack and reentrancy conditions. - * translate.cxx (emit_common_header): Declare counters. - (emit_module_exit): Print them. - (emit_unlocks): Don't bother redundantly testing skipped_count. - -2008-11-21 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_module_exit): Perform shutdown probe - synchronization after all unregistrations and end/error probe - runs. - -2008-11-20 Frank Ch. Eigler <fche@elastic.org> - - PR 5689 - * translate.cxx (emit_global, emit_global_init, emit_module_exit, - emit_locks): Track & print global.s_VAR_lock_skip_count. - -2008-11-20 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): Correct thinko in --vp option with <5 arg chars. - -2008-11-18 Jim Keniston <jkenisto@us.ibm.com> - - PR 6879 - * runtime/uprobes2/uprobes_x86.c: Allow probing of instructions - with fs: and gs: prefixes. Apply fix from runtime/uprobes. - -2008-11-18 Frank Ch. Eigler <fche@elastic.org> - - PR6925. - * main.cxx (usage,main): Process new --vp option. - * session.h (perpass_verbose): New field. - -2008-11-11 Stan Cox <scox@redhat.com> - - * Makefile.am (pkglib_LIBRARIES): New. - * Makefile.in: Regenerated - * stapprobes.5.in (process.mark): New. - * tapsets.cxx (register_patterns): Add process.mark. - (dwarf_builder::build): Likewise. - -2008-11-14 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (common_probe_entryfn_{pro,epi}logue): - Set "interruptible" to default true, thus disabling local_irq_* - calls for all current probe point types. - -2008-11-13 Wenji Huang <wenji.huang@oracle.com> - - PR 7000 - * translate.cxx (c_unparser::visit_print_format): Add checking bound - for actual parameters. - -2008-11-13 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec, configure.ac: Bump version to 0.8. - * configure.in: Regenerated. - -2008-11-11 Przemysław Pawełczyk <przemyslaw@pawelczyk.it> - Mark Wielaard <mjw@redhat.com> - - * tapsets.cxx (find_variable_and_frame_base): Add scope name to - semantic error messages if available. - -2008-11-06 Wenji Huang <wenji.huang@oracle.com> - - PR 6998 - * tapsets.cxx (profile_builder): Add default kernel symbols to profile. - -2008-11-06 Stan Cox <scox@redhat.com> - - * tapsets.cxx (dwflpp::module_address_to_global): - ET_EXEC needs no further relocation. - -2008-11-04 Frank Ch. Eigler <fche@elastic.org> - - From Masami Hiramatsu <mhiramat@redhat.com>, PR 6028. - * tapsets.cxx (dwarf_derived_probe): New field access_vars, for - tracking result from .. - (dwarf_var_expanding_copy_visitor): Collect a flag about whether - any $expressions appear within. - (emit_probe_local_init): ... and run ia64 bspcache() on if true. - -2008-11-03 Jim Keniston <jkenisto@us.ibm.com> - - Add a version of uprobes that works with the 2.6.27 version of utrace. - * runtime/uprobes2/uprobes.[ch]: uprobes2 - * runtime/uprobes2/uprobes_x86.[ch]: Simplified to use post-2.6.24 - unified pt_regs names ("ax" rather than "eax" or "rax"). - * runtime/uprobes2/uprobes_arch.[ch]: Pull in the arch-specific - file from the appropriate directory. - * runtime/uprobes/uprobes.[ch]: #ifdef added to pull in file from - ../uprobes2 if we're running the new utrace. - * runtime/uprobes/Makefile: Updated - * Makefile.am: Install runtime/uprobes2/*. - * Makefile.in: Regenerated - * buildrun.cxx: Always copy uprobes's Module.symvers into the - directory where stap builds the script .ko. - -2008-11-03 Mark Wielaard <mjw@redhat.com> - - * tapsets.cxx (literal_stmt_for_return): Add function name and file - to semantic error messages. - -2008-10-29 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (dump_unwindsyms): Work on CONFIG_RELOCATABLE=n - kernels, or for whatever other scenarios dwfl_module_relocation_info - might return NULL. - -2008-10-27 Josh Stone <joshua.i.stone@intel.com> - - * translate.cxx (c_unparser::visit_print_format): Fix the argument passed - for printf %c formats. - -2008-10-27 Rajan Arora <rarora@redhat.com> - - * elaborate.cxx (add_global_var_display): Added check for globals - from tapsets. - -2008-10-24 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls): Support - the new abstractions around the hrtimer expires field. The field is - renamed starting in 2.6.28-rc1, but accessor functions are provided for - general access. - * buildrun.cxx (compile_pass): Added autoconf-hrtimer-getset-expires.c - -2008-10-24 Jim Keniston <jkenisto@us.ibm.com> - - PR6946 - * tapsets.cxx: Allow probing of 32-bit ppc apps with - a ppc64 kernel. - -2008-10-20 Elliott Baron <ebaron@redhat.com> - - PR6851 - * elaborate.cxx (typeresolution_info::visit_print_format): add case - for conv_char. - * staptree.cxx (print_format::components_to_string): add case for - conv_char. - (print_format::string_to_components): add parsing for "c" conversion. - * staptree.h (enum conversion_type): add conv_char member. - -2008-10-17 Frank Ch. Eigler <fche@elastic.org> - - * stap-report: Add kernel config extracts. Generate to stdout. - * Makefile.am (bin_SCRIPTS): Install it. - * systemtap.spec: Package it. - * Makefile.in: Regenerated. - -2008-10-17 Jim Keniston <jkenisto@us.ibm.com> - - PR6923 - * runtime/autoconf-oneachcpu-retry.c: Compiles successfully on - old kernels. - -2008-10-14 Kent Sebastian <ksebasti@redhat.com> - - * cache.cxx (cache_clean): Minor changes, mainly stylistic. - * session.h: remove cache_max member var (used only in cache.cxx now) - -2008-10-10 Frank Ch. Eigler <fche@elastic.org> - - PR6749 - * tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Tolerate - failed register_*kprobe during initialization; warn instead. - -2008-10-10 Kent Sebastian <ksebasti@redhat.com> - - * cache.cxx (cache_clean): New group of functions implementing cache - size limiting. - -2008-10-09 Rajan Arora <rarora@redhat.com> - - * elaborate.cxx (systemtap_session::print_error_source): New. - (systemtap_session::print_error): Call it. - (systemtap_session::print_warning): Likewise. - * parse.cxx (parser::print_error): Likewise. - * session.h (struct systemtap_session::print_error_source): - Declare it. - * parse.cxx (lexer::get_input_contents): New. - (parser::parse): Call it. - (lexer::set_current_file): New. - (parser::parse): Call it. - * parse.h (class lexer::get_input_contents): Declare it. - (class lexer::set_current_file): Declare it. - (class lexer): New member current_file. - (class lexer): Update input_contents from vector<char> - to std::string. - (struct source_loc): New member stap_file. - * staptree.h (struct stapfile): New member file_contents. - -2008-10-09 Stan Cox <scox@redhat.com> - - * tapsets.cxx (query_cu): Fix typo. - -2008-10-06 Wenji Huang <wenji.huang@oracle.com> - - PR 4886 - * translate.cxx (dump_unwindsyms): Extract build-id from debuginfo. - (emit_module_init): Check build-id if able. - -2008-10-03 Jim Keniston <jkenisto@us.ibm.com> - - PR 6850 - * runtime/uprobes/uprobes.c: When a probed process forks with - uretprobe_instances outstanding, create a uprobe_process and - uprobe_task for the child, and clone the uretprobe_instances. - This requires us to allow the SSOL vma to be copied on fork. - * testsuite/systemtap.base/bz6850.{exp,c,stp}: new test case - -2008-09-30 Mark Wielaard <mjw@redhat.com> - - * tapsets.cxx (literal_stmt_for_local): Check if alternatives can be - provided after calling dwarf_formref_die. - (literal_stmt_for_return): Likewise. - -2008-09-26 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (add_global_var_display): Implicitly sort arrays. - -2008-09-26 Frank Ch. Eigler <fche@elastic.org> - - PR 6916 - * elaborate.cxx (systemtap_session::print_error): Fix - duplicate elimination in face of token compression. - * tapsets.cxx (literal_stmt_for_local, literal_stmt_for_return): - Change error message to fit old pattern. - -2008-09-26 Frank Ch. Eigler <fche@elastic.org> - - BZ 6829: avoid calling unregister_uprobe() when responding - to a task-finder exec/exit callback, as uprobes likes to - clean such things up by itself. - -2008-09-12 Prerna Saxena <prerna@linux.vnet.ibm.com> - - BZ 3016 : Handling members of anonymous structs/unions - * tapsets.cxx (translate_components, print_members) : enable - translator to identify members of anonymous structs / unions. - * testsuite/semok/thirtythree.stp : New test-case. - * NEWS : Modify translator code to identify members of anonymous - structs/unions. - -2008-09-24 Mark Wielaard <mjw@redhat.com> - - * dwarf_wrappers.cxx (dwfl_assert(string,bool)): Call - dwfl_assert(string,int), not dwarf_assert(). - -2008-09-12 Dave Brolley <brolley@redhat.com> - - * stap-client (staprun_PATH): Ensure that $first_stap is not empty. - * stap-start-server: Use 'ps' to check that the server started. - -2008-09-12 Masami Hiramatsu <mhiramat@redhat.com> - - BZ 6028 - * tapsets.cxx (dwarf_derived_probe::emit_probe_local_init): Use REG_IP - instead of pp to check probe address. - -2008-09-12 Frank Ch. Eigler <fche@elastic.org> - - GCC 4.4 (var-tracking) build-compatilibity. - * parse.h: #include <stdint.h>. - * tapsets.cxx (utrace_...::visit_target_symbol_arg): Use - lex_cast<int>(foo) instead of atoi(foo.c_str()) for simpler - c++ object lifetime. - * Makefile.am (staprun_CFLAGS, stapio_CFLAGS): Add - -fno-strict-aliasing, since that code is too casual with pointers. - * Makefile.in: Regenerated. - -2008-09-12 Dave Brolley <brolley@redhat.com> - - PR6881. - From Eugeniy Meshcheryakov eugen@debian.org: - * stap-server.8.in: Correct formatting problems. - -2008-09-12 Dave Brolley <brolley@redhat.com> - - * stap-find-servers (match_server): Don't read past the start of the - next server description. Don't use '^' at the start of the regexp - on calls to 'expr'. - * systemtap.spec: client and server sub packages require avahi. - -2008-09-12 Wenji Huang <wenji.huang@oracle.com> - - * elaborate.cxx (add_global_var_display): Don't, in listing mode. - -2008-09-11 Frank Ch. Eigler <fche@elastic.org> - - PR 6871. - * tapsets.cxx (query_cu): Search for prologues for user-space probes. - (query_func_info): Use prologue_end if available; silently back down - to entrypc probing if needed. - -2008-09-10 Josh Stone <joshua.i.stone@intel.com> - - * main.cxx (printscript): Ensure no variables are printed in probe lists - unless -L was specified. - -2008-09-10 Frank Ch. Eigler <fche@elastic.org> - - * parse.cxx, parse.h: Rewrite scanner lookahead data structure - to a simple ~fixed vector. - -2008-09-10 Frank Ch. Eigler <fche@elastic.org> - - PR6876: translator speedup for many $vars - * session.h (systemtap_session.functions): vector->map. - * coveragedb.cxx, elaborate.cxx, main.cxx, tapsets.cxx, translate.cxx: - Adapt all users. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * configure.ac: Check for dwarf_getelf. elfutils 0.126+. - Use AM_PROG_MKDIR_P instead of AC_PROG_MKDIR_P. - * Makefile.in: Regenerated. - * aclocal.m4: Likewise. - * config.in: Likewise. - * configure: Likewise. - -2008-09-10 Dave Brolley <brolley@redhat.com> - - * systemtap.spec: Remove avahi-tools and nc from dependencies - for systemtap and systemtap-runtime packages. Remove stap-* - scripts from %files of systemtap and systemtap-runtime - packages. Make sure systemattap-runtime only picks up - staprun.8* man pages. Create new systemtap-client and - systemtap-server packages. - * NEWS: Add network security warning for the systemtap - client/server. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * translate.cxx (dump_unwindsyms): Rename module_base output to - dwarf_module_base. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * translate.cxx (dump_unwindsyms): Output module_base. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * translate.cxx (get_unwind_data): New function. - (dump_unwindsyms): Output unwind data. - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * stapprobes.5.in: Added a description about $return. - * NEWS: Ditto. - * tapsets.cxx (utrace_var_expanding_copy_visitor): Change - visit_target_symbol_syscall() to visit_target_symbol_context(). - (utrace_var_expanding_copy_visitor::visit_target_symbol_context): - Handle not only $syscall but also $return. - (utrace_var_expanding_copy_visitor::visit_target_symbol): Ditto. - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * stapprobes.5.in: Added a description about $argN. - * NEWS: Ditto. - * tapsets.cxx (utrace_var_expanding_copy_visitor): Added - visit_target_symbol_arg() and visit_target_symbol_syscall(). - (visit_target_symbol_arg): New function for handling $argN. - (visit_target_symbol_syscall): New function for handling $syscall. - (visit_target_symbol): Use visit_target_symbol_arg() and - visit_target_symbol_syscall(). - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * stapprobes.5.in : Added a line for $name context variable. - * translate.cxx (c_unparser::emit_common_header): Add marker_name and - marker_format fields to context. - * tapsets.cxx (common_probe_entryfn_prologue) : Ditto. - (mark_derived_probe_group::emit_module_decls) : Ditto. - (mark_var_expanding_copy_visitor) : change visit_target_symbol_format - to visit_target_symbol_context. - (mark_var_expanding_copy_visitor::visit_target_symbol_context): handle - not only $format but also $name. - (mark_var_expanding_copy_visitor::visit_target_symbol): Ditto. - -2008-09-07 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (build_blacklist): Add some x86 raw port-io spots. - -2008-09-06 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (utrace_derived_probe ctor): Handle - process.* probe point reverse engineering (pid- and path-less). - -2008-09-05 Stan Cox <scox@redhat.com> - - * elaborate.cxx (add_global_var_display): Handle scalar statistics. - -2008-09-05 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac, Makefile.am, systemtap.spec: Don't look for libcap. - * configure, Makefile.in: Regenerated. - -2008-09-05 Wenji Huang <wenji.huang@oracle.com> - - PR 6731. - * main.cxx (usage,main,printscript): Improve listing mode with "-L". - * stap.1.in, stapex.5.in: Document it. - -2008-09-04 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (usage): Remove some dwarfless items. - -2008-09-02 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (uprobe..emit_module_init): Leave dying-uprobe - loop as early as possible. - -2008-09-02 Stan Cox <scox@redhat.com> - - * elaborate.cxx (add_global_var_display): Simplify token use. - -2008-09-02 Frank Ch. Eigler <fche@elastic.org> - - PR4225. - * tapsets.cxx (generated stap_uprobe_change): Fix major thinko that - falsely triggered a slew of uprobe_unregister's for each plain - register. - (uprobe_derived_probe_group::emit_module_init): Add code to generate - printk's for uprobe activities, if -DDEBUG_UPROBES. - -2008-09-02 Frank Ch. Eigler <fche@elastic.org> - - PR4225 merge. - * tapsets.cxx: Add prototype user-space probing support. Collateral - damage breaks symbol-table-only (dwarfless) probing, PR6864. - (setup_user, setup_kernel): Split & reorganized. - (class uprobe_derived_probe): Nearly all new code. - (base_query): Add "has_module" and "has_process" flags. - (dwarf_builder): Add "user_dw" map. - (dwarf_query::add_probe_point): Use ".dynamic" pseudo-reloc-base for - ET_DYN modules; ".absolute" for ET_EXEC. - (register_patterns): Register process(...) uprobe-based probes. - (task_finder_derived_probe_group::create_session_group): Let runtime - code assert CONFIG_UTRACE. - (base_query ctor, dwarf_builder::build, itrace_builder, - utrace_derived_probe): Use find_executable() to resolve FOO path in - process("FOO"). - (utrace_derived_probe ctor): Reverse-engineer probe point. - * main.cxx (main): Don't override $PATH etc. - * util.cxx (find_executable): Reorganize, simplify, canonicalize. - * util.h, hash.cxx: Corresponding changes. - -2008-09-02 Wenji Huang <wenji.huang@oracle.com> - - * tapsets.cxx (query_func_info): Disable prologue searching in - no-dwarf testing. - -2008-09-01 Stan Cox <scox@redhat.com> - - * elaborate.cxx (add_global_var_display): Also handle statistics. - -2008-08-29 Dave Brolley <brolley@redhat.com> - - * stap-server.8.in: New man page. - * NEWS: Announce the availability of the client/server. - * Makefile.am (man_MANS): Add stap-server.8. - * configure.ac (AC_CONFIG_FILE): Add stap-server.8. - * Makefile.in: Regenerated. - * configure: Regenerated. - -2008-08-29 Stan Cox <scox@redhat.com> - - * elaborate.cxx (add_global_var_display): Repopulate symbol/type info. - -2008-08-29 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): - Pushed quiesce logic down into the task_finder layer. - (utrace_derived_probe_group::emit_module_decls): Removed quiesce - handler routines. Syscall probe handler detaches if systemtap - state isn't correct. - -2008-08-29 Wenji Huang <wenji.huang@oracle.com> - - * main.cxx (printscript): Print variable name and type for listing mode. - -2008-08-28 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (add_global_var_display): Render array indexes - in [key,key,key] vs. [key][key][key] form. - -2008-08-27 Stan Cox <scox@redhat.com> - - * elaborate.cxx (add_global_var_display): New. - (semantic_pass): Call it. - (dead_assignment_remover::visit_assignment): Don't remove written - but unread global variables. - * NEWS, stap.1.in: Document - -2008-08-26 David Smith <dsmith@redhat.com> - - * buildrun.cxx (compile_pass): Added autoconf-dpath-path.c. - - * Makefile.am: Simplified "rpm" target a bit. - * Makefile.in: Regenerated. - - * Makefile.am: Moved tar archive creation step from "rpm" target - into "dist-gzip" target. - * Makefile.in: Regenerated. - -2008-08-25 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (AUTOMAKE_OPTIONS): Add "no-dist". Remove all - "make dist"-oriented targets and macros. - (rpm): Rewrite. Allow parametrization with RPMBUILDFLAGS=. - * Makefile.in: Regenerated. - * systemtap.spec: Make configuration macros at top overridable. - -2008-08-25 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_module_init): Make - sure we count the number of utrace probes correctly. - (utrace_derived_probe_group::emit_module_exit): Ditto. - -2008-08-25 Dave Brolley <brolley@redhat.com> - - * Makefile.am (installcheck): Remove $(EXTRA_SYSTEMTAP_PATH) from - invocation of $(MAKE). - * Makefile.in: Regenerated. - * aclocal.m4: Regenerated. - * stap-client (parse_options): Don't quote an argument if it is already - quoted. - (send_request): Timeout after 10 seconds. - (receive_response): Timeout after 5 minutes. - (choose_server): Add missing $ to variable reference. - (connect_to_server): Timeout after 10 seconds. - * stap-server (receive_request): Don't check for a "request:" - message. Timeout after 10 seconds. - (send_response): Timeout after 10 seconds. - * stap-serverd (initialization): Remove tmpdir_prefix_serverd and - port2. No need for a temp directory. - (listen): Fifo no longer necessary. Call nc and pipe the output to - process_request in the background. - (process_request): New function. - (fatal): Kill stap-server followed by nc. No tmpdir to remove. - -2008-08-24 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (query_statement): Leave empty string for unknown file - name. - (dwarf_derived_probe ctor): Don't synthesize "@filename:lineno" - probe point pieces for unknown files/lines. - -2008-08-21 David Smith <dsmith@redhat.com> - - * tapsets.cxx (itrace_derived_probe_group::emit_module_decls): - Updated task finder callback function signature. - (utrace_derived_probe_group::emit_module_decls): Ditto. - -2008-08-20 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): - Supports original and new utrace interfaces. - (utrace_derived_probe_group::emit_module_decls): Ditto. - -2008-08-20 Dave Brolley <brolley@redhat.com> - - * stap-client: Ignore SIGHUP and SIGPIPE. - (initialization): Set b_specified.: - (parse_options): Handle the -b option. Quote $stap_arg. Use process_m. - (process_m): New function. - (process_o): Set stdout_redirection to simply the filename. - (process_response): Obtain the exit code from stap on the server side. - Copy the module to the current directory if -m was specified. - Call stream_output. - (stream_output): It's back. - (maybe_call_staprun): Print status messages for -v. Leave v_level - unchanged. Pass -o option to staprun. Wait until the staprun job - disappears. - (terminate): Redirect message to stderr. - (interrupt): Only kill staprun if it's still running. Call cleanup - if exiting. - (ignore_signal): New function. - * stap-server (receive_request): Quote the job specifier. - (send_response): Likewise. - (read_data_file): Use read to check the first line. Use cat the read - the entire file. - * stap-serverd (listen): Quote job specifier. - (terminate): Likewise. - -2008-08-19 David Smith <dsmith@redhat.com> - - PR 6841 - * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): - Workaround utrace bug by quiescing threads before attaching a - utrace syscall engine to them. - (utrace_derived_probe_group::emit_module_decls): Emit quiesce - handler. - -2008-08-18 David Smith <dsmith@redhat.com> - - * tapsets.cxx (register_standard_tapsets): Add missing - 'process.syscall' and 'process.syscall.return' bindings. - -2008-08-16 Mark Wielaard <mjw@redhat.com> - - * configure.ac (build_elfutils): Mention possible distro - specific elfutils development sub-packages needed when not found. - -2008-08-15 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_builder::build): Change system-wide probes - from 'process("*").begin' to 'process.begin'. - (register_standard_tapsets): Add new 'process' binding. - * stapprobes.5.in: Change system-wide probes - from 'process("*").begin' to 'process.begin'. - -2008-08-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6836 - * tapsets.cxx (dwarf_var...visit_target_symbol): Emit - "return=0xf00" instead of "$return=0xf00" for $$return, - for consistency with other variables. - * NEWS, stapprobes.5.in: Update. - -2008-08-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6836. - * tapsets.cxx (dwarf_var...visit_target_symbol): Show - "var=?" for unlocatable variables. Support $$return. - Make sure $$parms/etc. work in .return probes too. - * testsuite/semok/thirtytwo.stp: New test. - * NEWS, stapprobes.5.in: Document them. - -2008-08-15 Michael Meeks <michael.meeks@novell.com> - - * configure.ac: suggest (SUSE) package name for dwfl. - - * buildrun.cxx (compile_pass): if extremely verbose, pass through - output from stap checks - helps to debug generic test compile - problems. - -2008-08-14 Dave Brolley <brolley@redhat.com> - - PR 6834 - * stap-client (initialization): initialize staprun_running. - (send_request): No server response message required. - (receive_response): No server response message required. Simply - receive the tar file. The tar file should contain a file called 'rc'. - (connect_to_server): Use 'nc'. - (disconnect_from_server): No action required. - (process_response): Renamed from 'stream_output'. Obtain the exit - code from the 'rc' file. - (maybe_call_staprun): set 'staprun_running' while staprun is running. - (check_server_error): Removed. - (server_fatal): Removed. - (cleanup): Redirect stderr of 'kill' to /dev/null. - (interrupt): Pass SIGINT on to staprun, if it is running. Otherwise, - exit. - * stap-server (initialization): Create the server temp directory here... - (unpack_request): ... not here. - (receive_request): Don't send a ready message. - (create_response): Write the exit code of 'stap' to the 'rc' file. - (send_response): Don't send a status message. - (fatal,error): Redirect to $tmpdir_server/stderr. - -2008-08-13 Dave Brolley <brolley@redhat.com> - - * stap-client: Trap SIGTERM and SIGINT. - (unpack_response): chown of the systemtap temp directory before - we move it and only if we didn't create it. - (maybe_call_staprun): Check $e_script when determining whether a - script was specified. Provide the -c option to staprun. Run staprun - in the background and wait for it. - (terminate,interupt): New functions. - -2008-08-13 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (stamp-elfutils): Override build-elfutils' - bin_PROGRAMS to not bother build binaries we're not using. - * Makefile.in: Regenerated. - -2008-08-12 Frank Ch. Eigler <fche@elastic.org> - - * buildrun.cxx (compile_pass): Add ugly kbuild hack for hand-built - x86 kernels that are made with O= (separate object/module-building - directory). - -2008-08-12 David Smith <dsmith@redhat.com> - - PR 6445 (partial) - * tapsets.cxx (utrace_builder::build): Validates pid and allows - probing of "*" to mean all threads. - * stapprobes.5.in: Added note about a process path of "*" means to - probe all threads. - -2008-08-11 Wenji Huang <wenji.huang@oracle.com> - - * tapsets.cxx : Fixed compilation warning on gcc 3.x. - -2008-08-11 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (translate_final_fetch_or_store): Reject some - unhandleable types such as floats. - (dwarf_var...visit_target_symbol): Tweak logic of $$var expansion - to quietly skip over any $context variables that cause exceptions. - -2008-08-11 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (translate_final_fetch_or_store): Reject some - unhandleable types such as floats. - (dwarf_var...visit_target_symbol): Tweak logic of $$var expansion - to quietly skip over any $context variables that cause exceptions. - -2008-08-11 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (dwarf_var_expanding...visit_target_symbol): - Don't add a \n at the end of $$vars/$$parms/$$locals. - -2008-08-11 Frank Ch. Eigler <fche@elastic.org> - - PR5049 - * tapsets.cxx (cu_name_matches, collect_srcfiles_matching): - Implicitly but optionally prefix probe source filenames with "*/". - * stapprobes.5.in: Document this. - -2008-08-11 Dave Brolley <brolley@redhat.com> - - * stap-client (disconnect_from_server): Call after receive_response. - * stap-server (stap_rc): Renamed from 'rc'. Don't use it as an exit - code. - * stap-serverd (listen): Set pipefail so that we get the rc of nc - if it fails. Make multiple attempts to establish a server. - (fatal): Call 'terminate'. - -2008-08-11 Frank Ch. Eigler <fche@elastic.org> - - PR5049 - * tapsets.cxx (cu_name_matches, collect_srcfiles_matching): - Implicitly prefix probe source filenames with "*". - -2008-08-11 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_builder::build): Fixed indentation. - -2008-08-11 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (install-data-local): Use INSTALL_PROGRAM for executable - stp scripts. - * Makefile.in: Regenerated. - -2008-08-09 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (example index): Only warn and instruct on index - regeneration. Do not actually perform it as the source tree - should be considered (and can really be) read-only. - * Makefile.in: Regenerated. - -2008-08-08 Dave Brolley <brolley@redhat.com> - - * stap-client: Use quotes when echoing. Exit with $rc. - (initialization): Initialize 'rc'. - (parse_options): Manage the command line in three pieces: - pre-script name, script name, post-script name. - (process_*): Likewise. - (send_request): Redirect stdout of 'nc' to /dev/null. - (receive_response): Handle "failed:" response. Redirect stdin of 'nc' - from /dev/zero. - (maybe_call_staprun): Check $rc. Check the requested phase limit - before looking for the module. - * stap-server: Use quotes when echoing. Exit with $rc. - (initialization): Initialize 'rc'. - (receive_request): Start 'nc' in the background before sending the - "ready:" message. Redirect stdin of 'nc' from /dev/zero. - (read_data_file): Allow for multiple lines of data. - (call_stap): Quoet $cmdline. Set 'rc'. - (send_response): Send "failed:" if stap is unsuccessful. Start 'nc' - in the background before sending the response. - (cleanup): Kill any running 'nc' job. - (terminate): Exit with $rc. - * stap-serverd: Start the server before advertising our presence. - * stap-find-or-start-server: Echo 0 if a server is already running. - Echo -1 if no server is running and one can't be started. - * stap-start-server: Wait until the server starts before exiting. Exit - with 1 if the server does not start. - * systemtap.spec: Move client side script to the runtime sub package. - The main package and the runtime sub package both depend on avahi-tools - and nc. - * Makefile.am: Revert previous changes. Now done in - testsuite/lib/systemtap.exp. - * Makefile.in: Regenerated. - -2008-08-08 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): - Calls stap_utrace_detach() to perform detach. - -2008-08-08 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (EXAMPLE_BUILD_DIR): Removed. Examples indexes are - always in srcdir. - (dist-hook): Always install examples from srcdir. - * Makefile.in: Regenerated. - -2008-08-08 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (rpm): Refer to srcdir spec file so make rpm works in - builddir. - * Makefile.in: Regenerated. - -2008-08-08 Mark Wielaard <mwielaard@redhat.com> - - * systemtap.spec: Disable chmodding of samples/kmalloc-top. - It is currently not installed. - -2008-08-08 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (all-local): Depend on example_index, which now - doesn't generate anything in $srcdir anymore, only $builddir. - (EXAMPLE_SOURCE_DIR): New var. - (EXAMPLE_BUILD_DIR): New var. - (EXAMPLE_META_FILES): New var. - (EXAMPLE_INDEX_GEN): New var. - (example_index): New target. - ($EXAMPLE_BUILD_DIR/index.html): Likewise. - (install-data-local): Install examples from $buildir. - * Makefile.in: Regenerated. - * aclocal.m4: Likewise. - -2008-08-07 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (all-local): Don't run indexing code, since $srcdir - may be read-only. - (install-data): Simplify sample script installation; limit sources - to systemtap.examples directory only. - * Makefile.in: Regenerated. - -2008-08-07 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (all-local): Add example_index. - (dist-hook): Likewise. - (EXAMPLE_SRC): Add index and support files. - (EXAMPLE_INDEXES): New file list. - (example_index): New target. - (clean-local): Remove generated indexes. - * Makefile.in: Regenerated. - -2008-08-07 Mark Wielaard <mwielaard@redhat.com> - - * systemtap.spec: Add comment about versioned vs unversioned docs. - -2008-08-06 Frank Ch. Eigler <fche@elastic.org> - - * stap-find-servers (match_server, client_sysinfo): - Use "sysinfo=...." keyword in mdns TXT record. - * stap-serverd (advertise_presence): Ditto. - (initialization): Locate random usable server port if needed. - (listen): Complain if port turns out to be unusable after all. - -2008-08-06 Josh Stone <joshua.i.stone@intel.com> - - PR 6820 - From Eugeniy Meshcheryakov eugen@debian.org: - * staprun.8.in: fix minor formatting problems - -2008-08-05 Stan Cox <scox@redhat.com> - - * NEWS: Updated $$vars, $$parms, $$locals. - * tapsets.cxx (visit_target_symbol): Missing break typo. - -2008-08-04 Stan Cox <scox@redhat.com> - - * tapsets.cxx (dwarf_var_expanding_copy_visitor::visit_target_symbol): - Add support for $$vars, $$parms, and $$locals. - * stapprobes.5.in: Likewise. - * doc/langref.tex: Likewise. - -2008-08-02 Frank Ch. Eigler <fche@elastic.org> - - * translate.h (translator_output::assert_0_indent): New function. - * translate.cxx (emit_*): Add a couple of calls to confirm - newline(1)/(-1) nest matching. - -2008-07-30 Dave Brolley <brolley@redhat.com> - - * stap-client (create_request): No need for random suffix for - cmdline and sysinfo files. - * stap-server (read_data_file): File name is exactly as specified. - Check that it exists. - -2008-07-29 Dave Brolley <brolley@redhat.com> - - * Makefile.am (bin_SCRIPTS): add stap-find-servers, stap-start-server, - stap-find-or-start-server, stap-stop-server. - (EXTRA_DIST): Likewise. - (check): Ensure that a compatible systemtap server is running before - running the tests, if requested. If we start a sterver, stop it after - running the tests. - (installcheck): Likewise. - * stap-client (parse_options): Specify stdin as 'scripts/-' on the - generated command line. - (create_request): Use $script_file instead of '-'. - (unpack_response): Existence of the systemtap temp directory is - optional. - (find_and_connect_to_server): Use stap-find-servers and choose_server. - (choose_server): Rewritten from match_server. Examine multiple - servers. - (connect_to_server): New function. - (maybe_call_staprun): Check for existence of a module. - Use staprun_PATH. - (staprun_PATH): New function. - (fatal): Call disconnect_from_server. - (server_fatal): Likewise. - * stap-server: Catch SIGTERM and SIGINT. - (create_response): Check for the existence of $tmpdir_stap. - (terminate): New function. - * stap-serverd: Catch SIGTERM and SIGINT. - (listen): Run 'nc | stap-server' in the background and wait for them - to finish. - (terminate): Renamed from handle_sigint. Kill avahi-publish-service - and nc. - * systemtap.spec: Add stap-find-servers, stap-start-server, - stap-find-or-start-server, stap-stop-server. - * Makefile.in: Regenerated. - -2008-07-28 Dave Nomura <dcnltc@us.ibm.com> - - * session.h (struct systemtap_session): Added itrace_derived_probe - group. - * elaborate.cxx (systemtap_session::systemtap_session): Added - initialization of itrace_derived_probes. - * tapsets.cxx (struct itrace_derived_probe): Add derived_probe - struct for holding info needed by itrace probes. - (struct itrace_derived_probe_group): New derived_probe_group - to handle itrace probes. - (itrace_derived_probe::itrace_derived_probe): Needed for use with - task_finder. - (itrace_derived_probe_group::join_group): Ditto. - (itrace_derived_probe_group::enroll): Ditto. - (itrace_derived_probe_group::emit_probe_decl): Ditto. - (itrace_derived_probe_group::emit_module_decls): Ditto. - (itrace_derived_probe_group::emit_module_init): Ditto. - (itrace_derived_probe_group::emit_module_exit): Ditto. - * stapprobes.5.in : Added documentation of itrace probe. - -2008-07-24 Josh Stone <joshua.i.stone@intel.com> - - * buildrun.cxx (compile_pass): Remove STAPCONF_MODULE_NSECTIONS, - and add STAPCONF_ONEACHCPU_RETRY - -2008-07-23 Frank Ch. Eigler <fche@elastic.org> - - From James Bottomley <James.Bottomley@HansenPartnership.com>: - * tapsets.cxx (query_dwarf_func): Silently skip inlined function - instances that have no entrypc. - -2008-07-18 Masami Hiramatsu <mhiramat@redhat.com> - - BZ 442528 (PR6028) - * tapsets.cxx (emit_module_decls): Add dummy kprobe on ia64. - (emit_module_init): register dummy kprobes for fixing bsp offset on - ia64. - (emit_module_exit): unregister dummy kprobes on ia64. - -2008-07-18 Frank Ch. Eigler <fche@elastic.org> - - BZ 442528, From Masami Hiramatsu <mhiramat@redhat.com> - * elaborate.h (emit_probe_local_init): New derived_probe member. - * tapsets.cxx (dwarf_derived_probe): Implement it, for ia64 register - unwind caching. - -2008-07-17 Stan Cox <scox@redhat.com> - - * tapsets.cxx (iterate_over_srcfile_lines): Avoid statement wildcard - lines without a unique address. - -2008-07-17 <anithra@linux.vnet.ibm.com> - - * main.cxx (handle_interrupt): Forward received signal to process - group. - -2008-07-17 Masami Hiramatsu <mhiramat@redhat.com> - - * systemtap.spec (%files): Add stap-server and stap-serverd. - (%files runtime): Add stap-client. - -2008-07-17 David Smith <dsmith@redhat.com> - - * systemtap.spec: Moved comment that was on the same line as - "Version", which rpmbuild didn't like. - -2008-07-17 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (dump_unwindsyms): Produce symbol tables and section - lists for all text-like sections, useful for -ffunction-sections type - kernel modules. - (emit_symbol_data): Tolerate missing unwind/symbol data during - elf processing. Subsequently warn about anything missing. - -2008-07-16 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bumped version to 0.7.1. - * systemtap.spec: Renamed from systemtap.spec.in; don't autoconf it - just on account of @VERSION@. - * Makefile.am (EXTRA_DIST): Distribute it. - * Makefile.in, configure, testsuite/configure: Regenerated. - -2008-07-16 Dave Brolley <brolley@redhat.com> - - * Makefile.am (EXTRA_DIST): Add stap-client, stap-server, stap-serverd. - * Makefile.in: Regenerated. - -2008-07-14 David Smith <dsmith@redhat.com> - - * tapsets.cxx - (utrace_var_expanding_copy_visitor::visit_target_symbol): - Synthesize a function to get the value of $syscall. - -2008-07-14 Dave Brolley <brolley@redhat.com> - - * Makefile.am (bin_SCRIPTS): Add stap-client, stap-server, stap-serverd. - * Makefile.in: Regenerated. - * aclocal.m4: Regenerated. - -2008-07-12 Frank Ch. Eigler <fche@elastic.org> - - PR 6738. - * buildrun.cxx (compile_pass): Add autoconf-uaccess.c. - * translate.cxx (translate_pass): #include <linux/vermagic.h> for - maximum version compatibility for UTS_RELEASE. - -2008-07-12 Frank Ch. Eigler <fche@elastic.org> - - By Andy Fitzsimon <afitzsim@redhat.com>: - * smileytap.svg: New file. - -2008-07-11 Frank Ch. Eigler <fche@elastic.org> - - PR 6739 - * tapsets.cxx (global_alias_cache): Make this a per-module/cu cache, - just like the function cache. - (update_alias_cache): Removed. Instead ... - (declaration_resolve): Compute the lookup table for this module/cu, - but only once. - -2008-07-11 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (dump_unwindsyms): Start tolerating user-space programs, - which may be unrelocatable. - -2008-07-11 Frank Ch. Eigler <fche@elastic.org> - - * hash.cxx (find_hash): Mix in -d MODULE names. - -2008-07-10 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): If "-k" (save temp directory) was supplied, - disable caching. - -2008-07-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6703. - * tapsets.cxx (mark_dwarf_redundancies): Tweak hashtable/iterator - syntax for gcc 4.1 compatibility. - -2008-07-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6736. - * main.cxx (main,usage): Support new "-d MODULE" option to - populate comp-unwindsyms module list. - * stap.1.in: Document it. - * tapsets.cxx (dwarf_query::add_probe_point): Add probed module - to comp-unwindsyms set. - (utrace_builder::build): Ditto for probed user-space program. - * translate.cxx (emit_symbol_data): Emit _stp_module[] entry - for each comp-unwindsyms member, including relocation bases - and symbols, but not yet unwind data. - * NEWS: Remove mention of temporarily disabled unwinder. - * session.h: Corresponding changes. - -2008-07-09 Mark Wielaard <mwielaard@redhat.com> - - PR 6732 - * buildrun.cxx (compile_pass): Define STAPCONF_REAL_PARENT by - calling autoconf-real-parent.c - -2008-07-09 Frank Ch. Eigler <fche@elastic.org> - - From James Bottomley <James.Bottomley@HansenPartnership.com> - * tapsets.cxx: (dwflpp::global_alias_cache): New member. - (declaration_resolve): Search it, called from translate_components. - (update_alias_cache): Populate it, called from query_cu. - -2008-07-09 <wenji.huang@oracle.com> - - * translate.cxx (visit_comparison): Remove unnecessary comparison. - * translate.cxx (emit_symbol_data): Remove unused local variable. - -2008-07-08 Dave Brolley <brolley@redhat.com> - - * stap-client (client_sysinfo): Use `uname -rvm`. - (receive_response): Wait for "done:" from the server. Clear server_ip - when the server is incompatible. - * stap-server (check_request): Quote "`server_sysinfo`". - (server_sysinfo): Use `uname -rvm`. - (send_response): Send "done:". - * stap-serverd (advertise_presence): Use `uname -rvm`. Quote "$txt". - -2008-07-07 Mark Wielaard <mwielaard@redhat.com> - - * stapex.5.in: Add section on installed examples, samples and demos - and how they are documented. - -2008-07-07 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (install-data-hook): Install examples, demos and - samples. - (uninstall-local): Remove examples, demos and samples. - * Makefile.in: Regenerated. - * aclocal.m4: Likewise. - * systemtap.spec.in (%install): Move examples. - Don't copy over examples to src. - (testsuite): Don't include src/examples. - -2008-07-07 Mark Wielaard <mwielaard@redhat.com> - - * systemtap.spec.in (%install): Move installed pdf files. - (%files): Mark moved installed pdf as %doc files. - -2008-07-03 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (translate_pass): Don't #include <linux/compile.h>. - -2008-07-03 Dave Brolley <brolley@redhat.com> - - * stap-serverd: New script. - * stap-client (client_sysinfo): Client sysinfo is stripped down to - the output of `uname -r` for now. - (package_request): Don't create temporary server tar file here. - (send_request): Communication protocol simplified. Use nc to send - the tar file. - (receive_response): Communication protocol eliminated. Simply wait - for the file from the server using nc. - (unpack_response): Create temporary server tar file here. Verify the - contents of the server's response. - (find_and_connect_to_server): Obtain server address and port from - avahi-browse. - (server_fatal): New function. - (check_server_error): Call server_fatal. - * stap-server (configuration): port is now provided as an argument. - Default to port 65001. - (initialization): Don't create temp work directory here. - (receive_request): Communication protocol simplified. Receive the - request file using nc. - (unpack_request): Make temp work directory here. Verify the contents - of the request. - (server_sysinfo): New function. - (check_compatibility): Exact match required. - (package_response): Don't use -p on tar command. - (send_response): Communication protocol eliminated. Simply send the - file using nc. - (main line): Pass "$@" to configuration. - -2008-07-01 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): In -vv mode, also dump out session arch/release - values right at the top. - -2008-06-29 Tim Moore <timoore@redhat.com> - - * Makefile.am (EXTRA_DIST): Add auto_free.h. - * Makefile.in: Regenerated. - * auto_free.h (auto_free_ref): New class to free references to - pointers allocated with malloc / realloc. - * tapsets.cxx (iterate_over_srcfile_lines): Use auto_free_ref at - top level of function to free srcsp. - -2008-06-27 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): Fix - bug in handling process(PID) probes. - -2008-06-24 K.Prasad <prasad@linux.vnet.ibm.com> - - * tapset/vfs.stp: Deprecate probe points on old functions, namely - generic_file_readv(), generic_file_writev(), - generic_file_read() and generic_file_write(). - * tapset/vfs.stp: Enhance the tapset by - providing more pure C functions, probes for newer VFS related functions - * testsuite/buildok/vfs_testcase.stp: Created a testsuite for the - new enhanced VFS Tapset which does a compile test i.e. with flags -up4 - -2008-06-25 Stan Cox <scox@redhat.com> - - * tapsets.cxx (iterate_over_srcfile_lines): Only probe a line once. - -2008-06-24 Tim Moore <timoore@redhat.com> - - * auto_free.h: New file. - * tapsets.cxx (iterate_over_srcfile_lines, read_symbols): Use - auto_free instead of explicit calls to ::free(). - (Compare): Class for comparing func_info objects and their - addresses. - (get_index_for_address): Remove. - (symbol_table::sort): new function. - (query_module_symtab): Iterate over list_by_addr using iterator - instead of index. - (~symbol_table): Don't bother clearing list_by_addr and - map_by_name. - (add_symbol): Don't keep list_by_addr in order. - (read_symbols, get_from_elf): Sort symbols after all are read. - (get_func_containing_address): Use std::upper_bound. - (purge_syscall_stubs): Don't iterate over whole list_by_addr - vector; use std::equal_range to look for possible stub addresses. - -2008-06-23 Frank Ch. Eigler <fche@elastic.org> - - * session.h (module_cache): Add field here. - * tapsets.cxx (dwflpp): Remove static field from here. - (pathname_caching_callback): Use hacky micro-static to get to it. - (*): Update other users of module_cache. - * elaborate.cxx (systemtap_session ctor): Corresponding changes. - -2008-06-23 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): - Handles UDPF_NONE value. - (utrace_derived_probe_group::emit_vm_callback_probe_decl): New - function. - (utrace_derived_probe_group::emit_module_decls): Calls - emit_vm_callback_probe_decl() to set up vm_callbacks. - -2008-06-23 Stan Cox <scox@redhat.com> - - * NEWS: Updated .statement line number wildcard and line number range. - * stapprobes.5.in: Likewise. - * doc/langref.tex: Likewise. - * tapsets.cxx (enum line_t): Add RANGE and WILDCARD. - (iterate_over_srcfile_lines): Change lineno parm to lines[]. - Support RANGE and WILDCARD. - (dwarf_query): Change line to line[] - (dwarf_query::parse_function_spec): Parse RANGE and WILDCARD. - -2008-06-20 wcohen <wcohen@redhat.com> - - * stapfuncs.5.in: Add documentation for tapset/dev.stp functions. - -2008-06-18 Josh Stone <joshua.i.stone@intel.com> - - PR 6644 - * elaborate.cxx (dead_stmtexpr_remover::visit_block): Flatten nested - block statements into a single block. - (dead_stmtexpr_remover::visit_if_statement): Remove the possibility - of if_statements with a null thenblock. When an if lacks both then - and else, either remove it completely or reduce it to a simple - statment evaluating the condition. With an else and no then, invert - the condition and else becomes then. - (void_statement_reducer): New optimization visitor that breaks - statements in void context into smaller pieces, to expose more - optimization opportunities. - (semantic_pass_opt5, semantic_pass_opt6): Bump opt5 to opt6, and - create a new opt5 that runs through void_statement_reducer. - -2008-06-16 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (print_locals): Produce nothing instead of - "(alternatives: (none found))" if no alternatives were found. - -2008-06-16 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (session::print_warning): Change to take optional - token as argument. - (*): Adjust callers of print_warning() to pass a token. - (print_token): New function, eliminate recent file name duplication. - (print_error): Use it too. - (semantic_pass_opt2): Tweak way read-only vars' alternatives are - printed. Eliminate relaxation-loop duplicates by printing warnings - only on first iteration. Print alternatives for globals too. - * session.h: Corresponding changes. - -2008-06-16 Stan Cox <scox@redhat.com> - - * elaborate.cxx (semantic_pass_opt2): Only create function - alternatives if needed. Overload compare. - -2008-06-13 Stan Cox <scox@redhat.com> - - * elaborate.cxx (print_warning): Add optional_str parameter. - (semantic_pass_opt2): List variable alternatives for probes and - functions. - * session.h (print_warning): Add optional_str parameter. - -2008-06-13 Josh Stone <joshua.i.stone@intel.com> - - * translate.cxx: Jump out directly after setting last_error, rather - than passively checking last_error everywhere. - * translate.cxx: Only make actionremaining checks at control points, - i.e. roughly at the end of basic blocks, or after executing a few - statements in a row. - -2008-06-13 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): Print generated module name for "-m FOO" - runs also. Stop warning about this implying uncached operation. - -2008-06-12 Stan Cox <scox@redhat.com> - - * elaborate.cxx (print_warning): Make parameter a const. - -2008-06-11 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (EXTRA_DIST): Add dwarf_wrappers.h. - -2008-06-11 Mark Wielaard <mwielaard@redhat.com> - - * elaborate.cxx (print_warning): Only output WARNING, don't put it - in the message_str and seen_warnings. - * session.h (print_warning): Reindent. - -2008-06-11 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (print_warning): Use session.seen_warnings[]. - -2008-06-10 Stan Cox <scox@redhat.com> - - * elaborate.cxx (print_warning): New. - * elaborate.cxx (semantic_pass_opt1): Use it. - -2008-06-11 Tim Moore <timoore@redhat.com> - - * dwarf_wrappers.h (dwfl_assert): Add overload with boolean value - for assertion test. - * dwarf_wrappers.cxx (dwfl_assert): Write boolean condition - version. - * tapsets.cxx (emit_address): Fix up dwfl_asserts that got negated - in changes to dwfl_assert. - - PR 2608 - * dwarf_wrappers.h, dwarf_wrappers.cxx: New files. - * Makefile.in: Regenerated. - * tapsets.cxx (dwarf_assert, dwfl_assert): Move to - dwarf_wrappers.h. - (iterate_over_srcfile_lines, has_single_line_record, - query_srcfile_line): Use dwarf_line_t wrapper. - (die_has_pc): Take a reference to a Dwarf_Die instead of a - pointer. Clean up use of dwfl_assert. - (query_cu): Check that statement raw address matches the beginning - of a statement record. - * elaborate.h: Include iosfwd instead of iostream. - (literal_map_t, resolve_prologue_endings,): New typedef. - - -2008-06-10 Jim Keniston <jkenisto@us.ibm.com> - - * testsuite/systemtap.context/num_args.tcl: Run twice -- - once with dwarf (default) and once with --kelf --ignore-dwarf. - * testsuite/systemtap.context/context.exp: Add num_args to - testlist. :-} - -2008-06-10 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): - Initializes .vm_callback. - -2008-06-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6470 - * NEWS: Note argv[] tapset. - * parse.cxx (scan_pp): Better handle premature EOF. - * stapvars.5.in: New file. - * stap.1.in: Mention it. - * Makefile.am (dist_man_MANS): Add stapvars.5. - * configure.ac (AC_CONFIG_FILES): Add stapvars.5.in. - * Makefile.in, configure: Regenerated. - -2008-06-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6470 - * parse.cxx (scan_pp): Eliminate expand_args argument to control - nested preprocess evaluation. Rewrite to use a combination of - exceptions and non-recursion. - (lexer::scan): Ditto. Interpret "$#" as the argc value in all - cases. - * parse.h: Corresponding decl changes. - -2008-06-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6470 - * parse.cxx (eval_comparison): New template function. - (eval_pp_conditional): Call it separately for string/string and - int64/int64 cases. - (lexer::scan): Provide better error message for invalid $NNN. - -2008-06-09 Jim Keniston <jkenisto@us.ibm.com> - - PR 6601 - * tapsets.cxx: For powerpc, reject symbols in .opd - (function descriptor) section. - -2008-06-09 Stan Cox <scox@redhat.com> - - * NEWS: Updated kernel.statement relative line number. - * stapprobes.5.in: Likewise. - -2008-06-09 David Smith <dsmith@redhat.com> - - * tapsets.cxx - (utrace_var_expanding_copy_visitor::visit_target_symbol): Calls - 'syscall_nr' to get the value of '$syscall'. - - * tapsets.cxx (utrace_derived_probe::join_group): Removed - generated inclusion of tracehook.h. - (utrace_var_expanding_copy_visitor::visit_target_symbol): Uses - '_stp_arg(0)' to get value of '$syscall'. - -2008-06-06 Stan Cox <scox@redhat.com> - - * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): - Add parameter line_type_relative. - (enum line_t): New. - (dwarf_query::line_type): New. - (dwarf_query::parse_function_spec): Set line_type. - -2008-06-06 David Smith <dsmith@redhat.com> - - * NEWS: Updated utrace probes descriptions. - * stapprobes.5.in: Ditto. - - * tapsets.cxx (enum utrace_derived_probe_flags): Redefined in - terms of probe types instead of utrace events. - (utrace_var_expanding_copy_visitor::visit_target_symbol): Uses new - utrace_derived_probes_flags values. - (utrace_builder::build): Handles new probe types and new - utrace_derived_probes_flags values. - (utrace_derived_probe_group::emit_probe_decl): Updated to handle - new utrace_derived_probe_flags values. - (utrace_derived_probe_group::emit_module_decls): Ditto. Also - correctly handles 'begin' events correctly by installing a quiesce - handler (instead of running the probe directly). - (register_standard_tapsets): Registers updated utrace probe - types. - -2008-06-05 Srinivasa DS <srinivasa@in.ibm.com> - *configure,configure.ac: -fpie option puts limit on GOT size - and hence systemtap build fails on s390. So use -fPIE which - doesn't put limit on GOT size. - -2008-06-04 Jim Keniston <jkenisto@us.ibm.com> - - * testsuite/systemtap.context/num_args.{stp,tcl}: Added. - Same as args.{stp,tcl}, but refs args using *_arg(). - -2008-06-04 Jim Keniston <jkenisto@us.ibm.com> - - PR 6588 - * tapset/syscalls.stp: Remove return aliases for exit and exit_group. - * testsuite/semok/syscalls_return.stp: Regression test - -2008-06-03 David Smith <dsmith@redhat.com> - - * tapsets.cxx: Added several string tokens that are used instead - of hard-coded strings. - (register_standard_tapsets): Uses new string tokens. - -2008-06-03 Frank Ch. Eigler <fche@elastic.org> - - PR 6429. - * Makefile.am: Don't link stapio with -ldw. - * Makefile.in: Regenerated. - -2008-05-29 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (installcheck): Check that make install was run. - * Makefile.in: Regenerated. - -2008-06-02 Frank Ch. Eigler <fche@elastic.org> - - PR6534 - * translate.cxx (c_unparser::emit_module_init): Use UTS_RELEASE - instead of uts_sem/utsname() as kernel version-checking hack. - -2008-06-02 Dave Brolley <brolley@redhat.com> - - * stap-client (initialization): port is no longer hard coded. - Initialize avahi_service_tag to _stap._tcp. - (find_and_connect_to_server): Handle server/port returned by - match_server. - (match_server): Obtain server ip address and port from output - of the -r option to avahi-browse. Echo a server/port pair. - -2008-06-02 Zhaolei <zhaolei@cn.fujitsu.com> - - * main.cxx (main): Fix the problem that kernel module compile - failure when runtime directory is set to relative path(stap -R). - -2008-05-30 Dave Brolley <brolley@redhat.com> - - * stap-client, stap-server: New compile server and client scripts. - -2008-05-30 Srinivasa DS <srinivasa@in.ibm.com> - PR 6562 - * tapsets.cxx, translate.cxx: modified one argument for - dwfl_linux_kernel_report_offline(). - * testsuite/systemtap.base/debugpath.exp: Modified testsuite for new - SYSTEMTAP_DEBUGINFO_PATH behaviour. - * stap.1.in: Modified manpage for new SYSTEMTAP_DEBUGINFO_PATH behaviour. - -2008-05-29 Jim Keniston <jkenisto@us.ibm.com> - - PR 6582 - * tapset/context.stp: Added registers_valid(). - * stapfuncs.5.in: Ditto. - * tapset/x86_64/registers.stp: Added registers_valid() check. - * tapset/ppc64/registers.stp: Ditto. - * tapset/i686/registers.stp: Ditto. Also fixed warnings due to - sp_offset and ss_offset not being global. - -2008-05-29 Ananth N Mavinakayanahalli <ananth@in.ibm.com> - - PR 6563 - * tapset/ppc64/registers.stp: Fix powerpc dwarfless argument access - -2008-05-28 Josh Stone <joshua.i.stone@intel.com> - - PR 6529 - * translate.cxx (c_unparser::visit_return_statement): Make sure we - notice errors from evaluating return values. - -2008-05-28 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): - Removed debug print. - - * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): - Instead of adding clone handlers, just call the probes directly. - (utrace_derived_probe_group::emit_module_decls): For syscall - probes, on exec detach the parent's utrace engine from the child. - -2008-05-27 Josh Stone <joshua.i.stone@intel.com> - - PR 6432 - * buildrun.cxx (compile_pass): Add the autoconf test for probe_kernel_* - functions, but leave it #if-0'ed for now. - -2008-05-23 Jim Keniston <jkenisto@us.ibm.com> - - PR 4311, cont. Address powerpc dwarfless test failures. - * tapsets.cxx: Convert .funcname to funcname when adding it - to our symbol table. Accept all weak symbols except those - that map to sys_ni_syscall. - -2008-05-23 Srinivasa DS <srinivasa@in.ibm.com> - PR 6429: Inerim fix to avoid compilation error of systemtap module - * runtime/transport/symbols.c: added definitions of struct - module_sect_attr, struct module_sect_attrs for 2.6.25 above kernels. - -2008-05-22 Wenji Huang <wenji.huang@oracle.com> - - * tapsets.cxx (iterate_over_functions): Fix .statement(NUM) regression. - -2008-05-22 Ananth N Mavinakayanahalli <ananth@in.ibm.com> - - * tapset/ppc64/registers.stp: Support powerpc register + arg lookup - * stapfuncs.5.in: Add powerpc bits; indicate scope of uarg_* access - -2008-05-21 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): - Added new 'event_flag' parameter to task_finder callback. Only - calls probe handlers if we received the correct event. - -2008-05-20 Frank Ch. Eigler <fche@elastic.org> - - PR 6538 - * elaborate.cxx (semantic_pass_opt2): Warn about read-only locals and - globals. - (visit_foreach_loop): Belatedly recognize index symbols as lvalues. - -2008-05-21 Stan Cox <scox@redhat.com> - - * elaborate.cxx (dead_assignment_remover::visit_binary_expression): New. - (dead_assignment_remover::visit_assignment): Allow rhs simplification. - -2008-05-20 Tim Moore <timoore@redhat.com> - - * configure.ac: Check for tr1/unordered_map header. - * tapsets.cxx: Use tr1::unordered_map if available. - * configure, config.in: Regenerated. - -2008-05-19 Stan Cox <scox@redhat.com> - - * elaborate.cxx (dead_assignment_remover::visit_arrayindex): New method. - (dead_assignment_remover::visit_functioncall): New method. - (dead_assignment_remover::visit_if_statement): New method. - (dead_assignment_remover::visit_for_loop): New method. - -2008-05-19 William Cohen <wcohen@redhat.com> - - * main.cxx (setup_signals): Remove sa_restorer initialization. - -2008-05-17 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (semantic_pass): Error on #probes=0, but not in - listing mode. - (semantic_pass_optimize[12]): Remove inappropriate check from here. - -2008-05-17 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (cu_function_cache_t): Switch to <ext/hash_map>s, - since these tables tend to get pretty big. - -2008-05-16 Frank Ch. Eigler <fche@elastic.org> - - PR 5643 - * tapsets.cxx (cu_function_cache_t): Reorganize into - mod:cu->function->DIE lookup table. Consider merging into symtab - later. - (mark_dwarf_redudancies): Adapt. - (iterate_over_functions): Rewrite. - (dwarf_builder::build): Cache kprobes etc. symbol addresses. - * elaborate.cxx (systemtap_session ctor): Clear additional POD fields. - -2008-05-15 David Smith <dsmith@redhat.com> - - * main.cxx (setup_signals): New function. - (main): Calls setup_signals() to setup signal handling. When - removing the temporary directory, ignore signals. - -2008-05-13 Ananth N Mavinakayanahalli <ananth@in.ibm.com> - PR 5955. - * parse.cxx (parser::parse_global): accept ";" terminated globals - * NEWS - update documentation - * testsuite/systemtap.base/global_vars.(stp/exp) - supporting tests - * testsuite/parseko/twenty(four/five).stp - supporting tests - -2008-05-12 Jim Keniston <jkenisto@us.ibm.com> - - PR 4311 - Function boundary tracing without debuginfo: Phase II - Merged dwarfless branch into mainline. But first... - * runtime/regs.c: Removed register name:value lookup facility. - Moved basically all register-lookup code to the i686 and x86_64 - registers.stp tapsets. Args stuff shared between i386 and - x86_64 remains in regs.c. - * tapset/{i686,x86_64}/registers.stp: Moved register-lookup - code from runtime/regs.c to here. - -2008-05-12 Jim Keniston <jkenisto@us.ibm.com> - - (2008-05-06 in dwarfless branch) - PR 4311 - Function boundary tracing without debuginfo: Phase II - * stapfuncs.5.in: Added sections on CPU REGISTERS and - NUMBERED FUNCTION ARGUMENTS. - -2008-05-12 Jim Keniston <jkenisto@us.ibm.com> - - (2008-05-05 in dwarfless branch) - PR 4311 - Function boundary tracing without debuginfo: Phase II - * runtime/regs.c: Added register name:value lookup facility. - Added support for register and arg lookup for i386 and x86_64. - * tapset/{i686,x86_64}/registers.stp: New: support for register - and arg lookup. - * tapsets.cxx, translate.cxx: Added regparm field to struct - context. - * tapset/nd_syscall.stp: syscall.stp migrating toward numbered - args rather than named args. - -2008-05-12 Jim Keniston <jkenisto@us.ibm.com> - - (2008-04-18 in dwarfless branch) - PR 4311 - Function boundary tracing without debuginfo: Phase I - * tapsets.cxx: Major rework of dwflpp, dwarf_query, and related - code to make do with elf info if dwarf info is absent, or - (in the case of vmlinux) make do with a System.map-style - symbol table if even the elf file is absent. - * main.cxx: Use getopt_long instead of getopt. Added --kelf, - --kmap, --ignore-vmlinux, and --ignore-dwarf. - * hash.cxx, session.h, stap.1.in: Added --kelf, --kmap, - --ignore-vmlinux, and --ignore-dwarf. - * testsuite/{semok,semko}/nodwf*.stp - -2008-05-07 Frank Ch. Eigler <fche@elastic.org> - - PR 6492. - * main.cxx (main): let -l imply -w. - -2008-05-05 Frank Ch. Eigler <fche@elastic.org> - - PR 444886. From <crquan@gmail.com>: - * tapsets.cxx, translate.cxx: Add .../build/... to default debuginfo - path, to ease search for hand-built kernels. - -2008-05-01 Frank Ch. Eigler <fche@elastic.org> - - PR 6474 - * configure.ac (--enable-pie): Add default option. - * Makefile.am (stap* binaries): Use -fpie/-z relro/-z now as - applicable. - * configure, aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated. - -2008-04-30 Masami Hiramatsu <mhiramat@redhat.com> - - PR 6008 - * main.cxx (main): Increase the limitation of buffer size to 4095MB. - * staprun.8.in: Ditto. - -2008-04-29 Frank Ch. Eigler <fche@elastic.org> - - PR 6466 - * elaborate.cxx - (dead_stmtexpr_remover): Expand scope to kill far more - side-effect-free statemnets, including if/for/foreach. - (semantic_pass_opt4): Warn on elided function/probe bodies. - (typeresolution_info::visit_target_symbol): Dump parse tree of - resolution-challenged functions/probes. - (*): Adapt to probe->body being a statement* - rather than a block*. - * tapsets.cxx (*): Ditto. - * staptree.cxx (block::block ctor): New cons constructor. - * staptree.h: Corresponding changes. - -2008-04-29 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Added - death event handlers to ensure that for every utrace_attach there - is a corresponding utrace_detach. - (utrace_derived_probe_group::emit_module_decls): Ditto. - -2008-04-28 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (translate_pass): Don't #define TEST_MODE. - -2008-04-26 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (common_probe_entryfn_prologue): Undo - clear of overload-related context vars; add explanation why. - -2008-04-25 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec.in: Simplify configuration defaults. - -2008-04-25 David Smith <dsmith@redhat.com> - - PR 6455. - * tapsets.cxx (mark_builder::build): Handles markers with no - format string. - -2008-04-24 Frank Ch. Eigler <fche@elastic.org> - - PR 6454. - * main.cxx (printscript): Avoid string truncation heuristics, and - also avoid plain probe::printsig. Hold nose and dig down into - raw location lists instead. - -2008-04-24 Will Cohen <wcohen@redhat.com> - - * aclocal.m4: Regenerated. - * Makefile.am (example/*): Moved to testsuite/systemtap.examples. - * Makefile.in: Regenerated. - -2008-04-23 Frank Ch. Eigler <fche@elastic.org> - - From: Srinivasa DS <srinivasa@in.ibm.com> - * tapsets.cxx (blacklisted_p): Blacklist more init/exit sections. - -2008-04-23 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (common_probe_entryfn_prologue): Clear - overload-related context vars. - -2008-04-22 hunt <hunt@redhat.com> - - * staprun.8.in: Add documentation for -d option. - -2008-04-22 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): - Removed debug statements. - -2008-04-18 David Smith <dsmith@redhat.com> - - * tapsets.cxx (struct utrace_builder): Added exec probes. - (utrace_derived_probe_group::emit_probe_decl): Ditto. - (utrace_derived_probe_group::emit_module_decls): Ditto. - (register_standard_tapsets): Ditto. - * stapprobes.5.in: Added information about exec probes. - * NEWS: Added information about utrace probes. - - * stapprobes.5.in: Added information about utrace probes. - -2008-04-17 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (build_blacklist): Fix regexps for atomics. - * vim/syntax/stap.vim: Recognize the 'limit' keyword and script arguments, - allow '$' in variable names, and highlight $target variables. - -2008-04-17 David Smith <dsmith@redhat.com> - - * tapsets.cxx (utrace_builder::build): Make sure that the PATH of - 'process("PATH")' probes is an absolute path. - (utrace_derived_probe_group::emit_module_decls): Made calls to - utrace probe handler functions conditional on which types of - utrace probes are going to be output. - -2008-04-16 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (task_finder_derived_probe): Add dummy constructor - for old (RHEL4) gcc compatibility. - -2008-04-16 Frank Ch. Eigler <fche@elastic.org> - - PR 6417: From Srinivasa DS <srinivasa@in.ibm.com>: - * tapsets.cxx (build_blacklist): Extend. - -2008-04-15 David Smith <dsmith@redhat.com> - - * session.h (struct systemtap_session): Added utrace_derived_probe - group and task_finder_derived_probe_group members. - * elaborate.cxx (systemtap_session::systemtap_session): Added - initialization of utrace_derived_probes and - task_finder_derived_probes. - * tapsets.cxx (struct task_finder_derived_probe_group): New - derived_probe_group to handle task_finder framework. - (struct utrace_derived_probe_group): New derived_probe_group to - handle utrace probes. - -2008-04-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6405 cont'd. - * Makefile.am (AM_CFLAGS): Remove -Wshadow, as it triggers for - new stapio (modname global vs. dwfl headers). - -2008-04-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6405 - * buildrun.cxx (compile_pass): Add STAPCONF_MODULE_NSECTIONS. - -2008-04-14 David Smith <dsmith@redhat.com> - - * elaborate.h (struct derived_probe_group): Removed - emit_module_header virtual function. - * translate.cxx (c_unparser::emit_common_header): Removed calls to - emit_module_header function. - * tapsets.cxx (be_derived_probe>): Removed emit_module_header function. - (struct timer_derived_probe_group): Ditto. - (struct profile_derived_probe_group): Ditto. - (struct procfs_derived_probe_group): Ditto. - (struct hrtimer_derived_probe_group): Ditto. - (struct perfmon_derived_probe_group): Ditto. - (dwarf_derived_probe_group::emit_module_decls): Moved kernel check - back from deleted emit_module_header function. - (uprobe_derived_probe_group::emit_module_decls): Ditto. - (mark_derived_probe_group::join_group): Moved marker - kernel check (to a new embedded code section) from deleted - emit_module_header function. - -2008-04-14 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (stapio_*): Become able to link/compile against - bundled elfutils. - * Makefile.in: Regenerated. - -2008-04-09 Martin Hunt <hunt@dragon> - - * buildrun.cxx (run_pass): Remove unused "-d" option - passed to staprun. - - * translate.cxx (emit_symbol_data): When available, - grab symbols from debuginfo instead of /proc/kallsyms. - -2008-04-11 David Smith <dsmith@redhat.com> - - * elaborate.h (struct derived_probe_group): Added - emit_module_header virtual function. - * translate.cxx (c_unparser::emit_common_header): Calls each probe - group's emit_module_header function. - (translate_pass): Moved inclusion of linux/marker.h to - mark_derived_probe_group::emit_module_header(). - * tapsets.cxx (struct be_derived_probe_group): Added empty - emit_module_header function. - (struct timer_derived_probe_group): Ditto. - (struct profile_derived_probe_group): Ditto. - (struct procfs_derived_probe_group): Ditto. - (struct hrtimer_derived_probe_group): Ditto. - (struct perfmon_derived_probe_group): Ditto. - (dwarf_derived_probe_group::emit_module_header): Moved kprobes - kernel check from emit_module_decls() to here. - (uprobe_derived_probe_group::emit_module_header): Moved uprobe - kernel check from emit_module_decls() to here. - (uprobe_derived_probe_group::emit_module_decls): Moved uprobe - kernel check to emit_module_header(). - (mark_derived_probe_group::emit_module_header): Moved marker - kernel check from emit_module_decls and translate_pass() to here. - (uprobe_derived_probe_group::emit_module_decls): Moved marker - kernel check to emit_module_header(). - -2008-04-10 Frank Ch. Eigler <fche@elastic.org> - - PR 2949. - * session.h (listing_mode): New field. - * main.cxx (main): Test it. Enjoy it. - (printscript): Do it. - (usage): Document it. - * stap.1.in, stapex.5.in: Ditto. - * elaborate.cxx (print_error): Disable error messages in listing mode. - -2008-04-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6393 cont'd. - * Makefile.am: Also copy RadeonHD.am fragment to force - git_version.h regeneration at every make, and also special - tagging for "make dist". Thanks <ndim>. - -2008-04-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6393. - * git_version.sh: New file, copied from radeonhd. - * configure.ac: No longer generate $builddir/SNAPSHOT. - * Makefile.am: Generate $builddir/git_version.h. - (EXTRA_DIST): Add git_version.h and git_version.sh. - * main.cxx (version): Print generated GIT_MESSAGE therefrom. - * Makefile.in, configure: Regenerated. - -2008-04-09 David Smith <dsmith@redhat.com> - - * .gitignore: Added more files to ignore. - -2008-04-04 Masami Hiramatsu <mhiramat@redhat.com> - - PR 6028 - * translate.cxx (c_unparser::emit_common_header): Add unwaddr for - caching unwound address. - * tapsets.cxx (common_probe_entryfn_prologue): Clear unwaddr. - -2008-04-01 Frank Ch. Eigler <fche@elastic.org> - - * safety/*: Removed subdirectory containing abandoned experiment. - -2008-03-31 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bump version to 0.7. - * configure: Regenerated. - -2008-03-27 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (common_probe_entryfn_prologue): Clear last_stmt. - -2008-03-26 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_function): Set context last_stmt, in case - an error occurs during the function. - -2008-03-25 Frank Ch. Eigler <fche@elastic.org> - - * stap.1.in: Clarify utility of epilogue type probe aliases. - -2008-03-21 Eugene Teo <eugeneteo@kernel.sg> - - PR 5528 - * tapset/conversions.stp (user_string_n, user_string_n2, - user_string_n_warn, user_string_n_quoted, user_short, user_short_warn, - user_int, user_int_warn, user_long, user_long_warn, user_char, - user_char_warn): New user_* functions. - * stapfuncs.5.in: Documented the new functions. - * testsuite/systemtap.stress/conversions.stp: Test new functions. - * testsuite/buildok/conversions.stp: Test new functions. - * testsuite/buildok/conversions-embedded.stp: Test new functions. - -2008-03-20 Frank Ch. Eigler <fche@elastic.org> - - PR 5975. - * tapsets.cxx (*): Added a few (void) expressions for asserts that - may be compiled out. - -2008-03-14 Masami Hiramatsu <mhiramat@redhat.com> - - PR 3542 - * buildrun.cxx (compile_pass): Add an autoconf to check the kernel - supports batch unregistration. - * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Add an - array of probe pointers for batch unregistration. - * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): Use - unregister_k(ret)probes if it is supported. - -2008-03-13 Frank Ch. Eigler <fche@elastic.org> - - PR 5928. - * buildrun.cxx (compile_pass): Use EXTRA_CFLAGS for autoconf'd values - instead of CFLAGS_<module>.o. - -2008-03-12 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac, systemtap.spec.in: Bumped version to 0.6.2. - * configure: Regenerated. - -2008-03-12 Dave Brolley <brolley@redhat.com> - - PR5897 - * staptree.cxx (probe::printsig): If this probe was derived from an alias, - call the printsig method of the alias. - -2008-03-10 Dave Brolley <brolley@redhat.com> - - PR5189 - * translate.cxx (probe_or_function_needs_deref_fault_handler): New member of - c_unparser. - (c_unparser::emit_function): Initialize probe_or_function_needs_deref_fault_handler. - Check it after the body is visited and generate a deref fault handler if necessary. - (c_unparser::emit_probe): Likewise. - (c_unparser::visit_print_format): Correct the compoenent type for an overridden string - literal. Generate code to check that pointer arguments to %m can be dereferenced. - Generate casts for printf arguments as necessary. - * elaborate.cxx (typeresolution_info::visit_print_format): Desired type for conv_memory - is pe_long. - -2008-03-06 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (AM_CXXFLAGS, AM_CFLAGS): Remove -Werror. - * Makefile.in, doc/Makefile.in: Regenerated. - -2008-03-03 Frank Ch. Eigler <fche@elastic.org> - - PR5516 - * elaborate.cxx (symbol_fetcher, dead_assignment_remover): - Support unresolved $target lvalues. Propagate pretty error - messages. - * staptree.cxx (varuse_collecting_visitor target_symbol): Ditto. - * staptree.h: Corresponding decl. - - * loc2c.c: c_translate_pointer_store: New function. - * loc2c.h: Corresponding decl. - * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Call it - for $target pointer assignments. - -2008-02-29 Will Cohen <wcohen@redhat.com> - - * main.cxx (handle_interrupts): Make compatible with GCC 4.3. - -2008-02-28 Frank Ch. Eigler <fche@elastic.org> - - PR5045 - * session.h (pending_interrupts): New global. - * main.cxx (handle_interrupts): New fn to handle SIGINT* etc. - * elaborate.cxx, translate.cxx, tapsets.cxx, main.cxx (*): Insert - pending_interrupts escape hatches inside potentially timetaking loops. - * buildrun.cxx: Don't deal with signals. - -2008-02-27 Frank Ch. Eigler <fche@elastic.org> - - PR5697 - * configure.ac (enable-docs): Implement. - * systemtap.spec.in: Add optional docs build/install/prereqs. - * Makefile.am (SUBDIRS): Add doc. - * Makefile.in, configure: Regenerated. - -2008-02-27 Dave Brolley <brolley@redhat.com> - - PR5189 - * staptree.h (print_format::conv_memory): New enumerator. - (print_format::width_type): New enumeration. - (print_format::precision_type): New enumeration. - (format_component::widthtype): New member. - (format_component::prectype): New member. - (format_component::is_empty): Test widthtype and prectype. - (format_component::clear): Clear widthtype and prectype. - * staptree.cxx (print_format::components_to_string): Handle dynamic width and precision. - Handle conv_memory. - (print_format::string_to_components): Parse dynamic width and precision specifiers. - Set widthtype and prectype. Parse %m format specifier. - * elaborate.h (typeresolution_info::check_arg_type): New method. - * elaborate.cxx (typeresolution_info::visit_print_format): Account for dynamic width - and precision when computing the expected number of arguments. Check the types of - arguments for dynamic width and precision. Use check_arg_type to check the types of - all arguments. Handle print_format::conv_memory. - (typeresolution_info::check_arg_type): New method. - * NEWS: Describe the enhancements above. - -2008-02-27 David Smith <dsmith@redhat.com> - - PR5729 - * systemtap.spec.in: Adds examples to the testsuite rpm so that - systemtap.samples/examples.exp works correctly. - -2008-02-26 Dave Brolley <brolley@redhat.com> - - PR5018 - * staprun.8.in: Escape dashes ('-') as appropriate. - -2008-02-26 Srinivasa DS <srinivasa@in.ibm.com> - PR5772 - * tapset/syscall2.stp: Modify wait4,waitid argument list - for kernel > 2.6.24. - -2008-02-25 Frank Ch. Eigler <fche@elastic.org> - - PR5792. - * parse.cxx (eval_pp_conditional): Support wildcards in - %( kernel_v/kernel_vr/arch ==/!= "*foo?" %) operands. - * NEWS, stap.1.in: Document this. - -2008-02-22 Frank Ch. Eigler <fche@elastic.org> - - PR5787, PR2608, .statement() - * tapsets.cxx (query_dwarf_func): Process .statement(NUM) probes too. - (query_cu): Ditto. - (query_func_info): Bypass prologue searching for .statement() probes. - (query_cu): Ditto. - - (build_blacklist): Remove unsightly empty first alternative in - "^(|foo)$" regexps. Show them for -vvv. - - * buildrun.cxx (compile_pass): Don't turn on "gcc -Q" on until -vvvv. - -2008-02-20 David Smith <dsmith@redhat.com> - - * tapsets.cxx (struct mark_derived_probe): Renamed 'probe_sig' to - 'probe_format'. - (mark_derived_probe::mark_derived_probe): Added new "format" probe - point component. - (mark_derived_probe::parse_probe_format): Renamed from - 'mark_derived_probe::parse_probe_sig'. - (struct mark_builder): Added typedefs. Converted mark_cache from - a map to a multimap to handle markers with the same name but - different formats. - (mark_builder::build): Added new 'format' probe parameter. - (register_standard_tapsets): Added new 'format' marker probe - optional parameter. - * stapprobes.5.in (parts): Documented new "format" probe - component. - -2008-02-19 Roland McGrath <roland@redhat.com> - - * tapsets.cxx (query_module): Use dwfl_module_getdwarf rather - than dwfl_module_getelf for e_machine check. - (dwarf_query::get_blacklist_section): Likewise for section search. - Ignore non-SHF_ALLOC sections. - -2008-02-19 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (query_module): Tweak elf-machine checking to - better represent elfutils idioms. - -2008-02-19 Frank Ch. Eigler <fche@elastic.org> - - PR 5766. - * tapsets.cxx (build_blacklist): Switch (back) to regexp-based - blacklist construction ... - (blacklist_p): ... and querying. - -2008-02-19 David Smith <dsmith@redhat.com> - - PR 5672. - * tapsets.cxx (mark_derived_probe): Call probe_point copy ctor to - shallow-copy incoming base probe location before - recomputing/overwriting it. - -2008-02-18 Frank Ch. Eigler <fche@elastic.org> - - * NEWS, stapprobes.5.in: Document basic (non-symbolic prototype) - user-space probe points. - -2008-02-15 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (function_name_last_match): New function. - (query_dwarf_func): Call it to stop unnecessary further iteration. - -2008-02-13 Frank Ch. Eigler <fche@elastic.org> - - PR 5759 - * tapsets.cxx (build_blacklist): Add some CONFIG_PREEMPT-related - functions. - -2008-02-13 Dave Brolley <brolley@redhat.com> - - PR5609 - * staptree.h (probe::collect_derivation_chain): Now takes vector<probe*>. - (probe::get_alias): New virtual method. - * elaborate.h (derived_probe::collect_derivation_chain): Now takes vector<probe*>. - * staptree.cxx (probe::collect_derivation_chain): Now takes vector<probe*>. Don't - cast 'this' to (derived_probe*). - * elaborate.cxx (derived_probe::collect_derivation_chain): Now takes vector<probe*>. - (alias_derived_probe::get_alias): New virtual method. - (alias_derived_probe::alias): New member. - (alias_expansion_builder::build): Call checkForRecursiveExpansion and emit a - diagnostic if recursion is detected. Pass alias to constructor of - alias_derived_probe. - (alias_expansion_builder::checkForRecursiveExpansion): New method. - * coveragedb.cxx: Pass vector<probe*> on all calls to collect_derivation_chain. - -2008-02-12 Frank Ch. Eigler <fche@elastic.org> - - PR 4393 - * tapsets.cxx (emit_address): Support relocatable kernels. - (dwarf_derived_probe ctor): Hack around for missing USHRT_MAX. - * elaborate.cxx (semantic_pass): Increment rc if exception caught. - -2008-02-12 Martin Hunt <hunt@redhat.com> - PR 5757 - * tapsets.cxx, translate.cxx: Cleanup indentation a bit. - -2008-02-11 Jim Keniston <jkenisto@us.ibm.com> - - PR 5693 - * runtime/uprobes/uprobes.c: Intercept handler-destined - signals received while we're single-stepping, and re-queue - them afterward. - * runtime/uprobes/uprobes.h: Ditto - -2008-02-09 Frank Ch. Eigler <fche@elastic.org> - - PR5750. - From Eugeniy Meshcheryakov eugen@debian.org: - * configure.ac (HAVE_LIBSQLITE3): Complete AC_DEFINE. - - * configure, INSTALL, missing, compile, depcomp, install-sh: - autoreconf -fi'd. - -2008-02-09 Frank Ch. Eigler <fche@elastic.org> - - PR 5751. - * configure.ac: Add -Werror to trial compilation with - -fstack-protector-all, for hosts that don't quite support it. - * configure: Regenerated. - -2008-02-08 David Smith <dsmith@redhat.com> - - PR 5650 - * systemtap.spec.in: Further simplification. - -2008-02-07 Frank Ch. Eigler <fche@elastic.org> - - * buildrun.cxx (run_make_cmd, compile_pass): Tweak kbuild - parametrization to produce useful compile logs at -vv. - -2008-02-04 David Smith <dsmith@redhat.com> - - PR 4446 (partial) - * tapsets.cxx - (mark_var_expanding_copy_visitor::visit_target_symbol_arg): New - function. - (mark_var_expanding_copy_visitor::visit_target_symbol_format): New - function. - (mark_var_expanding_copy_visitor::visit_target_symbol): Handles - "$arg" or "$format". - (mark_derived_probe_group::emit_module_decls): Sets up "$format" - data. - - PR 5650 (parital) - * systemtap.spec.in: Moved %pre section to the systemtap-runtime - rpm. - -2008-01-30 David Smith <dsmith@redhat.com> - - PR 5650 - * systemtap.spec.in: Simplified and explicitly specifies configure - options. - -2008-01-30 Dave Brolley <brolley@redhat.com> - - * coveragedb.cxx (print_coverage_info): Fix typo: s.probes -> s.unused_probes - where appropriate. - (sql_update_unused_probes): Likewise. - -2008-01-29 Frank Ch. Eigler <fche@elastic.org> - - PR 5647 - * configure.ac (--enable-ssp): Make default on compilers that - support it. - * configure: Regenerated. - -2008-01-28 David Smith <dsmith@redhat.com> - - * configure.ac: Fixed a bug when "--disable-permon" was used. - Added "--enable-crash" option. - * configure: Regenerated. - * Makefile.am: Improved staplog.so compile command. - * Makefile.in: Regenerated. - - * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): - Added 'const' to several members of stap_dwarf_probes. - - PR 5685. From Eugeniy Meshcheryakov <eugen@debian.org> - * configure.ac: If "--enable-sqlite" is specified, define - HAVE_LIBSQLITE3. - * configure: Regenerated. - -2008-01-26 Frank Ch. Eigler <fche@elastic.org> - - PR 5673. - * tapsets.cxx (dwarf_derived_probe_group): Split stap_dwarf_probes[] - into bss-carried kprobes structs. Tune embedded strings for - minimizing relocation-vs-fixed-buffer wastage. - * tapsets.cxx (dwarf_derived_probe): Impose .maxactive() limits. - -2008-01-25 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes.c: Within a probed process, serialize - calls to access_process_vm() when populating instructions - slots. Fixes an SMP bug on multithreaded apps with many - active probepoints. - * runtime/uprobes/uprobes.h: Ditto - -2008-01-25 Frank Ch. Eigler <fche@elastic.org> - - PR 5672. - * staptree.cxx (probe_point copy ctor): New function. - * staptree.h: Declare it. - * tapsets.cxx (dwarf_derived_probe ctor): Call it to shallow-copy - incoming base probe location before recomputing/overwriting it. - -2008-01-25 David Smith <dsmith@redhat.com> - - * configure.ac: Compressed the two perfmon options into one. - Made other small fixes and whitespace changes. - * configure: Regenerated. - -2008-01-24 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am: Make another $(MKDIR) call visible. - * Makefile.in: Regenerated. - -2008-01-24 David Smith <dsmith@redhat.com> - - PR 5661 (reverted). - * configure.ac: Removed elfutils version number check. - * configure: Regenerated. - * acsite.m4: Removed. - * systemtap.spec.in: Minimum elfutils version number is no longer - filled in by configure. - - PR 5650 (partial). - * configure.ac: Handles sqlite optional functionality correctly. - If enabled/disabled by the user, do the right thing. If not - specified by the user, use it if present. - * configure: Regenerated. - * systemtap.spec.in: Always specify to configure whether to use - sqlite or not. - -2008-01-24 Dave Brolley <brolley@redhat.com> - - PR 5017. - * staptree.cxx (<cstring>): #include it. - (required <indexable *>): Remove 'static' from instantiation and - move instantiation to here from... - * staptree.h: ...here. - -2008-01-23 David Smith <dsmith@redhat.com> - - PR 5661. - * configure.ac: Checks elfutils version number. - * acsite.m4: New file containing macro to return elfutils version - number. - * configure: Regenerated. - * systemtap.spec.in: Minimum elfutils version number is now filled - in by configure. - -2008-01-23 Dave Brolley <brolley@redhat.com> - - PR 5613. - * translate.cxx (var::fini): New method. - (c_unparser::emit_module_init): Call var::fini when deregistering - variables without indices. - (c_unparser::emit_module_exit): Likewise. - -2008-01-23 Frank Ch. Eigler <fche@elastic.org> - - PR 2151. - * tapsets.cxx (dwflpp::setup): Parametrize debuginfo_path. - * stap.1.in: Document this. - -2008-01-22 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes.c: Fix from Srinivasa: Recast - rcu_dereferences of engine->data to resync with kernel.org - builds. - -2008-01-18 Srinivasa DS <srinivasa@in.ibm.com> - - PR 5549 - * buildrun.cxx : Verify whether kernel has register rename patch - through autoconf files. - * runtime/(loc2c-runtime.h, procfs.c, regs.c, regs.h, - stack-i386.c, autoconf-x86-uniregs.c, autoconf-nameidata.c) : Use - appropriate register name at runtime, based on whether kernel has - register rename patch or not. - -2008-01-18 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes.c: Added static copy of - access_process_vm(), for kernels that don't export it. - -2008-01-18 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac, systemtap.spec.in: Update version to 0.6.1 - * configure: Regenerated. - -2008-01-17 Srinivasa DS <srinivasa@in.ibm.com> - - PR 5483 - * tapsets.cxx : Possible fix for making systemtap compatible with - the elfutils-0.131 - -2008-01-17 Frank Ch. Eigler <fche@elastic.org> - - PR 4935. - Reorganize probe condition implementation. - * elaborate.cxx (add_condition): New function. - (derived_probe): Remove condition member. - (derived_probe ctors): Assert non-null incoming probe/location ptrs. - (insert_condition_statement): Remove; turn into ... - (semantic_pass_conditions): New pass-2 subpass. - (semantic_pass_symbols, visit_symbol, visit_functioncall, find_var): - Detect some condition-related error cases. - (match_key): Change type to exp_type from tok_type. Update callers. - (alias_expansion_builder): Propagate probe conditions. - * staptree.cxx (probe): Remove condition field and related functions. - * tapsets.cxx (dwarf_derived_probe ctor): Compute replacement - wildcard-expanded probe_point preserving more of the original - location. - (mark_derived_probe ctor): Make similar to others - take location - rather than condition parameters. - * translate.cxx (emit_common_header): Tweak ordering of tmpcounter - traversal and hashkey expression generation. - * elaborate.h: Corresponding changes. - -2008-01-17 David Smith <dsmith@redhat.com> - - * tapsets.cxx - (procfs_var_expanding_copy_visitor::visit_target_symbol): Print an - error when trying to use the procfs target variable '$value' as an - array or structure. - (perfmon_var_expanding_copy_visitor::visit_target_symbol): Print an - error when trying to use the perfmon target variable '$counter as - an array or structure. - -2008-01-17 Srinivasa DS <srinivasa@in.ibm.com> - - PR 5483. - * tapsets.cxx (emit_address): Tolerate dummy relocation entry - added for kernel by recent elfutils. - -2008-01-16 David Smith <dsmith@redhat.com> - - PR 5608. - * tapsets.cxx - (mark_var_expanding_copy_visitor::visit_target_symbol): Print an - error when trying to use a marker argument as an array or - structure. - -2008-01-16 Eugene Teo <eteo@redhat.com> - - * stapfuncs.5.in: Document signal.stp tapset functions. - -2008-01-14 Martin Hunt <hunt@redhat.com> - * translate.cxx (emit_module_init): Call _stp_print_kernel_info() - to print out version information and internal memory usage stats. - -2008-01-14 Martin Hunt <hunt@redhat.com> - * translate.cxx (emit_module_exit): When using timing, delete timing - stats when finished. - -2008-01-12 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Generate a build tree SNAPSHOT file from git-rev-list, - if we suspect the source tree came from git. - * configure: Regenerated. - -2008-01-12 Frank Ch. Eigler <fche@elastic.org> - - PR 5603. - * configure.ac: Add "--enable-ssp" to select -fstack-protector-all - and similar runtime checking directives. - * configure: Regenerated. - -2008-01-09 David Smith <dsmith@redhat.com> - - * systemtap.spec.in: Since "make check" was removed - from the rpm build step, we no longer need to require dejagnu at - build time. - -2008-01-09 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (dwflpp::setup): Improve missing kernel-debuginfo - message. - -2008-01-02 Frank Ch. Eigler <fche@elastic.org> - - From Mark McLoughlin <markmc@redhat.com>: - * main.cxx (main): Set/restore umask around mkdtemp(). - -2007-12-27 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes_x86_64.c: Fix handling of indirect - jmps and calls that use rip-relative addressing. Allow probing - of opcode 0x63. - -2007-12-13 Masami Hiramatsu <mhiramat@redhat.com> - - * stap.1.in: Document about relay buffer sharing. - * NEWS: Document about relay buffer sharing and staplog crash extension. - -2007-12-12 Wenji Huang <wenji.huang@oracle.com> - - PR 5470 - * parse.cxx (parser::parse_probe_point): Add checking pointer t. - -2007-12-11 Frank Ch. Eigler <fche@elastic.org> - - * staptree.cxx, staptree.h: More GCC 4.3 build fixes from - Eugeniy Meshcheryakov <eugen@debian.org>. - -2007-12-05 William Cohen <wcohen@redhat.com> - - * systemtap.spec.in: Correct Source to point to location contain code. - -2007-12-05 Masami Hiramatsu <mhiramat@redhat.com> - - PR 4935 - * tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Allow user - to access kernel variables in the condition of probe points. - * stapprobes.5.in : Document the conditional probe point. - * NEWS : Ditto. - -2007-12-03 Masami Hiramatsu <mhiramat@redhat.com> - - PR 5376 - * parse.cxx (lexer::scan): Treat '*' as an alphabet if the wildcard - flag is true. - (parser::parse_probe_point): Call parser::next() with wildcard = true. - (parser::scan_pp): Add wildcard flag and pass it to lexer::scan. - (parser::next): Ditto. - (parser::peek): Ditto. - * parse.h : Ditto. - -2007-12-01 Frank Ch. Eigler <fche@elastic.org> - - * gen-stapmark.h, stapmark.h: Retire. - -2007-11-29 David Smith <dsmith@redhat.com> - - * tapsets.cxx (mark_derived_probe::initialize_probe_context_vars): - Handles the case where one marker has more than one string - argument. - -2007-11-27 David Smith <dsmith@redhat.com> - - PR 5377. - * elaborate.cxx (match_node::find_and_build): Handle wildcards in - probe points correctly. - -2007-11-26 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (derived_probe ctor): Don't duplicate condition - if it doesn't exist. - * staptree.cxx (probe_point, probe ctors): Initialize to 0. - -2007-11-20 Masami Hiramatsu <mhiramat@redhat.com> - - PR 4935. - * parse.cxx (parser::parse_probe_point): Parse "if" condition - following probe point. - * staptree.h (probe_point): Add "condition" field. - (probe): Add "condition" field and "add_condition" method. - (deep_copy_visitor): Add "deep_copy" method for the expression. - * staptree.cxx (probe_point::probe_point): Initalize it. - (probe::add_condition): Implement it. - (probe::print): Output "condition" field. - (probe::str): Ditto. - (deep_copy_visitor::deep_copy): Implement it. - * elaborate.h (derived_probe): Add "insert_condition_statement" - method. - * elaborate.cxx (derived_probe::derived_probe): Initialize "condition" - field, and insert a condition check routine on the top of body. - (derived_probe::insert_condition_statement): Implement it. - (alias_expansion_builder::build): Pass the condition from the alias - referer to new alias. - * tapsets.cxx (be_derived_probe): Remove unused constructor. - (dwarf_derived_probe::dwarf_derived_probe): Insert a condition check - routine on the top of body. - (mark_derived_probe::mark_derived_probe): Ditto. - (mark_builder::build): Pass the base location to mark_derived_probe. - - -2007-11-19 Frank Ch. Eigler <fche@elastic.org> - - PR 3887. - * staptree.h (probe_point): Add "sufficient" field. - * staptree.cxx: Initialize it, print it. - * parse.cxx (parse_probe_point): Parse it. - * elaborate.cxx (derive_probes): Implement it. - * stapprobes.5.in: Document it. - * NEWS: Gloat about it. - -2007-11-15 David Smith <dsmith@redhat.com> - - * tapsets.cxx (mark_derived_probe::initialize_probe_context_vars): - Updated to work with latest LTTNG patch - patch-2.6.24-rc2-lttng-0.10-pre23.tar.bz2. - (mark_derived_probe_group::emit_module_decls): Ditto. - (mark_derived_probe_group::emit_module_init): Ditto. - (mark_derived_probe_group::emit_module_exit): Ditto. - - * translate.cxx (c_unparser::emit_common_header): Ditto. - -2007-11-15 Mike Mason <mmlnx@us.ibm.com> - - * systemtap.spec.in: Removed "make check" from rpm build steps - -2007-11-15 David Smith <dsmith@redhat.com> - - * tapsets.cxx: Removed mark_query structure. - (mark_derived_probe::mark_derived_probe): Just looks for "kernel" - marker probes. - (mark_builder::build_no_more): No longer kern_dw, instead clears - the marker cache. - (mark_builder::build): Now parses Module.markers file to find - marker list and stores them in a cache. - (register_standard_tapsets): Removed 'module("foo").mark("bar")'. - All markers now go through 'kernel.mark("bar")'. - - * stapprobes.5.in (parts): Updated marker text. - -2007-11-14 Jim Keniston <jkenisto@us.ibm.com> - - PR 5324 - * main.cxx: Restored initialization of need_uprobes flag, - mistakenly backed out in PR 5270 fix. - -2007-11-14 Zhaolei <zhaolei@cn.fujitsu.com> - - * stapfuncs.5.in (tokenize): Change NULL to blank to avoid - misunderstanding. - -2007-11-13 Jim Keniston <jkenisto@us.ibm.com> - - PR 5270 - * main.cxx: Restored pre-10-08 version: moved uprobes build to - buildrun.cxx. - * buildrun.cxx: Reworked uprobes build so that the resulting - Module.symvers can be used in building the stap-generated - module. If user isn't root, call verify_uprobes_uptodate() - rather than trying (and failing) to rebuild uprobes.ko. - * buildrun.h: uprobes_enabled() and make_uprobes() are no - longer extern. - * runtime/uprobes/Makefile: Added uprobes.ko target for use - by verify_uprobes_uptodate(). - -2007-11-12 Martin Hunt <hunt@redhat.com> - - * stap.1.in: Replaced references to the log() function. - * stapex.5.in: Ditto. - * stapfuncs.5.in: Ditto. ALso remove print and printf. They are - documented in stap.1.in. - -2007-11-12 Martin Hunt <hunt@redhat.com> - - * translate.cxx (visit_print_format): Strings without a format or - formatted with "%s" or "%s\n" should be printed with calls to _stp_print(). - Call _stp_print_char() if printing a char. - - * staptree.cxx (parse_print): Check for "print_char". - - * staptree.h (struct print_format): Add print_char. - (parse_print): Update prototype. - - * parse.cxx (parse_symbol): Set print_char bool in print_format. - -2007-11-12 Martin Hunt <hunt@redhat.com> - - * tapsets.cxx (build_blacklist): Add __raw_spin_is_locked. - -2007-10-25 Josh Stone <joshua.i.stone@intel.com> - - PR 5219 - * stap.1.in: Add a note about string literal limitations in printf - and printd. - -2007-10-22 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes_x86_64.[ch]: Added x86_64 uprobes support - -2007-10-19 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes_ppc64.h,uprobes_s390.c: Fixed 10/16 - update to arch_validate_probed_insn() decl. - -2007-10-19 Masami Hiramatsu <mhiramat@redhat.com> - - * staplog.c: Cleanup code and remove end-of-line spaces. - (create_output_filename): Use snprintf instead of sprintf and remove - malloc(). - (print_rchan_info): Merge into output_cpu_logs(). - (open_output_file): Use GETBUF() instead of malloc(). - (output_cpu_logs): Simplify logic and remove unused code. - (do_staplog): Merge into cmd_staplog(). - (help_staplog): Fix typos. - * Makefile.am (STAPLOG): Add -Wall option. - * Makefile.in: Regenerated. - -2007-10-19 Masami Hiramatsu <mhiramat@redhat.com> - - From Satoru Moriya <satoru.moriya.br@hitachi.com>: - * staplog.c (create_output_dir): New function for creating output - directory. - (create_output_filename): New function for making output filename. - (print_rchan_info): New function for displaying relay channel status. - (open_output_file): New function for opening output file. - (output_cpu_logs): Cleanup code and fix bugs to retrieve buffer - data even when the last buffer is full and even if the systemtap - uses old(non-utt) format. Add a routine for '-a' option. - (cmd_staplog): Add '-a' option. - (help_staplog): Ditto. - -2007-10-18 Mike Mason <mmlnx@us.ibm.com> - - * stapprobes.5.in: Removed C label reference. - Clarified source path requirements for probe - definitions. Fixed some vertical spacing - issues. - -2007-10-18 Mike Mason <mmlnx@us.ibm.com> - - * stapfuncs.5.in: Corrected tokenize description. - Added task_* functions. - -2007-10-16 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes.[ch], uprobes_i386.[ch], - uprobes_ppc64.h, uprobes_s390.h: Adjusted SLOT_IP and - arch_validate_probed_insn to accept task pointer (needed by - x86_64); added uprobe_probept_arch_info and uprobe_task_arch_info - (ditto). - * runtime/uprobes/uprobes_i386.c: Fixed a couple of glitches - discovered when porting to x86_64 - -2007-10-15 Roland McGrath <roland@redhat.com> - - PR 5101 - * loc2c.c (struct location): Replace regno union member with struct - member reg, fields regno and offset. - (translate): Update uses. - (emit_base_fetch, emit_base_store, emit_loc_register): Likewise. - Fail if reg.offset is not zero. - (location_relative): Handle DW_OP_plus_uconst relative to loc_register. - (c_translate_array): Handle array index into loc_register. - -2007-10-15 David Smith <dsmith@redhat.com> - - * tapsets.cxx (mark_query::handle_query_module): Checks for marker - to be in the proper section. - (mark_derived_probe_group::emit_module_decls): Updated emitted - marker C code for 10/2/2007 markers patch. Fixes PR 5178. - - From David Wilder <dwilder@us.ibm.com> - * tapsets.cxx (mark_query::handle_query_module): Updated to handle - 64-bit platforms correctly. - -2007-10-15 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * conversions.stp: Add a function kernel_string_n for copy - non-0-terminated string with fixed length from kernel space at - given address. - * stapfuncs.5.in: Add kernel_string_n. - * nfsd.stp: Using kernel_string_n to copy non-0-terminated string - with fixed length from kernel space at given address. - * nfs_proc.stp: Ditto. - -2007-10-12 David Smith <dsmith@redhat.com> - - * tapsets.cxx (dwflpp::setup): Added 'debuginfo_needed' parameter - to not error if no debuginfo present. - (hex_dump): New function. - (mark_query::handle_query_module): Updated for - 10/2/2007 markers patch. Currently only handles markers in the - kernel image itself - not in modules. - -2007-10-12 Martin Hunt <hunt@redhat.com> - - * Makefile.am (staprun_LDADD): Add -lpthread. - * Makefile.in: Rebuilt. - -2007-10-11 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec.in: Make -testsuite subrpm require dejagnu. - -2007-10-10 Jim Keniston <jkenisto@us.ibm.com> - - * runtime/uprobes/uprobes_ppc64.[ch]: Added - * runtime/uprobes/uprobes_s390.[ch]: Added - -2007-10-09 Jim Keniston <jkenisto@us.ibm.com> - - PR 5083 - * runtime/uprobes/uprobes.c: Adjust module ref-count - when creating or removing uprobe_process, so "rmmod - --wait uprobes" waits as needed until uretprobed - functions return. - -2007-10-08 Jim Keniston <jkenisto@us.ibm.com> - - PR 5079 - * main.cxx: Add pass 4.5: make uprobes.ko in runtime/uprobes - * buildrun.cxx: Add uprobes_enabled() and make_uprobes(). - Factor run_make_cmd() out of compile_pass(). - * buildrun.h: Add uprobes_enabled and make_uprobes decls. - * tapsets.cxx: Do correct #include for modprobed uprobes.ko; - set need_uprobes in pass 2. - * session.h: Add need_uprobes - - * runtime/staprun/common.c: Add -u option -> need_uprobes - * runtime/staprun/staprun_funcs.c: Generalize insert_module() - to support inserting uprobes.ko. - * runtime/staprun/staprun.c: Add enable_uprobes(). insert_module - call becomes insert_stap_module(). - * runtime/staprun/staprun.h: Reflect insert_module() and - need_uprobes changes - - * runtime/uprobes/*.[c,h]: uprobes is built as a module, - rather than included into the source of the stap-generated - module. - * runtime/uprobes/Makefile: Added - -2007-10-05 Frank Ch. Eigler <fche@elastic.org> - - PR 1119 - * elaborate.cxx (semantic_pass_opt[12]): Warn on elided - variables/functions in user script. - * session.h (suppress_warnings): New field. Change - "timing" to plain old bool. - * main.cxx (main): Configure warnings on by default. - * stap.1.in: Document this. - -2007-10-05 Frank Ch. Eigler <fche@elastic.org> - - PR 5036 - * systemtap.spec.in: Create new systemtap-testsuite sub-rpm. - Install crash(8)'s staplog.so into -runtime sub-rpm if built. - * Makefile.am (rpm): New target. - * Makefile.in: Regenerated. - -2007-10-04 Frank Ch. Eigler <fche@elastic.org> - - * stapfuncs.5.in: Document inet.stp tapset functions. - -2007-10-04 David Smith <dsmith@redhat.com> - - * buildrun.cxx (compile_pass): Tweaked build system for the - 2.6.23-rc8-mm2 kernel. - -2007-10-03 Frank Ch. Eigler <fche@elastic.org> - - PR 5102 - * translate.cxx (visit_statement): Add new parameter regarding whether - c->last_stmt needs to be updated. Update callers, mostly passing - "false". - (visit_EXPRESSIONTYPE): Generally omit setting c->last_stmt, unless - the construct can set c->last_error. - -2007-10-03 Frank Ch. Eigler <fche@elastic.org> - - PR 5096 - * translate.cxx (emit_function): Put nesting limit/control logic into - function body ... - (visit_functioncall): ... and not into each call site. - -2007-10-02 Frank Ch. Eigler <fche@redhat.com> - - PR 3635 - * translate.cxx (emit_global): Wrap all globals and locks into one - top-level struct. Update references to former "global_VAR" prefix. - * translate.h (emit_global_init): New function. - -2007-10-02 Frank Ch. Eigler <fche@redhat.com> - - PR 5078 - * tapsets.cxx (be_derived_probe): Rework to add error probe support. - Emit probe description array in C for traversal by generated code. - * register_standard_tapsets: Add error probes. - * stapprobes.5.in: Document. - * translate.cxx (emit_module_init): Handle errors that may occur - during begin probes. - (emit_module_exit): Use schedule() rather than cpu_relax() during - shutdown synchronization wait loop. - * staptree.cxx (probe::printsig): Put multiple probe points on same - line. - -2007-09-28 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.in: Regenerated from Jim Keniston's uprobes Makefile.am - changes. - -2007-09-25 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (translator_output::~translator_output): Fix mismatched - delete / delete []. - -2007-09-25 David Smith <dsmith@redhat.com> - - * tapsets.cxx (mark_query::handle_query_module): Updated for - 9/18/2007 markers patch. - (mark_derived_probe::parse_probe_sig): Ditto. - (mark_derived_probe_group::emit_module_decls): Ditto. - (mark_derived_probe_group::emit_module_init): Ditto. - (mark_derived_probe_group::emit_module_exit): Ditto. - -2007-09-24 Masami Hiramatsu <mhiramat@redhat.com> - - PR 3916 - * buildrun.cxx (compile_pass): Add new autoconf options for checking - time related APIs. - -2007-09-21 Frank Ch. Eigler <fche@elastic.org> - - rhbz #300121 - * elaborate.cxx (dead_stmtexpr_remover): Add visit_if_statement, - visit_foreach_loop, visit_for_loop): Support elision for unbraced - statement bodies. - (visit_expr_statement): Assert absence of unexpected nesting. - -2007-09-17 David Smith <dsmith@redhat.com> - - PR 1154 - * stapprobes.5.in: Documented procfs probes. - - * tapsets.cxx (procfs_builder::build): Validate procfs path. - -2007-09-14 David Smith <dsmith@redhat.com> - - PR 1154 - * tapsets.cxx - (procfs_var_expanding_copy_visitor::visit_target_symbol): - Disallows reading from $value in a procfs read probe. - -2007-09-14 David Smith <dsmith@redhat.com> - - PR 1154 - * tapsets.cxx (procfs_derived_probe_group::emit_module_init): - Fixed problem where if only one type (read/write) of procfs probe - was defined, the generated code wouldn't compile. - -2007-09-13 David Smith <dsmith@redhat.com> - - PR 1154 - * tapsets.cxx (procfs_derived_probe::procfs_derived_probe): - Removed debug print. - (procfs_derived_probe_group::emit_module_decls): Improved error - handling and added support for procfs.write probes. - (procfs_var_expanding_copy_visitor::visit_target_symbol): Removed - debug print. - -2007-09-12 Frank Ch. Eigler <fche@elastic.org> - - * parse.cxx (parse_symbol): Accept println(@hist*()). - -2007-09-12 Frank Ch. Eigler <fche@elastic.org> - - PR 5023 - * translate.cxx (c_unparser::visit_literal_number): Support LLONG_MIN. - (visit_unary_expression): Likewise. - -2007-09-12 Martin Hunt <hunt@redhat.com> - - PR 5019 - * elaborate.cxx (visit_hist_op): Remove log histogram param. - * translate.cxx (assert_hist_compatible): Ditto. - * staptree.cxx (hist_op::print): Ditto. - * session.h (statistic_decl): Ditto. - - * parse.cxx (expect_number): Allow negative numbers. - Also validate that input is really numeric. This is used - by histograms to get the parameters. - (parse_hist_op_or_bare_name): Remove code to get parameter - for log histograms. - -2007-09-12 David Smith <dsmith@redhat.com> - - * translate.cxx (c_unparser::emit_common_header): Added 'data' - variable to context structure to support procfs probes. - * tapsets.cxx: Improved procfs probe handling. - -2007-09-10 David Smith <dsmith@redhat.com> - - * tapsets.cxx (procfs_derived_probe_group::emit_module_init): - Improved procfs probe handling (still non-working). - (procfs_builder::build): Ditto. - (register_standard_tapsets): Ditto. - (all_session_groups): Ditto. - -2007-09-10 Martin Hunt <hunt@redhat.com> - - * tapsets.cxx, session.h, elaborate.cxx: Start of procfs - interaction support. PR 1154. - -2007-09-06 Masami Hiramatsu <mhiramat@redhat.com> - - PR 4542 - * tapsets.cxx (dwarf_query::build_blacklist): add __switch_to to - blacklisted_return_probes on i686 - -2007-08-30 David Smith <dsmith@redhat.com> - - PR 4983 - * translate.cxx (c_tmpcounter::visit_print_format): Don't declare - temporaries for number and string constants. - (c_unparser::visit_print_format): Use numeric and string constants - directly instead of copying them into temporaries. - -2007-08-27 Frank Ch. Eigler <fche@redhat.com> - - PR 4817 - * NEWS: Mention retirement of LKET. - * configure.ac: Remove mysql dependency. - * systemtap.spec.in: Remove glib2 dependency. - * configure, config.in: Regenerated. - -2007-08-24 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Check for proper $PROCFLAGS-dependent -lcap. - * Makefile.am (staprun_LDADD): Use autoconf variable rather than - -lcap literal. - * configure, aclocal.m4, Makefile.in, config.in: Regenerated. - -2007-08-24 Frank Ch. Eigler <fche@redhat.com> - - PR 4899 - * tapsets.cxx (dwflpp::has_single_line_record): Extended, - abstraction violated. - (iterate_over_srcfile_lines): Remove exactly line number match - logic. Improve error message to offered better-checked alternative - line numbers. - (query_srcfile_line): Whoops, pass scope_die down for statement("...") - probes, to enable $target var processing. - -2007-08-21 David Smith <dsmith@redhat.com> - - PR 2305 - * translate.cxx (c_unparser::visit_foreach_loop): When the user - requested sorting an array of aggregates by value, sort by - @count. - -2007-08-20 Martin Hunt <hunt@redhat.com> - - PR 2424 - From Lai Jiangshan <laijs@cn.fujitsu.com: - * util.cxx (cmdstr_quoted): New. Properly quote - command string. - * buildrun.cxx (run_pass): Call cmdstr_quoted(). - -2007-08-20 Frank Ch. Eigler <fche@elastic.org> - - From Satoru MORIYA <satoru.moriya.br@hitachi.com> - * staplog.c: Updated. - -2007-08-20 David Smith <dsmith@redhat.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * main.cxx (main): Make sure the '-c' and '-x' options can't be - specified together. - -2007-08-17 Frank Ch. Eigler <fche@elastic.org> - - As suggested by "Zhaolei" <zhaolei@cn.fujitsu.com>: - * elaborate.cxx (semantic_pass_optimize[12], - unresolved, invalid, mismatch): Use stringstream and - print_error(semantic_error) instead of ad-hoc cerr. - -2007-08-16 Frank Ch. Eigler <fche@elastic.org> - - PR 1315. - * stapfuncs.5.in: Document new target_set tapset. - -2007-08-16 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (install-exec-hook): Only make staprun setuid if - "make install" is being run as root. - * Makefile.in: Regenerated. - -2007-08-16 Josh Stone <joshua.i.stone@intel.com> - - PR 4591 - * parse.cxx (parser::parse_symbol): Tweak 'print' matching to allow - all the new variants with printd and println. - * staptree.h (struct print_format): Add fields for the new print - variants, and parse_print() to help matching. - * staptree.cxx (print_format::parse_print): New static method to - match the print variants and determine their properties. - (print_format::print): Handle the new print types. - (deep_copy_visitor::visit_print_format): Copy the new fields. - * translate.cxx (c_unparser::visit_print_format): Insert delims and - newlines where appropriate for new print functions. - * stap1.in: Document the new print functions. - -2007-08-15 David Smith <dsmith@redhat.com> - - * systemtap.spec.in: Updated %pre to latest Fedora group creation - guidelines. - - * stap.1.in: Changed '/usr' to '@prefix@' so the values will be - updated correctly. - * stapfunc.5.in: Ditto. - - * README.security: Typo fix. - -2007-08-15 Martin Hunt <hunt@redhat.com> - - * Makefile.am: Removed stap_merge. - * Makefile.in: Rebuilt. - -2007-08-14 David Smith <dsmith@redhat.com> - - Merge from setuid-branch. Changes also by Martin Hunt - <hunt@redhat.com>. - - * Makefile.am: Added staprun_funcs.c and cap.c to - staprun_SOURCES. Added -lcap to staprun_LDADD. Removed - stp_check reference. Added stapio program. Staprun is now - setuid. - * Makefile.in: Rebuilt. - - * configure.ac: Version increase to 0.6 and checks for libcap - availability. Removed stp_check reference. - * configure: Regenerated. - * stp_check.in: Removed. - - * systemtap.spec.in: Version increase to 0.6-1 and added - BuildReq for libcap-devl (and removed sudo requirement). - Added %pre script to create new groups. Staprun is now - setuid. - - * NEWS: Added info on new security model. - * INTERNALS: Removed sudo reference. - - * README.security: New file. - - * main.cxx (main): Make sure module name isn't too long. - * hash.cxx: Moved MODULE_NAME_LEN define to hash.h. - * hash.h: Moved MODULE_NAME_LEN define here from hash.cxx. - - * buildrun.cxx (run_pass): No longer runs staprun with "sudo". - - * stap.1.in: Removed sudo references and added information about - the stapdev/stapusr groups. - * staprun.8.in: Added information about module detaching and - attaching. Removed sudo references and added information - about the stapdev/stapusr groups. Removed reference to - staprun needing to be run as root. Removed reference to - removed '-u USERNAME' option. - - * .cvsignore: Removed stp_check and added stapio and stap_merge. - -2007-08-10 Josh Stone <joshua.i.stone@intel.com> - - PR 4593 - * translate.cxx (c_unparser::emit_common_header): Add an - error_buffer to the context to allow dynamic error messages. - * tapsets.cxx (dwflpp::express_as_string): Let deref / store_deref - fill in last_error with a detailed message. - -2007-08-09 Frank Ch. Eigler <fche@elastic.org> - - From Lai Jiangshan <laijs@cn.fujitsu.com>: - * translate.cxx (emit_module_exit): Use stp_warn for warning. - -2007-08-07 Frank Ch. Eigler <fche@redhat.com> - - PR 4846 - * parse.cxx (input_put): New function, sort of like stdio ungetc. - (input_get): Skip cursor position changing for input_put strings. - (scan): Rework $.../@... substitution into character pasting. - * parse.h: Corresponding changes. - * util.h (lex_cast_qstring): Octal-quote unprintable characters. - * stap.1.in, NEWS: Document new behaviour. - -2007-07-26 David Smith <dsmith@redhat.com> - - PR 4295 - * main.cxx (main): If '-m MODNAME' is used, the generated module - is saved in the current directory. - * stap.1.in: Updated '-m' description. - -2007-07-11 William Cohen <wcohen@redhat.com> - - * systemtap.spec.in: Make sqlite support selectable. - -2007-07-11 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Don't AC_MSG_ERROR if don't HAVE_LIBSQLITE3. - * coveragedb.cxx: Compile to nothing unless HAVE_LIBSQLITE3. - * main.cxx: Print no error message on -q if HAVE_LIBSQLITE3. - * configure: Regenerated, looks rosier with HAVE_LIBSQLITE3. - -2007-07-08 William Cohen <wcohen@redhat.com> - - PR 4529 - * coveragedb.cxx (update_coverage_db): Make index "unique" to optimize. - -2007-07-08 William Cohen <wcohen@redhat.com> - - PR 4529 - * coveragedb.h (db_type): New enum for type column in coverage_element. - (coverage_element): Remove removed column, change type to int. - * coveragedb.cxx (has_table, has_index): New. - (update_coverage_db): Use has_table, has_index. - (enter_element): Change for new table format. - (increment_element): Ditto. - (sql_update_used_probes): Ditto. - (sql_update_unused_probes): Ditto. - (sql_update_used_functions): Ditto. - (sql_update_unused_functions): Ditto. - (sql_update_used_globals): Ditto. - (sql_update_unused_globals): Ditto. - (update_coverage_db): Ditto. - (print_coverage_info(systemtap_session): Relocate vector. - (sql_update_used_probes): Ditto. - (sql_update_unused_probes): Ditto. - -2007-07-03 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bumped version to 0.5.15 for development. - * configure: Regenerated. - -2007-07-03 Roland McGrath <roland@frob.com> - - * Makefile.am (install-exec-local, install-elfutils): Use $(DESTDIR). - (SRCDIR): Variable removed. - (check): Use sh code in commands instead. - * Makefile.in: Regenerated. - -2007-07-02 William Cohen <wcohen@redhat.com> - - PR 4717 - From Eugeniy Meshcheryakov <eugen@debian.org> - * staptree.cxx: Add #include <cstdlib> for gcc 4.3. - -2007-07-02 Frank Ch. Eigler <fche@rechat.com> - - * staplog.c: New file from Satoru MORIYA - <satoru.moriya.br@hitachi.com>, prototype crash(8) extension module. - * configure.ac: Look for crash/defs.h. - * Makefile.am: Build/install staplog.so shared library if found. - * configure, Makefile, config.in, runtime/lket/b2a/Makefile.in: - Regenerated. - -2007-07-02 William Cohen <wcohen@redhat.com> - - PR 4720 - * staptree.cxx (probe_point::print): Remove stray output. - -2007-06-29 William Cohen <wcohen@redhat.com> - - PR 4529 - * configure.ac: - * Makefile.am: Limit where sqlite3 linked in. - * configure: - * Makefile.in: Regenerate. - -2007-06-29 William Cohen <wcohen@redhat.com> - - PR 4529 - * configure.ac: - * Makefile.am: Limit where sqlite3 linked in. - * configure: - * Makefile.in: Regenerate. - - * coveragedb.cxx (update_coverage_db): Remove unneeded print. - * coveragedb.cxx (increment_element): Correct formatting. - -2007-06-26 William Cohen <wcohen@redhat.com> - - * staptree.cxx (probe_point::print): Remove stray "\n". - -2007-06-26 William Cohen <wcohen@redhat.com> - - PR 4529 - * coveragedb.cxx: New. - * coveragedb.h: New. - * Makefile.am: Add coveragedb.cxx and sqlite3 to build. - * Makefile.in: Regenerated. - * configure.ac: Add test for sqlite3 - * configure: Regenerated. - * systemtap.spec.in: Add dependencies for sqlite3/sqlite3-devel. - * elaborate.h, elaborate.cxx - (derived_probe::collect_derivation_chain): New. - (alias_expansion_builder::build): Correct token location. - (semantic_pass_opt[12): Track used and unused variables/functions. - * session.h (tapset_compile_coverage, unused_globals, - unused_probes, unused_functions): New fields. - * staptree.h (unused_locals, probe_point::str): New member. - * staptree.cxx: Ditto. - * main.cxx: Add "-q" tapset coverage option and SYSTEMTAP_COVERAGE env. - -2007-06-21 David Smith <dsmith@redhat.com> - - * Makefile.in: Regenerated with automake 1.10. - * aclocal.m4: Regenerated with aclocal 1.10. - * configure: Regenerated. - -2007-06-20 Martin Hunt <hunt@redhat.com> - - * Makefile.am (noinst_PROGRAMS): Add stap_merge. - * Makefile.in: Rebuilt: - * config.in: Rebuilt - -2007-06-20 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Added AM_PROG_CC_C_O for compatibility with - automake 1.10. - * configure, aclocal.m4: Regenerated. - -2007-06-20 David Smith <dsmith@redhat.com> - - * buildrun.cxx (compile_pass): Unset environment variables that - could interfere with building the kernel module. Fixes PR 4664. - * main.cxx (main): Unsets a few standard environment variables for - safety. - -2007-06-18 David Smith <dsmith@redhat.com> - - * staprun.8.in: Fixed a couple of typos. - -2007-06-15 Frank Ch. Eigler <fche@elastic.org> - - PR 3331 cont'd. - * loc2c.c (base_encoding): Tolerate absenece of DW_AT_encoding. - (c_translate_pointer): Don't even try to find signedness, assume - unsigned. - -2007-06-14 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_module_init): Emit translator/elfutils - version numbers together. - * main.cxx (version): Ditto. - (main): Skip printing tapset directories where no sources were found. - -2007-06-14 Frank Ch. Eigler <fche@elastic.org> - - PR 3331 cont'd. - * loc2c.c (emit_base_fetch): Emit size/signedness cast - slightly differently for every low-level fetch. - (translate_base_fetch, c_translate_fetch, c_translate_store, - c_translate_pointer): Fetch & pass the $target signedness. - (base_encoding): Follow typedefs etc. - -2007-06-09 Frank Ch. Eigler <fche@elastic.org> - - PR 4609 - From Eugeniy Meshcheryakov <eugen@debian.org> - * staptree.cxx: Add #include <algorithm> for gcc 4.3. - -2007-06-08 David Smith <dsmith@redhat.com> - - PR 4553. - * configure.ac: For x86 systems with gcc versions less than 4, - automatically default to enabling prologue searching. - * configure: Regenerated. - -2007-06-05 Frank Ch. Eigler <fche@redhat.com> - - PR 3331. - * loc2c.c (emit_base_fetch): Emit size/signedness cast - for every low-level fetch. - (translate_base_fetch, c_translate_fetch, c_translate_store, - c_translate_pointer): Fetch & pass the $target signedness. - -2007-05-31 Frank Ch. Eigler <fche@elastic.org> - - PR 3579 - From Eugeniy Meshcheryakov <eugen@debian.org> - * cache.cxx, parse.cxx: Add #include <cstring> for gcc 4.3. - -2007-05-30 Frank Ch. Eigler <fche@redhat.com> - - PR 4567. - * staptree.cxx (varuse_collecting_visitor): Add side-effect - result query functions. - * elaborate.cxx (dead_stmtexpr_remover::visit_expr_statement): - Switch to it. - (dead_assignment_remover::visit_assignment): Skip elision of - lvalues with side-effects in index exprs. - * staptree.h: Corresponding changes. - -2007-05-25 Frank Ch. Eigler <fche@redhat.com> - - PR 4255 teaser. - * elaborate.cxx (has_null_param): New function. - * elaborate.h: Declare it. - * session.h: Include uprobe_derived_probes group. - * tapsets.cxx (uprobe_*): New classes. - (all_session_groups): List uprobes in list. - (register_standard_tapset): Interpret - process(#).statement(#).absolute and - process(#).statement(#).absolute.return probe points. - -2007-05-25 Martin Hunt <hunt@redhat.com> - - Patch from Quentin Barnes. - * tapsets.cxx (query_module): Add support for arm. - -2007-05-21 David Smith <dsmith@redhat.com> - - PR 4446. - * elaborate.h (derived_probe::initialize_probe_context_vars): New - virtual function that will allow added context vars to be - initialized. - * translate.cxx (c_unparser::emit_common_header): Added - 'mark_va_list'. - (c_unparser::emit_probe): Calls new function - initialize_probe_context_vars. - (translate_pass): Includes linux/marker.h if CONFIG_MARKERS is - defined. - * tapsets.cxx (struct dwarf_query): Split into base_query (which - contains most of the original code) and a much smaller - dwarf_query class. - (struct base_query): New class. - (dwarf_query::handle_query_module): New function. - (query_module): Moved code into dwarf_query::handle_query_module(). - (mark_derived_probe): Adjusted for new kernel markers. - (mark_derived_probe_group): Ditto. - (mark_var_expanding_copy_visitor): Ditto. - (mark_var_expanding_copy_visitor::visit_target_symbol): Generates - code for new kernel markers. - (struct mark_query): New class. - (mark_query::handle_query_module): New function. - (mark_derived_probe::mark_derived_probe): Adjusted for new kernel - markers. - (mark_derived_probe::join_group): Ditto. - (mark_derived_probe::emit_probe_context_vars): Ditto. - (mark_derived_probe::parse_probe_sig): New function. - (mark_derived_probe::initialize_probe_context_vars): New function. - (mark_derived_probe::emit_module_decls): Adjust for new kernel markers. - (mark_derived_probe::emit_module_init): Ditto. - (mark_derived_probe::emit_module_exit): Ditto. - (struct mark_builder): Ditto. - (mark_builder::build): Ditto. - -2007-05-08 Martin Hunt <hunt@redhat.com> - - * buildrun.cxx (run_pass): Send proper verbosity - level to staprun - -2007-05-06 Frank Ch. Eigler <fche@elastic.org> - - PR 1305. - * tapsets.cxx (iterate_over_srcfile_lines): Exclude approximate - file:lineno matches optimistically returned by dwarf_getsrc_file. - (query_srcfile_line): Use Dwarf_Line line number for constructing - derived_probe location string. - -2007-05-02 David Smith <dsmith@redhat.com> - - * translate.cxx (c_tmpcounter::visit_functioncall): Updated - temporary handling. - (c_unparser::visit_functioncall): No longer copies numeric and - string constants to temporary variables. - -2007-05-01 David Smith <dsmith@redhat.com> - - * translate.cxx (c_tmpcounter::visit_binary_expression): Updated - temporary handling. - (c_unparser::visit_binary_expression): Improved handing of numeric - constants when handling '%' and '/' operators. - (c_tmpcounter::visit_print_format): Updated temporary handling. - (c_unparser::visit_print_format): Removed the need for a result - temporary when printing to a stream. - -2007-04-30 David Smith <dsmith@redhat.com> - - PR 2339 - * translate.cxx (c_unparser_assignment::c_assignop): Improved - handling of numeric constants in the rest of the assignment - operators. - (c_tmpcounter_assignment::c_assignop): Updated temporary - handling. - -2007-04-29 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Mention testsuite/configure.ac for version matching. - -2007-04-27 Frank Ch. Eigler <fche@elastic.org> - - PR 4432. - * buildrun.cxx (compile_pass): Tweak autoconf CFLAGS handling to - avoid macro recursion but still get the needed -I directives. - Add the inode-private autoconf test. - -2007-04-26 Frank Ch. Eigler <fche@elastic.org> - - PR 4432. - * buildrun.cxx (compile_pass): Add $(mflags-y) to stap_check_build. - -2007-04-26 Frank Ch. Eigler <fche@elastic.org> - - * buildrun.cxx (compile_pass): Correct placement of commented-out - "set -x" make-macro-debugging snippet. - -2007-04-25 David Smith <dsmith@redhat.com> - - PR 2339 - * translate.cxx: Renamed "qname" to "value" throughout, since - there are times now when qname would refer to a constant value. - (tmpvar::override): Added function to allow for overriding a - temporary variable name with a string. - (tmpvar::value): New function that returns either the overridden - string or the temporary variable name. - (c_unparser::c_expression): New function. - (c_unparser_assignment::c_assignop): Speed up assignment when - numeric or string constants are used. - (c_tmpcounter::visit_block): Avoid empty structs inside the union - of temporary variables. - (c_tmpcounter_assignment::prepare_rvalue): New function. - (c_tmpcounter_assignment::c_assignop): New function. - (c_tmpcounter_assignment::visit_symbol): Update temporary - declarations. - (c_unparser_assignment::prepare_rvalue): Speed up use of rvalues - by using numeric and string constants directly instead of copying - them to temporaries first. - (c_tmpcounter::load_map_indices): New function. - (c_unparser::load_map_indices): Speed up use of numeric and string - constants as map indices. - (c_tmpcounter::visit_arrayindex): Updated temporary declarations. - (c_tmpcounter_assignment::visit_arrayindex): Updated temporary - declarations. - * translate.h (class translator_output): Added tellp() and seekp() - functions. - -2007-04-24 Mike Mason <mmlnx@us.ibm.com> - - * man/stapprobes.socket.5.in: Removed do_write and do_read probes, - added aio_write, aio_read, writev and readv probes. - -2007-04-24 David Smith <dsmith@redhat.com> - - * tapsets.cxx (common_probe_entryfn_epilogue): Increment - error_count when overload processing kicks in. - -2007-04-24 Martin Hunt <hunt@redhat.com> - - * stp_check.in: More tweaking of mount statement. - -2007-04-23 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (die_entrypc): Expand search algorithm to - check for "aranges", as sometimes occurs for inlined functions. - -2007-04-20 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in (elfutils_version): Bump to 0.127. - -2007-04-18 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (install-elfutils): Use $INSTALL_PROGRAM to - copy elfutils shared libraries, as suggested by Perry Cheng - <perryche@us.ibm.com>. - -2007-04-18 Frank Ch. Eigler <fche@elastic.org> - - * parse.cxx (scan_pp): Correct warnings from if/if/else nesting. - -2007-04-10 Martin Hunt <hunt@redhat.com> - - * stp_check.in: Fixes to make sure debugfs or relayfs are mounted - exactly where we expect and other mounts are ignored. - -2007-04-03 Pierre Peiffer <pierre.peiffer@bull.net> - - * parse.cxx, parse.h (lexer::scan): Add $# and @# identifiers. - (eval_pp_conditional, scan_pp): Allow the use of $x and @x identifiers. - Produce more accurate error messages. - * stap.1.in: Document $# and @# identifiers. - -2007-04-04 Frank Ch. Eigler <fche@elastic.org> - - GCC 4.3 compatibility patches from Debian. - * buildrun.cxx, hash.cxx, tapsets.cxx, translate.cxx: #include a few - more C++ headers. - -2007-04-03 Frank Ch. Eigler <fche@elastic.org> - - Improve error messages for underprivileged scripts. - * parse.h (parse_error): Add skip_some member, true default. - * parse.cxx (parse_embedded_code): Send false on missing -g. - * parse.cxx (parser::parse): Respect flag during parse error - recovery. - -2007-04-02 Frank Ch. Eigler <fche@redhat.com> - - PR 3261. - * tapsets.cxx (query_module): Reject elfutils module "kernel" - unless kernel.* probe point used. - -2007-04-02 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (query_dwarf_func): Skip non-inlined functions - for .function().inline case. - -2007-03-30 Frank Ch. Eigler <fche@redhat.com> - - PR 1570 - * NEWS: Document probe handler language change re. inline functions. - * stapprobes.5.in: Likewise. - * tapsets.cxx: Many changes to simplify caches and implement new - handling of inline functions, removed of stubs for future probes. - * elaborate.cxx (derived_probe printsig_nested): New function. - * elaborate.h: Declare it. - * main.cxx (usage): Clarify "-r" meaning. - (main): Tweak related "-p 4" message. - -2007-03-30 David Smith <dsmith@redhat.com> - - PR 2341 - * translate.cxx (c_unparser::emit_locks): No longer emits a read - lock for global variables that are only written to in begin/end - probes. - (c_unparser::emit_unlocks): Ditto. - (translate_pass): Runs a varuse_collecting_visitor over probes - that need global variable locks for use in - emit_locks()/emit_unlocks(). - - * stap.1.in: Corrected probe overload processing text. - -2007-03-29 David Smith <dsmith@redhat.com> - - PR 3545 - * stap.1.in: Documented probe overload processing. - -2007-03-29 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (dwarf_derived_probe emit_module_init): Correct handling - of kprobe registration errors in the middle of a sequence. - -2007-03-29 David Smith <dsmith@redhat.com> - - PR 4281 - * main.cxx (main): Validates '-m NAME' option. Chops off '.ko' if - present. Makes sure name isn't empty. Makes sure name is only - composed of characters [_a-zA-Z0-9]. - -2007-03-28 David Smith <dsmith@redhat.com> - - PR 2341 (partial fix) - * elaborate.h (struct derived_probe): Added needs_global_locks() - member function. Unless overridden, will return true indicating - that this probe needs locks around global variable references. - * tapsets.cxx (struct be_derived_probe): Added override of default - needs_global_locks() returning false. begin/end probes don't - need locks around global variables, since they aren't run - concurrently with any other probes. - * translate.cxx (c_unparser::emit_common_header): Updated - probe_contents logic to match the logic in emit_probe. - (c_unparser::emit_probe): Added whether the probe needs global - variable locks to the probe string (that helps eliminate duplicate - probes). The generated C changes based on whether or not global - variable locks are needed, but the pass 2 output doesn't differ - between a probe that needs global variable locks and one that - doesn't. If the probe doesn't need global variable locks, doesn't - output them. - -2007-03-26 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bumped version to 0.5.14. - * configure: Regenerated. - -2007-03-26 David Smith <dsmith@redhat.com> - - * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Improved - error messages for invalid types. - - * elaborate.cxx (typeresolution_info::invalid): Improved the error - message for invalid operators. - -2007-03-22 Frank Ch. Eigler <fche@elastic.org> - - PR 4224. - * staptree.h (probe): Add privileged field. - * elaborate.cxx, parse.cxx: Pass privileged flag to probes. - * tapsets.cxx (dwarf_query): Add has_absolute field. - (dwarf_derived_probe ctor): Tolerate it. - (register_patterns): Expose it. - (dwarf_builder::build): Implement it with no dwfl whatsoever. - * NEWS: Document kernel.statement().absolute. - * stapprobes.5.in: Ditto. - -2007-03-21 Will Cohen <wcohen@redhat.com> - - * Makefile.am: - * Makefile.in: Correct SAMPLE_SRC. - -2007-03-21 David Smith <dsmith@redhat.com> - - PR 4146 - * tapsets.cxx (common_probe_entryfn_prologue): Added - 'interruptible' parameter. If a probe is interruptible, - interrupts are not disabled while the probe executes. Preemption - is disabled however. Interruptible parameter defaults to false. - (common_probe_entryfn_epilogue): Ditto. - (be_derived_probe_group::emit_module_decl): Uses new - 'interruptible' parameter to mark begin/end probes as - interruptible. - (probe_derived_probe_group::emit_module): Initialize - 'actionremaining' with MAXACTION instead of initializing - 'actioncount' with 0. - * translate.cxx (emit_common_header): Renamed 'actioncount' to - 'actionremaining'. Turned logic around to initialize - actionremaining to MAXACTION or MAXACTION_INTERRUPTIBLE then - decrement it as actions occur. - (translate_pass): Added MAXACTION_INTERRUPTIBLE initialization. - * translate.h: Removed outdated comment portion. - * stap.1.in: Documented MAXACTION_INTERRUPTIBLE. - * NEWS: Added note about begin/end probes being run with - interrupts enabled. - -2007-03-20 Frank Ch. Eigler <fche@elastic.org> - - PR 4224. - * tapsets.cxx (add_probe_point): Make kernel implicitly relocated - relative to the _stext symbol. - (dwarf_derived_probe ctor, emit_module_decls): Cooperate. - (lookup_symbol_address): New function. - (dwarf_builder::build): Call it thrice. - (in_kprobes_function): Simplify. - * session.h (systemtap_session): Rename cached symbol addresses. - * translate.cxx, elaborate.cxx: Corresponding tweaks. - -2007-03-19 David Smith <dsmith@redhat.com> - - PR 4146 (partial fix) - * tapsets.cxx (all_session_groups): Added note about stating that - begin probes should be registered (actually run) first and end - probes should be unregistered (run) last. - * translate.cxx (c_unparser::emit_module_exit): Process probe - group vector in reverse order so that probe groups will get - unregistered in the reverse order that they were registered. - -2007-03-19 Frank Ch. Eigler <fche@elastic.org> - - * buildrun.cxx (compile_pass): Emit kbuild-time autoconf widgets - to customize runtime or translator C code to actual kernel rather - than kernel version string. Thanks to FC 2.6."20" for the nudge. - * tapsets.cxx (hrtimer*emit_module): First client: HRTIMER_{MODE_}REL. - -2007-03-17 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Tweak missing elfutils error message. - * configure: Regenerated. - -2007-03-16 David Smith <dsmith@redhat.com> - - PR 3545. - * tapsets.cxx (common_probe_entryfn_prologue): Added - 'overload_processing' parameter, which defaults to true. If - overload_processing is set to false, doesn't output the - STP_OVERLOAD code. - (common_probe_entryfn_epilogue): Ditto. - (be_derived_probe_group::emit_module_decl): Set - overload_processing to false in calls to - common_probe_entryfn_prologue and common_probe_entryfn_epilogue - since begin/end probes shouldn't overload the system. - * translate.cxx (c_unparser::emit_common_header): Emit - STP_OVERLOAD global variables. - (translate_pass): Emit STP_OVERLOAD defines. - -2007-03-14 Martin Hunt <hunt@redhat.com> - * main.cxx (usage): Remove "-M" and edit description - of "-b". - * stap.1.in: Remove "-M" option and edit description of "-b". - Edit description of "-o". - -2007-03-14 Martin Hunt <hunt@redhat.com> - * Makefile.am: Don't install old relayfs sources. - * makefile.in: Rebuilt. - -2007-03-14 Martin Hunt <hunt@redhat.com> - - * Makefile.am (staprun_SOURCES): Sources now live in - runtime/staprun. - * makefile.in: Rebuilt. - - * staprun.8.in: Updated. - - * buildrun.cxx (run_pass): Use "-v" instead of not "-q" to - be compatible with latest staprun. - * translate.cxx (emit_module_exit): Print warning using - _stp_printf so it shows up at the end of all output. - (translate_pass): Replace STP_RELAYFS with STP_BULKMODE. - Eliminate STP_RELAYFS_MERGE. - -2007-03-13 Frank Ch. Eigler <fche@redhat.com> - - PR 4171. - * Makefile.am (check, installcheck): Pass build-tree pointers - in environment variables. - * configure.ac: Run separate configury for testsuite/. - * configure, Makefile.in: Regenerated. - -2007-03-07 Frank Ch. Eigler <fche@elastic.org> - - PR 4166. - * tapsets.cxx (translate_components): Throw an exception rather - then suffer an assertion failure for $ptr[index] expressions. - -2007-03-05 David Smith <dsmith@redhat.com> - - * systemtap.spec.in: Made example perl script non-executable so - that the systemtap rpm won't require perl. - -2007-03-04 Frank Ch. Eigler <fche@redhat.com> - - * stap.1.in, stapex.5.in, staprun.8.in: Tweak text to remove - authors credits, update examples and pointers. - -2007-02-28 David Smith <dsmith@redhat.com> - - * systemtap.spec.in: Fixed %{_libexecdir}/systemtap path in - systemtap-runtime %files section. - -2007-02-27 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec.in (/var/cache/systemtap): Forget it. - (stp_check): Pack this in with systemtap-runtime. - * stp_check.in: Add LANG=C for speed. - -2007-02-27 David Smith <dsmith@redhat.com> - - * staprun.8.in: Added a basic staprun man page. - * Makefile.am: Added staprun.8. - * Makefile.in: Regenerated. - * configure.ac: Added staprun.8. - * configure: Regenerated. - * systemtap.spec.in: Added staprun.8 and other document files to - staprun RPM. - * .cvsignore: Ignores staprun.8. - -2007-02-27 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (dwflpp setup): Print "missing kernel debuginfo" - message consistently for, er, missing kernel debuginfo. - (dwarf_builder::build): Don't try to help. - (query_kernel_exists): Zapped. - -2007-02-27 David Smith <dsmith@redhat.com> - - * systemtap.spec.in: Fedora Packaging Guidelines updates. Updated - BuildRoot macro value to Fedora Extras standard value. No longer - uses %makeinstall macro. The rpm now owns the - /usr/libexec/systemtap directory. - -2007-02-26 David Smith <dsmith@redhat.com> - - * Makefile.am: Removed 'update-examples' target. Moved - functionality to systemtap.spec.in. - * Makefile.in: Regenerated from Makefile.am. - * systemtap.spec.in: Fixes paths in the example scripts directly. - - * Makefile.am: Added 'update-examples' target that fixes paths in - the example code we ship in the rpm. - * Makefile.in: Regenerated from Makefile.am. - * systemtap.spec.in: Calls "make update-examples" target to fix - the path to systemtap in the example scripts. - -2007-02-25 Frank Ch. Eigler <fche@redhat.com> - - * elaborate.h (match_node, derived_probe_builder): Add - build_no_more member function. - * elaborate.cxx (semantic_pass_symbols): Call it. - * tapsets.cxx (dwarf_builder): Implement it by releasing dwflpp - instance after pass 2, freeing mucho memory. - -2007-02-23 Josh Stone <joshua.i.stone@intel.com> - - PR 4096 - * tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls): - Adapt the function signature for changes in 2.6.21. - (hrtimer_derived_probe_group::emit_module_init): Fix the enum name - for 2.6.21 as well. - -2007-02-19 Frank Ch. Eigler <fche@elastic.org> - - PR 4078 and more, including patch from - Eugeniy Meshcheryakov <eugen@debian.org>: - * Makefile.am (AM_CXXFLAGS, AM_CFLAGS): Add -Wextra -Wall -Werror - consistently. - * Makefile.in: Regenerated. - (*): Many minor warning fixes. - -2007-02-17 Frank Ch. Eigler <fche@elastic.org> - - PR 4066. - * translate.cxx (var::init): Check stat scalar initialization, - just like is done for arrays. - (emit_module_exit): Check unlikely but possible null timing stat. - -2007-02-15 David Smith <dsmith@redhat.com> - - PR 3625. - * tapsets.cxx (dwflpp::print_locals): New function to print all - the variables/parameters of a function. - (dwflpp::find_variable_and_frame_base): Calls print_locals() when - target variable can't be found. - (dwflpp::print_members): New function to print all the members of - a union/structure. - (dwflpp::translate_components) Calls print_members() when - union/structure member target variable reference can't be found. - -2007-02-14 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (emit_module_decls): Assert CONFIG_KPROBES, - as suggested by Andreas Kostyrka <andreas@kostyrka.org>. - -2007-02-12 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (query_statement): Tolerate null file name string. - -2007-02-09 Frank Ch. Eigler <fche@elastic.org> - - PR 3965 - * configure.ac: Add --enable-prologue option. - * configure, config.in: Regenerated. - * session.h (prologue_searching): New field. - * main.cxx (main): Parse new "-P" option. Initialize based on - autoconf flag. - * stap.1.in, NEWS: Document it. - * hash.cxx (find_hash): Include it in computation. - * tapsets.cxx (query_func_info, query_cu): Respect it. - -2007-02-06 Frank Ch. Eigler <fche@elastic.org> - - * stapfuncs.5.in: Add docs for kernel_{long,int,short,char} and - some user_string* variants. - -2007-01-31 Martin Hunt <hunt@redhat.com> - - * translate.cxx (translate_pass): Remove old string impedance - mismatch stuff. Modify included files. - -2007-01-29 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac, configure: Bumped version to 0.5.13 for development. - -2007-01-29 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_module_init): Add some more type casts to printk - args. - -2007-01-29 Martin Hunt <hunt@redhat.com> - - * translate.cxx (emit_module_init): BZ3888. Add memory usage for the - runtime to the printk. - -2007-01-29 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): For successful last_pass=4, print compiled module - name. - * cache.cxx (get_from_cache): Ditto. - -2007-01-23 Mike Mason <mmlnx@us.ibm.com> - - * Makefile.am, configure.ac: Add support for - stapprobes.socket man page. - * configure, Makefile.in: Regenerate. - * man/stapprobes.socket.5.in: Socket tapset man page. - * stapprobes.5.in: Add stapprobes.socket(5) to "See Also" section. - * stapfuncs.5.in: Add new string and sockets functions. - -2007-01-23 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (loc2c_error): Correct vasprintf ignored-rc warning. - -2007-01-22 Martin Hunt <hunt@redhat.com> - - * translate.cxx (mapvar::exists): Use new _stp_map_exists function. - Testing for zero is no longer correct after changes from 2007-01-10 - below. - -2007-01-18 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (version): Add (C) 2007. - * translate.cxx (emit_module_init): Add a KERN_DEBUG printk - at module startup time to aid debugging and auditing. - -2007-01-12 David Smith <dsmith@redhat.com> - - * tapsets.cxx - (dwarf_var_expanding_copy_visitor::visit_target_symbol): Since - array behavior has changed (setting to 0 no longer deletes the - array element), we delete the internal counter array element when - providing target variable access in return probes. - -2007-01-11 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in (elfutils_version): Bump to 0.125. - Older libdw's have known bugs, though the ABI has not changed. - -2007-01-10 Martin Hunt <hunt@redhat.com> - - * translate.cxx (mapvar::del): Call the new _stp_map_del - function instead of setting to zero. - -2007-01-01 Frank Ch. Eigler <fche@redhat.com> - - * configure.ac: Bump version to 0.5.12 for release. - * configure: Regenerated. - * NEWS, AUTHORS: Populate & repopulate. - -2006-12-29 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (*group:emit_module_init): flush stdout less for timing - mode. Also, Set probe_point variable ... - * translate.cxx (emit_module_init): ... so on registration failure, a - usable error message can be generated. - -2006-12-29 Frank Ch. Eigler <fche@redhat.com> - - PR 3523. - * tapsets.cxx (common_probe_entryfn_prologue,epilogue): Restore - support for -t (benchmarking) mode. - * translate.cxx (emit_common_header,emit_module_init):Ditto. - (emit_module_exit,emit_probe): Ditto, with most meat here. - -2006-12-22 Josh Stone <joshua.i.stone@intel.com> - - * stap.1.in: Document how to specify the size of global arrays. - -2006-12-21 Josh Stone <joshua.i.stone@intel.com> - - PR 3671 - * parse.cxx (parser::parse_global): Allow a maxsize on global arrays. - * staptree.h (struct vardecl): Add the maxsize field. - * staptree.cxx (vardecl::vardecl): Init. maxsize. - (vardecl::set_arity): Don't allow arity 0 when there's a maxsize. - (vardecl::compatible_arity): Ditto. - (vardecl::print): Include maxsize in output. - (target_symbol::print): Ditto. - * translate.cxx (struct mapvar, mapvar::mapvar): Add maxsize. - (mapvar::init): Init maps with the given maxsize if specified, else - keep using MAXMAPENTRIES. - (mapvar::set): Make the error message give the maxsize. - (mapvar::add): Ditto, and check for overflow on pmap add. - (c_unparser::getmap): Pass the maxsize from the vardecl to mapvar. - -2006-12-21 David Smith <dsmith@redhat.com> - - * hash.cxx (find_hash): Added two more options into the hash that - change the generated C file - '-M' (merge) and '-t' (benchmark - timing). - -2006-12-20 David Smith <dsmith@redhat.com> - - PR 3519. - * Makefile.am: Added 'examples' directory to the 'EXTRA_DIST' - variable so that the examples directory will be added to the - distribution directory. Added variables 'SAMPLE_DEST_DIR' and - 'SAMPLE_SRC' and target 'dist-add-samples' to copy some of the - testsuite sample scripts to the examples directory when creating a - distribution directory. - * Makefile.in: Regenerated. - * systemtap.spec.in: Added 'examples' directory to the %doc list - so that the examples directory will be installed on a user's - system. - -2006-12-19 Frank Ch. Eigler <fche@redhat.com> - - PR 3522. - * tapsets.cxx (dwflpp::emit_address): Call - _stp_module_relocate only once per session. - - Error message cleanup: duplicate elimination etc. - * session.h (saved_errors): Store a set of 'em. - (num_errors): Return set size. Remove old numeric field. - Update all callers. - * elaborate.cxx (systemtap_session::print_errors): - Print each encountered message just once. - * staptree (semantic_error): Make msg2 writeable. - Add a chain field. - * tapsets.cxx (*var_expanding*:visit_target_symbol): Set saved - semantic_error's chain field. - * elaborate.cxx (register_library_aliases, visit_foreach_loop, - visit_functioncall, derive_probes): Plop "while: ..." error - message prefix/suffix right into the semantic_error message string. - * parse.cxx (lexer::scan): Identify erroneous token better - in error message for unresolvable $N/@M command line args. - * util.h (lex_cast_hex): Use std::hex, not std::ios::hex. - -2006-12-18 David Smith <dsmith@redhat.com> - - * Makefile.am (EXTRA_DIST): Added header files - cache.h, hash.h, - mdfour.h, and util.h. - * Makefile.in: Regenerated. - -2006-12-16 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): Print version strings if verbose >=2 . - * tapsets.cxx (common_probe_entryfn_prologue): Decorate an - emitted local with __restrict__. - -2006-12-14 David Smith <dsmith@redhat.com> - - * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added - 'return_ts_map' member variable. - (dwarf_var_expanding_copy_visitor::visit_target_symbol): - Optimization. If we've already seen this target variable in this - return probe, return the last replacement (instead of creating a - new replacement). - -2006-12-13 David Smith <dsmith@redhat.com> - - * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added - 'add_probe' member variable. Initialized it in ctor. - (dwarf_var_expanding_copy_visitor::visit_target_symbol): - Optimization. Instead of generating one entry probe per target - variable accessed in a return probe, now just generates one entry - probe for all target variables accessed in a particular return - probe. It does this by creating a new probe in the new - 'add_probe' member variable. - (dwarf_derived_probe::dwarf_derived_probe): If add_probe isn't - NULL, make sure it gets derived later. - -2006-12-11 Josh Stone <joshua.i.stone@intel.com> - - * parse.cxx (parse::parse_literal): Enforce the lower bound on - negative literals. - -2006-12-11 David Smith <dsmith@redhat.com> - - * hash.cxx (find_hash): Fixed a caching bug. Bulk mode (relayfs) - status should be figured into the hash since it changes the - generated C code. - -2006-12-08 Josh Stone <joshua.i.stone@intel.com> - - PR 3681. - * staptree.h (struct vardecl): Add a literal 'init' member for the - initialization value of globals. - * staptree.cxx (vardecl::vardecl): Initialize 'init' to NULL. - (vardecl::print): Print global init value during pass-1 output. - * main.cxx (printscript): Print global init values during verbose - pass-2 output. - * parse.cxx (parser::parse_global): Set the initialization literal of - global vardecls. - * translate.cxx (var::init): Don't unconditionally override the value - of numeric globals when the module_param isn't used. - (c_unparser::emit_global_param): Write numeric module_params directly - into the global variable, as an int64_t instead of long. - (c_unparser::emit_global): Add initialization to global declarations. - Don't create a temp module_param long for numeric globals anymore. - -2006-12-07 Josh Stone <joshua.i.stone@intel.com> - - PR 3624. - * tapsets.cxx (struct be_derived_probe): Add a new priority parameter - for begin/end probes, and a comparison function for sorting. - (be_builder::build): Parse the priority & pass it to be_derived_probe. - (be_derived_probe_group::emit_module_init, emit_module_exit): Sort the - probe list by priority before emitting any code. - (register_standard_tapsets): Add new begin/end variants. - * parse.cxx (parser::parse_literal): Allow negative numeric literals, - by checking for a '-' unary operator right before a number. - * stapprobes.5.in: Document the new begin/end syntax. - -2006-12-06 Josh Stone <joshua.i.stone@intel.com> - - PR 3623. - * tapsets.cxx (timer_derived_probe_group::emit_module_decls): Restart - the timers if we are in STARTING or RUNNING state. - (hrtimer_derived_probe_group::emit_module_decls): Ditto. - (be_derived_probe_group::emit_module_init): indicate error to the rest - of the initialization if any begin probes fail. - * translate.cxx (c_unparser::emit_module_init): Set the global error - state on an initialization error so timers know to shut down. - -2006-12-05 Frank Ch. Eigler <fche@redhat.com> - - PR 3648. - * main.cxx (main): Tweak error message for tapset script execution. - Also catch those clever rogues who use stdin. - -2006-11-30 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (common_probe_entryfn_prologue): Tweak - insufficient stack detection logic. - -2006-11-30 David Smith <dsmith@redhat.com> - - * main.cxx (printscript): Prints global embedded code. Not - printing the global embedded code was causing bad caching - behavior. - -2006-11-29 David Smith <dsmith@redhat.com> - - * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added - 'add_block' member variable. Constructor sets it to NULL. - (dwarf_var_expanding_copy_visitor::visit_target_symbol): Fixes the - problem of accessing a cached target variable in a loop. Cached - target variable is assigned to a temporary variable, which can be - safely access multiple times. In addition, the cached value is - deleted after being read. - (dwarf_derived_probe::dwarf_derived_probe): Adds in the new block - of code created in visit_target_symbol() to the beginning of the - derived probe. - -2006-11-28 David Smith <dsmith@redhat.com> - - * tapsets.cxx - (dwarf_var_expanding_copy_visitor::visit_target_symbol): - Improved handling target variables in return probes by having a - per-thread counter. - -2006-11-26 Frank Ch. Eigler <fche@redhat.com> - - PRs 2685, 3596, toward 2725. - * tapsets.cxx (common_probe_entryfn_prologue): Skip probe on - insufficient stack. - (build_blacklist): Add a slew of lock-related calls. - (query_module): Check for debuginfo architecture match. - * translate.cxx (translate_pass): Add default MINSTACKSPACE. - * configure.ac: Link stap with -lebl too. - * configure: Regenerated. - * stap.1.in: Document MINSTACKSPACE parameter. - -2006-11-21 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_module_init): Adapt to 2.6.19 utsname(). - -2006-11-21 Frank Ch. Eigler <fche@elastic.org> - - PR 3556. - * translate.cxx (emit_module_init): Emit code to check - system_utsname against translate-time version/machine strings. - -2006-11-20 David Smith <dsmith@redhat.com> - - * tapsets.cxx - (dwarf_var_expanding_copy_visitor::visit_target_symbol): BZ - 1382. Target variables can be accessed in return probes. A new - function entry probe is generated that saves the target variables - so that they can be accesssed in the return probe. - -2006-11-19 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): Signal parse error if a tapset script - is given as the user script. - -2006-11-15 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (d_v_e_c_v::visit_target_symbol): Restore lost - exception-saving functionality that improves error messages - for incorrect $target expressions. - (translate_components): Systematize error messages somewhat. - * translate.cxx (emit_function, emit_probe): Clarify - "array locals" error message. - -2006-11-10 David Smith <dsmith@redhat.com> - - * tapsets.cxx - (dwarf_var_expanding_copy_visitor::visit_target_symbol): Minor - improvement to error handling by throwing exceptions before - allocations are done. - -2006-11-10 Frank Ch. Eigler <fche@elastic.org> - - * stap.1.in: On urging of Adam Jackson, add blurbs on array syntax - and default limits. - -2006-11-09 Martin Hunt <hunt@redhat.com> - - * Makefile.am (staprun_LDADD): Need PROCFLAGS here too. - -2006-11-09 Martin Hunt <hunt@redhat.com> - - * Makefile.am (staprun_CFLAGS): New. Use PROCFLAGS. - - * configure.ac: Add PROCFLAGS. Processor-dependent - compilation flags. - * configure: Rebuilt. - * Makefile.in: Rebuilt. - -2006-11-09 David Smith <dsmith@redhat.com> - - * tapsets.cxx (dwarf_query::dwarf_query): Looks for "maxactive" - return probe variant. - (dwarf_derived_probe::dwarf_derived_probe): Initializes - has_maxactive and maxactive_val member variables. - (dwarf_derived_probe::register_function_variants): Matches - "maxactive" return probe variant. - (dwarf_derived_probe_group::emit_module_decls): Emits code to use - maxactive data. - (dwarf_derived_probe_group::emit_module_init): Ditto. - -2006-11-08 David Smith <dsmith@redhat.com> - - * cache.cxx (get_from_cache): To preserve semantics with - non-cached use, if the last pass is 3, display the cached C - source. - -2006-11-08 Frank Ch. Eigler <fche@elastic.org> - - * staptree.cxx (print_format::components_to_string): Quote ". - (c_unparser::visit_print_format): Don't use lex_cast_qstring - as it overdoes \ quoting. Resemble ::visit_literal_string - instead. - -2006-11-08 Frank Ch. Eigler <fche@elastic.org> - - * util.h (lex_cast_qstring): Move def'n here. Also quote \. - (stringify, lex_cast, lex_cast_hex): Move defn here. - * buildrun.cxx, elaborate.cxx, main.cxx, staptree.cxx: Adapt. - -2006-11-07 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (profile_derived_probe_group::emit_module_decls): - Pass along incoming pt_regs to context of timer.profile handlers. - -2006-11-06 Martin Hunt <hunt@redhat.com> - - * translate.cxx (var::init): Check for errors when - allocating arrays of stats, as well as other arrays. - -2006-11-06 David Smith <dsmith@redhat.com> - - Added "limit EXP" support to foreach statements. - * translate.cxx (c_tmpcounter::visit_foreach_loop): Handles - "limit" member variable. - (c_unparser::visit_foreach_loop): Ditto. - * staptree.cxx (foreach_loop::print): Prints "limit EXP" - addition. - (traversing_visitor::visit_foreach_loop): Handles "limit" member - variable. - (deep_copy_visitor::visit_foreach_loop): Ditto. - * staptree.h (struct foreach_loop): Added "limit" member - variable. - * stap.1.in: Added documentation for the "limit EXP" addition to - foreach statement. - * parse.cxx (lexer::scan): Added "limit" keyword for foreach - statements. - (parser::parse_foreach_loop): Parses "limit" keyword for foreach - statements. - * elaborate.cxx (symresolution_info::visit_foreach_loop): Handles - "limit" member variable. - (typeresolution_info::visit_foreach_loop): Ditto. - -2006-11-03 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (emit_address): Emit calls to _stp_module_relocate - for $target-variable addresses in relocatable sections. - -2006-11-02 Martin Hunt <hunt@redhat.com> - - * session.h (struct systemtap_session): Add symtab. This controls - if a symbol table is generated and compiled into the module. - - * main.cxx (main): Set session.symtab to false. This could later - enabled by a command-line option if necessary. - - * translate.cxx (emit_symbol_data): Don't write a symbol table if - session.symtab is false. - - * tapsets.cxx (emit_module_decls): Remove stap_module array and - module_relocate. - (emit_module_init): Use "_stp_module_relocate". - - * Makefile.am (staprun_SOURCES): Add symbols.c - * Makefile.in: Rebuilt. - -2006-11-02 David Smith <dsmith@redhat.com> - - * main.cxx (main): Added '-r' check. If the user changes the - kernel release to compile against, make sure pass 5 isn't - performed (since the resulting module won't be installable). - -2006-11-02 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am: Install tapset/README too. - * Makefile.in: Regenerated. - -2006-11-01 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (timer_derived_probe_group::emit_interval): New - - Fixes randomization for jiffies timers in ms mode. - (timer_derived_probe_group::emit_module_decls): Use emit_interval. - (timer_derived_probe_group::emit_module_init): Ditto. - -2006-11-01 David Smith <dsmith@redhat.com> - - * translate.cxx (delete_statement_operand_visitor::visit_symbol): - Added referent assert. - (delete_statement_operand_tmp_visitor::visit_arrayindex): Ditto. - (c_tmpcounter::visit_array_in): Ditto. - (c_unparser::visit_symbol): Ditto. - (c_unparser_assignment::visit_symbol): Ditto. - (c_unparser::load_map_indices): Ditto. - (c_tmpcounter::visit_arrayindex): Ditto. - (c_tmpcounter_assignment::visit_arrayindex): Ditto. - (c_tmpcounter::visit_functioncall): Ditto. - (c_unparser::visit_functioncall): Ditto. - -2006-10-31 Frank Ch. Eigler <fche@redhat.com> - - Probe registration rework. Offline dwarf processing for better - cross-instrumentation. - * elaborate.h (derived_probe): Remove registration-related code - generation API. Add new function sole_location(). - (derived_probe_group): Reworked this and associated classes. - * session.h (systemntap_session): Create individual per-category - derived_probe_groups. - * elaborate.cxx (derived_probe_group): Reworked. - (alias_derived_probe): Switch to new derived_probe API. - (semantic_pass_symbols): Ditto. - * translate.cxx (mapvar init): Check for array initialization error. - (emit_module_init): Handle such failures, at least in theory. - (emit_module_exit): Switch to new derived_probe_group API. Call - cpu_relax() during shutdown busywait. - (emit_common_header): Elide context variables for elided handler fns. - (c_unparser::emit_probe): Implement new, improved duplicate - elimination technique for probe handlers. Leave two older ones - behind as compile options for education. - * tapsets.cxx (*): Reworked all probe registration code, moving - it from derived_probes into derived_probe_groups. Shrunk output - code. Temporarily disabled probe timing and perfmon/mark probes. - (dwflpp): Use offline reporting, so that module matching and - relocation is performed at run time. - (dwarf_query): Remove flavour logic, now supplanted by other - duplicate elimination code. - (dwarf_derived_probe): Reworked construction, centralized - module/section/offset computations. - * tapsets.h (all_session_groups): New little helper. - - * main.cxx (main): For pass-2 message, print number of embeds too. - * systemtap.spec.in: Add a "BuildRequires: dejagnu" for make check. - * configure.ac: Bump version to 0.5.11. - * configure: Regenerated. - -2006-10-23 Li Guanglei <guanglei@cn.ibm.com> - - * lket.5.in: Rearranged the sections, add more details. - -2006-10-30 David Smith <dsmith@redhat.com> - - * stap.1.in: Added notes about new caching feature. - -2006-10-24 David Smith <dsmith@redhat.com> - - * tapsets.cxx (build_blacklist): Added - "atomic_notifier_call_chain" to the blacklist (Bugzilla #3379). - -2006-10-23 David Smith <dsmith@redhat.com> - - * main.cxx (printscript): New function containing code moved from - main(). - (main): Added code to create cache directory, call function to - generate hash, and see if we can use cached source/module. If - pass 4 is actually run to produce a new module, we call - add_to_cache() to cache the result. - * session.h (struct systemtap_session): Added hash/cache session - data. - * cache.cxx: New file handling adding/getting files from the - cache. - * cache.h: New header file for cache.cxx. - * hash.cxx: New file containing C++ wrapper for routines in - mdfour.c and the find_hash function which computes the hash file - name for an input script. - * hash.h: New header file for hash.cxx. - * mdfour.c: New file containing MD4 hash code. - * mdfour.h: New header file for mdfour.c. - * util.cxx: New file containing several utility functions used by - the caching code. - * util.h: New header file for util.cxx. - * Makefile.am: Added new C/C++ files. - * Makefile.in: Regenerated. - -2006-10-23 Li Guanglei <guanglei@cn.ibm.com> - - * configure.ac, Makefile.am: add lket-b2a.1.in - * Makefile.in, configure: regenreated - * ket-b2a.1.in: new man page for lket-b2a - * lket.5.in: document signal trace hooks - -2006-10-18 Roland McGrath <roland@redhat.com> - - PR 2727 - * configure.ac (elfutils build): Pass --prefix and --exec-prefix - options to elfutils configure. - (elfutils_abs_srcdir): New substituted variable. - * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. - * configure, config.in, Makefile.in: Regenerated. - -2006-10-16 Li Guanglei <guanglei@cn.ibm.com> - - * configure.ac: add the checking for mysql_config, - mysqlclient library and header files - * runtime/lket/b2a/Makefile.am: set compile flags - according to the existance of mysql_config - * Makefile.in, configure, testsuite/Makefile.in, - runtime/lket/b2a/Makefile.in: regenerated - -2006-10-12 Martin Hunt <hunt@redhat.com> - - * translate.cxx (emit_common_header): Add a - kretprobe_instance pointer to struct context. - (emit_symbol_data): Include absolute symbols. - - * tapsets.cxx (emit_common_header): Initialize - the kprobe instance pointer to 0; - (emit_probe_entries): Set kretprobe instance - pointer if appropriate. - - -2006-10-11 David Smith <dsmith@redhat.com> - - * tapsets.cxx (in_kprobes_function): New function that looks up - the values of '__kprobes_text_start' and '__kprobes_text_end' in - the kernel to be able to automatically exclude functions marked as - '__kprobes' (BZ# 2639). - (blacklisted_p): Calls in_kprobes_function(). - (query_kernel_module): Utility function that finds the kernel module. - * session.h (struct systemtap_session): Added kprobes_text - variables - kprobes_text_initialized, kprobes_text_start, and - kprobes_text_end. - * elaborate.cxx (systemtap_session::systemtap_session): - kprobes_text variables get initialized. - -2006-10-10 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in (elfutils_version): Require 0.124 now. - -2006-10-10 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Override incomplete mysql checking for now. - * configure: Regenerated. - -2006-10-10 Li Guanglei <guanglei@cn.ibm.com> - - * configure.ac: add the checking of mysql client library - * Makefile.in, configure: regenerated - -2006-09-29 Li Guanglei <guanglei@cn.ibm.com> - - * man: newly created dir for stapprobes - * man/stapprobes.iosched.5, man/stapprobes.netdev.5, man/stapprobes.nfs.5, - man/stapprobes.nfsd.5, man/stapprobes.pagefault.5, man/stapprobes.process.5, - man/stapprobes.rpc.5, man/stapprobes.scsi.5, man/stapprobes.signal.5, - man/stapprobes.tcp.5, man/stapprobes.udp.5: Some of these man pages are from - the old stapprobes.5.in. Some are newly created(rpc, nfs, nfsd) - * man/.cvsignore: ignore the generated man page files - -2006-09-29 Li Guanglei <guanglei@cn.ibm.com> - - PR 3282 - * Makefile.am: add -DPKGLIBDIR='"$(pkglibexecdir)"' to AM_CPPFLAGS - -2006-09-28 Josh Stone <joshua.i.stone@intel.com> - - PR 3278 - * tapsets.cxx (hrtimer_derived_probe::emit_probe_entries): Only - restart timers when the session is still active and we updated the - expire time. - -2006-09-27 Josh Stone <joshua.i.stone@intel.com> - - * session.h (struct systemtap_session): Add kernel_base_release - to store the kernel version without the -NNN suffix. - * main.cxx (main): Generate and use kernel_base_release. - * parse.cxx (eval_pp_conditional): Use kernel_base_release. - * tapsets.cxx (profile_derived_probe::profile_derived_probe): - Use kernel_base_release. - - * tapsets.cxx (timer_builder::build): Support a wide variety of - timer varients -- jiffies, s/sec, ms/msec, us/usec, ns/nsec, and - hz. Use hrtimers automatically on kernels that have it. - (timer_builder::register_patterns): Bind all of the new timer - varients in one easy place. - (register_standard_tapsets): Call timer_builder::register_patterns. - (struct hrtimer_builder): Removed since timer_builder is generic. - * stapprobes.5.in: Document new timer.* functionality. - - * tapsets.cxx (hrtimer_derived_probe_group::emit_probes): Add a - shared global for the actual hrtimer resolution, _stp_hrtimer_res. - (hrtimer_derived_probe_group::emit_module): Init _stp_hrtimer_res. - (hrtimer_derived_probe::emit_interval): Limit intervals at a - minimum to the hrtimer's actual resolution. - (hrtimer_derived_probe::emit_probe_entries): Forward timers - based on previous expiration instead of restarting relative. - -2006-09-26 David Smith <dsmith@redhat.com> - - * .cvsignore: Changed 'stpd' reference to 'staprun'. - * INTERNALS: Ditto. - * buildrun.cxx (run_pass): Ditto. - * lket.5.in: Ditto. - * stap.1.in: Ditto. - * stapruncs.5.in: Ditto. - * examples/small_demos/demo_script.txt: Ditto. - * examples/small_demos/sys.stp: Ditto. - - * systemtap.spec.in: Created a new subpackage, - "systemtap-runtime", that contains staprun. - - * Makefile.am: Renamed 'stpd' to 'staprun' and moved it to - $(bindir). - * Makefile.in: Regenerated from Makefile.am. - - * configure.ac: Incremented version number. - * configure: Regenerated from configure.ac. - -2006-09-22 Tom Zanussi <zanussi@us.ibm.com> - - * stp_check.in: Add debugfs mounting. - -2006-09-22 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guijian@cn.ibm.com> - * lket.5.in: document RPC trace hooks - -2006-09-20 Josh Stone <joshua.i.stone@intel.com> - - PR 3233 - * stapfuncs.5.in: Document new gettimeofday_ns. - -2006-09-19 Tom Zanussi <zanussi@us.ibm.com> - - * README: Add CONFIG_DEBUG_FS to config options. - -2006-09-18 Josh Stone <joshua.i.stone@intel.com> - - PR 3219 - From Eugeniy Meshcheryakov <eugen@debian.org>: - * stapprobes.5.in: Correct misuse of '-' -> '\-' in manpage - -2006-09-18 Martin Hunt <hunt@redhat.com> - - * buildrun.cxx (run_pass): Remove "-m" option to stpd. - * translate.cxx (translate_pass): #define STP_RELAYFS_MERGE - if appropriate. - -2006-09-13 Martin Hunt <hunt@redhat.com> - - * buildrun.cxx (run_pass): Remove "-r" option to stpd. - -2006-09-13 Will Cohen <wcohen@redhat.com> - - * tapsets.cxx (perfmon_derived_probe_group::emit_module_init): - Do not throw sematic error unless probes actually used. - -2006-09-12 Will Cohen <wcohen@redhat.com> - - PR 909 - * configure.ac: Add perfmon support options. - * configure: Regenerated. - - * stapfuncs.5.in: - * stapprobes.5.in: Document the perfmon support. - - * session.h, main.cxx: Track number of perfmon probes. - * translate.cxx: Gen STP_PERFMON when perfmon probes. - - * elaborate.h: - * elaborate.cxx (derived_probe_group): Add register_probe() for - perfmon probe. - - * tapsets.cxx (derived_probe::emit_common_header): Gen perfmon data. - (perfmon_var_expanding_copy_visitor): New struct. - (struct perfmon_derived_probe): - (struct perfmon_derived_probe_group): - (struct perfmon_builder): New Perfmon probe handling structures. - (register_standard_tapsets): Add perfmon tapset binding. - (derived_probe_group_container): - (~derived_probe_group_container): - (derived_probe_group_container::register_probe): - (derived_probe_group_container::emit_probes): - (derived_probe_group_container::emit_module_init): - (derived_probe_group_container::emit_module_init_call): - (derived_probe_group_container::emit_module_exit): Add perfmon tapset. - - * tapset/perfmon.stp: New. - * runtime/perf.c: New. - * runtime/perf.h: New. - * runtime/runtime.h: Include perf.c. - - * testsuite/buildok/perfmon01.stp: Test to exercise perfmon - probes. - * testsuite/systemtap.pass1-4/buildok.exp: - -2006-09-12 Li Guanglei <guanglei@cn.ibm.com> - - From Li Xuepeng <xuepengl@cn.ibm.com> - * lket.5.in: document nfs trace hooks - -2006-09-08 David Smith <dsmith@redhat.com> - - * elaborate.h (struct derived_probe): Replace emit_registrations() - function with emit_registrations_start() and - emit_registrations_end(). - (struct derived_probe_group): Added emit_module_init(). - (struct derived_probe_group_container): Added emit_module_init(), - emit_module_init_call(), and emit_module_exit(). - * elaborate.cxx (struct alias_derived_probe): Updated - emit_regitrations calls. - * translate.cxx (emit_module_init): Instead of actually emitting - per-probe-point registrations/unregistrations, let the session's - derived_probe_group_container do it. - * tapsets.cxx (emit_probe_timing): New function that handles - probe timing code. - (be_derived_probe::emit_registrations_start): Renamed from - emit_registrations. - (be_derived_probe_group::emit_module_init): New function that - outputs probes create and destroy functions. - (dwarf_derived_probe::emit_registrations): Removed, but most code - moved to emit_registrations_start(). - (dwarf_derived_probe::emit_registrations_start): Handles details - of multiple dwarf probe registrations. - (dwarf_derived_probe::emit_registrations_end): Handles cleanup - details of multiple dwarf probe registrations. - (dwarf_derived_probe_group::emit_module_init): New function that - outputs probes create and destroy functions. - (timer_derived_probe::emit_registrations_start): Renamed from - emit_registrations. Added mutiple probe handling. - (timer_derived_probe::emit_registrations_end): Handles cleanup - details of multiple probe registrations. - (timer_derived_probe_group::emit_module_init): New function that - outputs probes create and destroy functions. - (profile_derived_probe::emit_registrations_start): Renamed from - emit_registrations. Added mutiple probe handling. - (profile_derived_probe::emit_registrations_end): Handles cleanup - details of multiple probe registrations. - (profile_derived_probe_group::emit_module_init): New function that - outputs probes create and destroy functions. - (mark_derived_probe::emit_registrations_start): Renamed from - emit_registrations. Added mutiple probe handling. - (mark_derived_probe::emit_registrations_end): Handles cleanup - details of multiple probe registrations. - (mark_derived_probe_group::emit_module_init): New function that - outputs probes create and destroy functions. - (hrtimer_derived_probe::emit_registrations_start): Renamed from - emit_registrations. Added mutiple probe handling. - (hrtimer_derived_probe::emit_registrations_end): Dummy function. - (hrtimer_derived_probe_group::emit_module_init): New function that - outputs probes create and destroy functions. - (derived_probe_group_container::emit_module_init): Added function - to call all probe group's emit_module_int functions. - (derived_probe_group_container::emit_module_init_call): Added - function to handle probe group initialization cleanup. - (derived_probe_group_container::emit_module_exit): Added - function to handle probe group cleanup. - - -2006-09-06 Frank Ch. Eigler <fche@elastic.org> - - Add basic support for initialized globals. - * parse.cxx (parse_global): Parse initialization clause, implement - by rewriting to "probe begin { var = value }". - * parse.h: Corresponding changes. - * stap.1.in: Document optional initialization. - -2006-09-04 Frank Ch. Eigler <fche@elastic.org> - - Improve unresolved target-symbol error messages. - * staptree.h (target_symbol): Add new field saved_conversion_error. - * elaborate.cxx (typeresolution_info::visit_target_symbol): Throw - that if found instead of generic error. - * tapsets.cxx (t_v_f_c_v::visit_target_symbol): Set it. - -2006-08-30 Li Guanglei <guanglei@cn.ibm.com> - - * stapprobes.5.in: document signal.* - -2006-08-28 David Smith <dsmith@redhat.com> - - * translate.cxx: Added inclusion of session.h. - (translate_pass): Instead of asking each probe to emit itself, we - ask the session's probes member variable to emit all the probes. - * tapsets.cxx: Added inclusion of session.h. Added a - register_probe member function to all derived_probe based - classes. Added a derived_probe_group derived class for all probe - types: - (be_derived_probe_group): New class. - (never_derived_probe_group): New class. - (dwarf_derived_probe_group): New class. - (timer_derived_probe_group): New class. - (profile_derived_probe_group): New class. - (mark_derived_probe_group): New class. - (hrtimer_derived_probe_group): New class - (derived_probe_group_container): New class. - * elaborate.h: Removed inclusion of session.h since session.h now - includes elaborate.h. - (derived_probe): Added register_probe member function. - (derived_probe_group): Added class definition. This is the base - class of all of the derived probe groups - dwarf, timer, etc. - (derived_probe_group_container): Added class definition. An - instance of this class will be stored in the session and contain - all the other probe groups. - * elaborate.cxx (derived_probe_group::register_probe): Added - derived_probe_group::register_probe stubs. - (alias_derived_probe::register_probe): Added register_probe member - function. - (semantic_pass_symbols): After deriving a probe, the probes now - register themselves with the session. - * session.h: Includes elaborate.h to get - derived_probe_group_container definition. systemtap_session class - 'probes' member variable switched from a vector of derived probes - to a derived_probe_group_container. - * buildrun.cxx: Added inclusion of session.h since it was removed - from elaborate.h. - * main.cxx: Added inclusion of session.h since it was removed - from elaborate.h. - * parse.h: Added forward struct declarations. - * staptree.h: Removed inclusion of session.h. - -2006-08-23 Josh Stone <joshua.i.stone@intel.com> - - PR 3093 - From Eugeniy Meshcheryakov <eugen@debian.org>: - * main.cxx (main): Use setenv instead of putenv, since gcc 4.2 - doesn't like assigning string constants to char*. Also use - const char* for result from getenv. - * tapsets.cxx (dwflpp::setup): Copy string constant into a - local array, to fix gcc 4.2 warning. - -2006-08-22 Josh Stone <joshua.i.stone@intel.com> - - PR 3094 - From Eugeniy Meshcheryakov <eugen@debian.org>: - * stap.1.in: In groff, '-' produces a Unicode hyphen. Use '\-' - where a plain-old minus sign is desired, e.g., code examples. - * lket.5.in, stapex.5.in, stapfuncs.5.in, stapprobes.5.in: ditto - -2006-08-15 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in (elfutils_version): Require 0.123 now. - -2006-08-14 David Smith <dsmith@redhat.com> - - * elaborate.cxx (semantic_pass): Calls semantic_pass_optimize1() - and semantic_pass_optimize2(). - (visit_functioncall): Removed setting relaxed_p since - semantic_pass_opt5 does it. - (semantic_pass_opt5): Goes ahead and removes duplicate functions - since semantic_pass_opt1() won't be run again. - (semantic_pass_optimize1): Renamed from semantic_pass_optimize(). - Moved semantic_pass_opt5() to semantic_pass_optimize2(). - (semantic_pass_optimize2): New function that contains optimization - passes that need to be done after type inference. - -2006-08-12 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (dist-hook): Make "make dist" dist. - * Makefile.in: Regenerated. - -2006-08-12 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac, Makefile.am: Descend into testsuite/ - directory. Remove local test logic. - * configure, Makefile.in: Regenerated. - * runtest.sh: Not yet removed. - * HACKING: Update for new testsuite layout. - -2006-08-10 David Smith <dsmith@redhat.com> - - * elaborate.cxx (duplicate_function_remover): Added class. - (get_functionsig): Added function. - (semantic_pass_opt5): New function merges duplicate identical - functions into one function. - (semantic_pass_optimize): Calls semantic_pass_opt5. - - * translate.cxx (c_unparser::emit_probe): Changed to merge - duplicate probes bodies by making the duplicate probe just call - the original probe (BZ# 2421). - -2006-08-08 Li Guanglei <guanglei@cn.ibm.com> - - * stapprobes.5.in: document process.*, tcp.*, udp.* - -2006-08-09 Thang Nguyen <thang.p.nguyen@intel.com> - - * testsuite/buildok/iolock_test.stp: Updated for new ioblock.stp - -2006-08-09 Josh Stone <joshua.i.stone@intel.com> - - * examples/small_demos/proc_snoop.stp, - testsuite/buildok/process_test.stp: Rename process.signal_* to - new signal.* tapset. - * stapprobes.5.in, testsuite/buildok/memory.stp: move pagefault - to vm.* namespace - -2006-08-08 Eugene Teo <eteo@redhat.com> - - * tapset/context.stp (probemod): New function. - * stapfuncs.5.in: Document it. - * testsuite/buildok/probemod.stp: Test it. - -2006-08-08 Li Guanglei <guanglei@cn.ibm.com> - - * stapprobes.5.in: document scsi.*, ioscheduler.*, netdev.* and - pagefault. - -2006-08-01 Li Guanglei <guanglei@cn.ibm.com> - - PR 2422 - * tapsets.cxx: calling get_module_dwarf(false) to give a - warning to those modules without debuginfo and skip them - -2006-07-19 Roland McGrath <roland@redhat.com> - - * configure.ac, systemtap.spec.in: Bump version to 0.5.9. - * configure: Regenerated. - - * systemtap.spec.in: Fix syntax in last change. - -2006-07-19 David Smith <dsmith@redhat.com> - - * testsuite/buildok/scsi.stp: Only run the scsi test if the scsi - kernel subsystem is running. - -2006-07-17 David Smith <dsmith@redhat.com> - - * stapfuncs.5.in: Removed retval function description, since it - has been removed. - -2006-07-17 Roland McGrath <roland@redhat.com> - - * configure.ac, systemtap.spec.in: Require elfutils-0.122. - * configure: Regenerated. - - * systemtap.spec.in (Release): Use %{?dist}. - -2006-07-17 Li Guanglei <guanglei@cn.ibm.com> - - * main.cxx: add LKET's tapsets into stap's default tapsets - search path - -2006-07-13 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec.in: Add formerly missing admonitional verb. - -2006-07-13 David Smith <dsmith@redhat.com> - - * parse.cxx (parser::expect_unknown2): New function that looks for - 2 possible token types. - * parse.cxx (parser::expect_ident_or_keyword): New function that - calls parser::expect_unknown2. - * parse.cxx (parser::parse_symbol): Calls - parser::expect_ident_or_keyword to allow keywords to appear when - expanding target symbols (Bugzilla #2913). - * parse.h: Added prototypes for parser::expect_unknown2 and - parser::expect_ident_or_keyword. - * testsuite/parseok/seventeen.stp: New test to check for allowing - keywords when expanding target symbols. - -2006-06-30 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (hrtimer_builder::build): Enable hrtimers on >=2.6.17. - * tapsets.cxx (hrtimer_derived_probe::emit_probe_entries): Correct - compilation errors, fix return value. - -2006-06-30 David Smith <dsmith@redhat.com> - - * tapsets.cxx (dwflpp::dwfl_assert): Added optional extra_msg - parameter to be able to print out extra error message. - (dwflpp::setup): Uses new 'extra_msg' parameter to dwfl_assert() - to ask user to install kernel-debuginfo when - dwfl_linux_kernel_report_kernel() or - dwfl_linux_kernel_report_modules() fails (Bugzilla #2669). - - * buildrun.cxx (compile_pass): Checks to make sure module build - directory exists before trying to run make there (Bugzilla #2669). - -2006-06-27 Roland McGrath <roland@redhat.com> - - * runtest.sh: Don't use eval, use proper quoting. - - * tapsets.cxx (dwflpp::emit_address): New instance method. Get - relocation details from Dwfl to emit in comment after address constant. - (dwflpp::loc2c_emit_address): Just call that. - -2006-06-26 Li Guanglei <guanglei@cn.ibm.com> - - * lket.in.5: update to AIO event hooks - -2006-06-23 Thang P Nguyen <thang.p.nguyen@intel.com> - - * testsuite/buildok/tcp_test.stp: updated inet calls - * testsuite/buildok/udp_test.stp: test udp tapset - -2006-06-22 Thang P Nguyen <thang.p.nguyen@intel.com> - - * testsuite/buildok/tcp_test.stp: test tcp tapset - -2006-06-16 Roland McGrath <roland@redhat.com> - - * configure.ac, systemtap.spec.in: Bump version to 0.5.8. - * configure: Regenerated. - - * systemtap.spec.in: Fix bundled_elfutils setting so builds can - possibly work. Add comment admonishing losers not to touch it. - - * aclocal.m4, Makefile.in: Regenerated with automake-1.9.6-2. - -2006-06-16 Li Guanglei <guanglei@cn.ibm.com> - - * lket.in.5: update to reflect the latest changes - to LKET - -2006-06-15 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in: Require elfutils-0.121. - -2006-06-14 Frank Ch. Eigler <fche@elastic.org> - - * README: Add kernel.org blurb based on text from - Chuck Ebbert <76306.1226@compuserve.com>. - -2006-06-09 Li Guanglei <guanglei@cn.ibm.com> - - * parse.cxx, staptree.cxx, staptree.h, translate.cxx: - delete lket_trace_extra - * lket.5.in: delete the description of backtrace in - LKET - -2006-06-08 Thang P Nguyen <thang.p.nguyen@intel.com> - - * testsuite/buildok/ioblock_test.stp: test ioblock - -2006-06-05 David Smith <dsmith@redhat.com> - - * tapsets.cxx (dwflpp::express_as_string): New function. - Extracted from dwflpp::literal_stmt_for_local() so that - dwflpp::literal_stmt_for_return() could also call it. - (dwflpp::literal_stmt_for_local): Portion extracted to create - dwflpp::express_as_string(). - (dwflpp::literal_stmt_for_return): New function. Adds support for - new symbolic access ("$return") to return value in .return - probes. Fixes PR 1132. - (target_variable_flavour_calculating_visitor::visit_target_symbol): - Calls dwflpp::literal_stmt_for_return() when in a return probe and - the variable name is "$return". - (dwarf_var_expanding_copy_visitor::visit_target_symbol): Ditto. - * stapfuncs.5.in: Noted that the retval() function is deprecated. - * stapprobes.5.in: Corrected the name of the return value - variable. - * tapset/return.stp: Marked the retval() function as deprecated. - * testsuite/semko/return01.stp: Added new test. - * testsuite/semko/return02.stp: Ditto. - -2006-06-05 Frank Ch. Eigler <fche@elastic.org> - - PR 2645 cont'd. - * elaborate.cxx (derive_probes): Pass down optional flag - from alias reference to expansion. - * testsuite/semok/twentytwo.stp: Test passing-down. - * stapprobes.5.in: Specify passing-down property of optional flag. - -2006-06-02 Frank Ch. Eigler <fche@elastic.org> - - PR 2645 cont'd. - * elaborate.cxx (find_and_build): Support optional wildcards too. - (derive_probes): Change last argument to indicate optionalness of - parent probe point (alias reference). - (alias_expansion_builder): Shrink epilogue-mode alias body copying. - Pass along alias reference optionality. - * elaborate.h: Corresponding changes. - * testsuite/semko/thirtyfive.stp, semok/twentytwo.stp: New tests. - -2006-06-02 Josh Stone <joshua.i.stone@intel.com> - - * testsuite/buildok/process_test.stp: add signal_handle test - * examples/small_demos/proc_snoop.stp: log signal_handle - -2006-06-02 Frank Ch. Eigler <fche@elastic.org> - - PR 2645. - * stapprobes.5.in: Document "?" probe point suffix. - * parse.cxx (parse_probe_point): Recognize "?" optional suffix. - * elaborate.cxx (derive_probes): Observe probe_point->optional. - * staptree.h, staptree.cxx: Corresponding changes. - * tapsets.cxx (never_derived_probe, never_builder): New classes. - (register_standard_tapsets): Support "never" probe point. - * testsuite/buildok/six.stp, parseok/five.stp: Modifed tests. - - * translate.cxx (emit_module_init): Format "-t" (benchmarking) - cycle-time reports similarly to "-v" (verbose) times. - -2006-06-02 David Smith <dsmith@redhat.com> - - * .cvsignore: Added more files to ignore. - - * main.cxx (usage): Added exitcode parameter. - (main): Improved a few error messages. Also, when an error is - given, stap now always exits with a status of 1. - - * testsuite/buildok/cmdline01.stp: New test. - * testsuite/parseko/cmdline01.stp: Ditto. - * testsuite/parseko/cmdline02.stp: Ditto. - * testsuite/parseko/cmdline03.stp: Ditto. - * testsuite/parseko/cmdline04.stp: Ditto. - * testsuite/parseko/cmdline05.stp: Ditto. - * testsuite/parseko/cmdline06.stp: Ditto. - * testsuite/parseok/cmdline01.stp: Ditto. - * testsuite/parseok/cmdline02.stp: Ditto. - -2006-06-01 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (hrtimer_derived_probe::emit_interval): update - API usage of hrtimers in preparation of getting exports from - the kernel. - (hrtimer_derived_probe::emit_probe_entries): ditto - -2006-06-01 Li Guanglei <guanglei@cn.ibm.com> - - * parse.cxx, staptree.cxx, staptree.h, translate.cxx: - add new function lket_trace_extra at script level - * lket.5.in: Modified the description of backtrace in - LKET - -2006-05-29 Li Guanglei <guanglei@cn.ibm.com> - - * systemtap.spec.in: include lket-b2a in the rpm package - -2006-05-27 Li Guanglei <guanglei@cn.ibm.com> - - * configure.ac: add conditional build of lket-b2a - if glib2-devel is not found, just skips and gives - a warning - * Makefile.am: add conditional build of lket-b2a - * Makefile.in, configure: regenerated - * runtime/lket/b2a/Makefile: deleted. Should be - generated by configure - -2006-05-26 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (build_blacklist): build the sets of blacklisted - functions and function returns. Manually added many __kprobes - functions that should not be probed. - (dwarf_query::dwarf_query): Call build_blacklist. - (dwarf_query::blacklisted_p): Use blacklist sets. - -2006-05-25 Josh Stone <joshua.i.stone@intel.com> - - * parse.cxx (parser::scan_pp): Free memory for tokens that are - thrown away in the preprocessing stage. - * tapsets.cxx - (dwarf_var_expanding_copy_visitor::visit_target_symbol): - Free allocated memory when supressing target-variable errors - -2006-05-25 David Smith <dsmith@redhat.com> - - * testsuite/semok/twentyone.stp: New file. - -2006-05-24 Frank Ch. Eigler <fche@elastic.org> - - Pass 4 speedup. - * tapsets.cxx (derived_probe::emit_common_header): New - function, to emit code formerly inlined by - emit_probe_prologue/epilogue. - * translate.cxx (emit_common_header): Call it. - * elaborate.h: Corresponding changes. - -2006-05-24 David Smith <dsmith@redhat.com> - - * elaborate.cxx (isglob): New function. - (match_key::globmatch): New function. - (match_node::find_and_build): Uses isglob() and - match_key::globmatch() to provide support for wildcards such as - "kernel.syscall.*read*" (Bugzilla #1928). - * elaborate.h (match_key::globmatch): Added function declaration. - * parse.cxx (parser::parse_probe_point): Collects one or more - tokens into a single probe-point functor string. - - * testsuite/parseko/twentytwo.stp: New file. - * testsuite/parseok/sixteen.stp: New file. - -2006-05-24 David Smith <dsmith@redhat.com> - - * testsuite/parseko/cmdlinearg01.stp: New file. - * testsuite/parseko/cmdlinearg02.stp: New file. - * testsuite/parseko/eighteen.stp: New file. - * testsuite/parseko/foreachstmt01.stp: New file. - * testsuite/parseko/foreachstmt02.stp: New file. - * testsuite/parseko/foreachstmt03.stp: New file. - * testsuite/parseko/foreachstmt04.stp: New file. - * testsuite/parseko/foreachstmt05.stp: New file. - * testsuite/parseko/forstmt01.stp: New file. - * testsuite/parseko/forstmt02.stp: New file. - * testsuite/parseko/forstmt03.stp: New file. - * testsuite/parseko/forstmt04.stp: New file. - * testsuite/parseko/functiondecl01.stp: New file. - * testsuite/parseko/functiondecl02.stp: New file. - * testsuite/parseko/functiondecl03.stp: New file. - * testsuite/parseko/functiondecl04.stp: New file. - * testsuite/parseko/functiondecl05.stp: New file. - * testsuite/parseko/functiondecl06.stp: New file. - * testsuite/parseko/functiondecl07.stp: New file. - * testsuite/parseko/ifstmt01.stp: New file. - * testsuite/parseko/ifstmt02.stp: New file. - * testsuite/parseko/nineteen.stp: New file. - * testsuite/parseko/preprocess01.stp: New file. - * testsuite/parseko/preprocess02.stp: New file. - * testsuite/parseko/preprocess03.stp: New file. - * testsuite/parseko/preprocess04.stp: New file. - * testsuite/parseko/preprocess05.stp: New file. - * testsuite/parseko/preprocess06.stp: New file. - * testsuite/parseko/preprocess07.stp: New file. - * testsuite/parseko/preprocess08.stp: New file. - * testsuite/parseko/preprocess09.stp: New file. - * testsuite/parseko/probepoint01.stp: New file. - * testsuite/parseko/probepoint02.stp: New file. - * testsuite/parseko/probepoint03.stp: New file. - * testsuite/parseko/seventeen.stp: New file. - * testsuite/parseko/ternarystmt01.stp: New file. - * testsuite/parseko/twenty.stp: New file. - * testsuite/parseko/twentyone.stp: New file. - * testsuite/parseko/whilestmt01.stp: New file. - * testsuite/parseko/whilestmt02.stp: New file. - -2006-05-24 Li Guanglei <guanglei@cn.ibm.com> - - * configure.ac: add lket.5 & runtime/lket/b2a - * Makefile.am: add lket & runtime/lket/b2a - * aclocal.m4, Makefile.in, configure: regenerated - * runtime/lket/b2a/*: a binary to ascii converter used - to convert LKET's default binary trace data. - * lket.5.in: add intro of lket-b2a converter. - -2006-05-23 David Smith <dsmith@redhat.com> - - * parse.cxx (parse_for_loop): Corrected error message. - -2006-05-22 David Smith <dsmith@redhat.com> - - * elaborate.cxx (find_and_build): Fixed issue #2643. Wildcard - code was being too optimistic. - -2006-05-22 Li Guanglei <guanglei@cn.ibm.com> - - * lket.in.5: draft version of manpage for LKET - * Makefile.in, configure, stap.1.in: add lket.in.5 - -2006-05-18 Frank Ch. Eigler <fche@elastic.org> - - Organize "-t" output by script/parse level probes rather than - derived-probes. - * elaborate.cxx (derived_probe ctor): Remove name field setting. - (alias_derived_probe): New class. - (alias_expandion_builder::build): Create an instance of the above - instead of parse-tree-level plain probe. - * elaborate.h: Corresponding changes. - (derived_probe::basest): Define. - * staptree.cxx (probe ctor): Set new name field. - * staptree.h (probe): Corresponding changes. - (probe::basest): New field. - * tapsets.cxx (emit_probe_prologue, emit_probe_entries): - Switch to basest() probe name for Stat instance. - (dwarf_derived_probe ctor): Stash away base probe. - * translate.cxx (unparser::emit_probe): Remove index - operand, just use probe name to generate symbols. - (emit_module_init): Reorganize -t output in unregister functions. - (translate_pass): Remove unparser::current_probenum field and all - uses. - * translate.h: Corresponding changes. - -2006-05-18 Li Guanglei <guanglei@cn.ibm.com> - - * tapset/LKET/*: tracing tapsets of LKET - * tapset/context.stp: add stp_pid() func - * tapset/ppc64/syscalls.stp: add conditional preprocessing - since sys64_time is removed from kernel >= 2.6.16 - -2006-05-18 Li Guanglei <guanglei@cn.ibm.com> - - * tapset/tskschedule.stp: deleted, merge into scheduler.stp - * tapset/scheduler.stp: incorporate tskschedule.stp - * testsuite/buildok/tskschedule.stp: deleted, merge into - sched_test.stp - * testsuite/buildok/sched_test.stp: incorporate tskschedule.stp - -2006-05-17 Josh Stone <joshua.i.stone@intel.com> - - * testsuite/buildok/sched_test.stp: test scheduler tapset - * examples/small_demos/sched_snoop.stp: demo scheduler tapset - -2006-05-18 Li Guanglei <guanglei@cn.ibm.com> - - * testsuite/buildok/ioscheduler.stp: testcase for ioscheduler.stp - * testsuite/buildok/memory.stp: testcase for memory.stp - * testsuite/buildok/networking.stp: testcase for networking.stp - * testsuite/buildok/scsi.stp: testcase for scsi.stp - * testsuite/buildok/tskschedule.stp: testcase for tskschedule.stp - -2006-05-18 Li Guanglei <guanglei@cn.ibm.com> - - * tapset/ioscheduler.stp: generic IO scheduler tapsets from LKET - * tapset/memory.stp: generic pagefault tapsets from LKET - * tapset/networking.stp: generic networking tapsets from LKET - * tapset/scsi.stp: generic scsi tapsets from LKET - * tapset/tskschedule.stp: generic task scheduler tapsets from LKET - * tapset/process.stp: changes to process.exec alias - -2006-05-16 David Smith <dsmith@redhat.com> - - * parse.cxx (parser::parser): Added initializer for 'context' - member variable. - (tt2str): Added support for new tok_keyword type. - (operator <<): Ignores keyword content when outputting error - message. - (lexer::scan): Recognizes keywords, such as 'probe', 'global', - 'function', etc. and classifies them as type 'tok_keyword'. This - causes keywords to become reserved so they cannot be used for - function names, variable names, etc. - (parser::parse): Changed tok_identifier to tok_keyword when looking - for "probe", "global", or "function". Also sets context member - variable which remembers if we're in probe, global, function, or - embedded context. - (parser::parse_probe, parser::parse_statement) - (parser::parse_global, parser::parse_functiondecl) - (parser::parse_if_statement, parser::parse_delete_statement) - (parser::parse_break_statement, parser::parse_continue_statement) - (parser::parse_for_loop, parser::parse_while_loop) - (parser::parse_foreach_loop, parser::parse_array_in): Looks for - tok_keyword instead of tok_identifier. - (parser::parse_probe_point): Allows keywords as part of a probe - name, since "return" and "function" are keywords. - (parser::parse_return_statement): Looks for tok_keyword instead of - tok_identifier. Make sure we're in function context. - (parser::parse_next_statement): Looks for tok_keyword instead of - tok_identifier. Make sure we're in probe context. - * parse.h: Added parse_context enum. Added 'tok_keyword' to - token_type enum. Added parse_context 'context' member variable to - parser class. - * stap.1.in: Because the string() function has been removed, - the 'string()' function reference has been changed to a 'sprint()' - function reference. - * stapex.5.in: Ditto. - * stapfuncs.5.in: The description of the string() and hexstring() - functions has been removed. - * testsuite/buildok/context_test.stp: Calls to the string() - function were converted to sprint() function calls. - * testsuite/buildok/fifteen.stp: Ditto. - * testsuite/buildok/nineteen.stp: Ditto. - * testsuite/buildok/process_test.stp: Ditto. - * testsuite/buildok/task_test.stp: Ditto. - * testsuite/buildok/timestamp.stp: Ditto. - * testsuite/buildok/twentyone.stp: Ditto. - * testsuite/semok/args.stp: Ditto. - * testsuite/semok/seven.stp: Ditto. - * testsuite/buildok/fourteen.stp: Calls to log()/string() were - converted to a call to printf(). - * testsuite/buildok/sixteen.stp: Ditto. - * testsuite/buildok/thirteen.stp: Ditto. - * testsuite/buildok/twentythree.stp: Ditto. - * testsuite/buildok/twentytwo.stp: Ditto. - * testsuite/buildok/seven.stp: Calls to the string() - function were converted to sprint() calls. Calls to the - hexstring() function were converted to sprintf() calls. - * testsuite/semok/eleven.stp: Ditto. - * testsuite/buildok/seventeen.stp: Calls to log()/hexstring() were - converted to a call to printf(). - * testsuite/semko/nineteen.stp: Ditto. - * testsuite/parseok/three.stp: Because keywords are reserved, a - variable named 'string' was renamed to 'str'. - * testsuite/parseok/two.stp: Because keywords are reserved, a - variable named 'global' was renamed to 'gbl'. - * testsuite/transko/two.stp: Because the parser now checks for - 'next' and 'return' statement context, a 'next' statement was - removed from a function and a 'return' statement was removed from - a probe. - -2006-05-15 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx, translator.cxx (*): Designate more emitted - functions as static. - * translator.cxx (visit_print_format): Correct regression - regression from two weeks ago. - * stapfuncs.5.in: Tweak wording. Deprecate returnval() in favour - of retval(). - -2006-05-12 Thang P Nguyen <thang.p.nguyen@intel.com> - - * testsuite/buildok/probefunc.stp: test probefunc() - -2006-05-12 Frank Ch. Eigler <fche@elastic.org> - - * stapfuncs.5.in: Clarify backtrace-related functions. - -2006-05-11 David Smith <dsmith@redhat.com> - - * tapset/ctime.stp: New file. - -2006-05-09 Josh Stone <joshua.i.stone@intel.com> - - * examples/small_demos/proc_snoop.stp: monitor all process events. - * testsuite/buildok/task_test.stp: test compilation of all task - functions. - * testsuite/buildok/process_test.stp: test all process events and - associated variables. - -2006-05-09 Will Cohen <wcohen@redhat.com> - - PR 2228 - * parse.h: - * parse.cxx: Add << operator for struct source_loc. - * translate.cxx (emit_module_init): Print location of probe in script. - -2006-05-09 Li Guanglei <guanglei@cn.ibm.com> - - PR 2520 - * main.cxx: add -M option to stop merge per-cpu files in bulk mode - * session.h: add merge member into systemtap_session - * buildrun.cxx: generate stpd_cmd to stop merge per-cpu files if -M - option is turned on by stap. - -2006-05-08 Li Guanglei <guanglei@cn.ibm.com> - - PR 2627 - * elaborate.cxx: epilogue style alias expansion - * parse.cxx: parse += alias definition - * staptree.h: add epilogue_style member to probe_alias - * stap.1.in: add the description of epilogue style alias - * testsuite/parseok/fifteen.stp: testcase for epilogue style alias - -2006-05-05 Roland McGrath <roland@redhat.com> - - * configure.ac (build_elfutils): Pass CFLAGS to elfutils configure, - editting out -Wall. - * configure: Regenerated. - -2006-05-05 Frank Ch. Eigler <fche@elastic.org> - - PR 2643 - * testsuite/buildok/syscalls.stp: Take "-u" away again. - * configure.ac, systemtap.spec.in: Bump version to 0.5.7. - * configure: Regenerated. - -2006-05-05 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac, systemtap.spec.in: Bump version to 0.5.6. - * configure: Regenerated. - -2006-05-05 Will Cohen <wcohen@redhat.com> - - * small_demos/fileopen.stp: Shows use of target() to look at pid. - * small_demos/rwtiming.stp: Shows per executable histograms of time - spent in read and write system calls. - -2006-05-05 Eugene Teo <eteo@redhat.com> - - PR 2433 - * tapsets.cxx (dwarf_query::blacklisted_p): Extend the list of - blacklisted .return probes to include "do_exit". Correct funcname - typo for "sys_groupexit". - * tapset/syscalls.stp: Remove .return probe aliases of never- - returning syscall.exit and syscall.exit_group calls. - -2006-05-05 David Smith <dsmith@redhat.com> - - * translate.cxx (mapvar::exists): Added code for string array - handling. Otherwise, string array elements always exist. - -2006-05-03 Josh Stone <joshua.i.stone@intel.com> - - PR 2506 - * tapsets.cxx (dwarf_query::blacklisted_p): skip probes in .exit.* - -2006-05-02 Will Cohen <wcohen@redhat.com> - - * translate.cxx (emit_module_init): Move closing '}' inside #ifdef. - -2006-05-02 Will Cohen <wcohen@redhat.com> - - PR 2228 - * stap.1.in: Document "-t" option. - * main.cxx (main): Add "-t" option for collecting timing information. - * session.h (systemtap_session): Corresponding changes. - * tapsets.cxx (emit_probe_prologue, emit_probe_epilogue, - emit_probe_entries): - * translate.cxx: (emit_common_header, emit_module_init, - translate_pass): Add time collection of timing information. - - -2006-05-01 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (visit_print_format): Fix regression in - "printf" pseudo-result initialization. - -2006-04-30 Frank Ch. Eigler <fche@elastic.org> - - PR 2610. - * translate.cxx (c_unparser::visit_arrayindex, visit_stat_op): - Detect empty aggregates consistently. - (visit_print_format): Ditto. Also detect errors due to - argument evaluation. - (translator_output::*): Add a flush before a failing assert, - to produce more context when debugging. - -2006-04-25 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am: Removed "rpm" target. - * Makefile.in, aclocal.m4: Regenerated. - -2006-04-25 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (typeresolution_info::unresolved,invalid, - mismatch): Print current function/probe name in error message. - (semantic_pass_types): Pass sufficient information. - * elaborate.h: Corresponding changes. - -2006-04-25 Frank Ch. Eigler <fche@elastic.org> - - PR 2427. - * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): - Support /* pure */ declaration. Stop using __tvar_ naming hack. - (v_c_u::visit_print_format): Mark sprint and sprintf as - side-effect-free. - (deep_copy_visitor::visit_print_format): Propagate raw_components. - * stap.1.in: Document declaration. - * elaborate.cxx (semantic_pass_opt2): Verbose message tweak. - (dead_stmtexpr_remover): Extend for more aggressive optimization. - * tapsets.cxx (dwarf,mark_var_expanding_copy_visotor): Add - /* pure */ declaration to rvalue expansions. - * tapset/*.stp: Added /* pure */ declarations to many functions. - * testsuite/parseok/unparsers.stp: Propagate guru mode flag. - * testsuite/buildok/twentyfour.stp: New test. - -2006-04-24 Frank Ch. Eigler <fche@elastic.org> - - PR 2599. - * elaborate.cxx (visit_assignment): Tolerate null current_expr. - * testsuite/semok/optimize.stp: Add relevant tests. - -2006-04-23 Eugene Teo <eteo@redhat.com> - - PR 2149 - * translate.cxx (mapvar::set): Test _stp_map_set_xx() for - array overflows. - -2006-04-23 Eugene Teo <eteo@redhat.com> - - * small_demos/ansi_colors.stp: Add an example of using octal - escape sequences to display all possible ansi colors. - -2006-04-21 Eugene Teo <eteo@redhat.com> - - PR 1326 - * translate.cxx (c_unparser::visit_binary_expression): Handle - negative left and right shift count. - -2006-04-21 Frank Ch. Eigler <fche@elastic.org> - - PR 953 - * elaborate.h (derived_probe): Add field "name". Stop passing - "probe index" to other emit_* calls. - (emit_probe_context_vars): New member function. - * elaborate.cxx (derived_probe ctor): Generate unique name. - * translate.cxx (*): Adapt to index->name. - (emit_probe): Realize that probe locals only occur at nesting=0. - * tapsets.cxx (*derived_probe::emit_*): Adapt to index->name. - (mark_var_expanding_copy_visitor): New class to process $argN. - (mark_derived_probe ctor): Call it. - (mark_derived_probe::emit_probe_context_vars): Do it. - * buildrun.cxx (compile_pass): Add more optional gcc verbosity. - Add CFLAGS += -freorder-blocks. - * testsuite/buildok/marker.stp: New test. - -2006-04-19 Eugene Teo <eteo@redhat.com> - - PR 2014 - * parse.cxx (lexer::scan): Added \[0-7]* case to preserve - octal escape sequences. - -2006-04-18 Martin Hunt <hunt@redhat.com> - - * Makefile.am (install-data-local): Another try. - -2006-04-18 Frank Ch. Eigler <fche@elastic.org> - - PR 2220 - * translate.cxx (visit_statement): Tolerate 0 first argument. - (visit_for_loop, visit_foreach_loop): Call it thusly for condition - expression. - (visit_embededcode, visit_block, visit_null_statement): Don't - call visit_statement() at all. - -2006-04-18 Martin Hunt <hunt@redhat.com> - - * Makefile.am (install-data-local): Tweak previous fix. - (install-data-local): - -2006-04-18 Martin Hunt <hunt@redhat.com> - - * Makefile.am (install-data-local): Rewrite. Set - ownership and permissions for all files and directories - under runtime and tapset. Restrict files to source code. - - * Makefile.in: Rebuilt. - -2006-04-18 Eugene Teo <eteo@redhat.com> - - PR 1341 - * main.cxx (main): Use TMPDIR instead of hard-coded /tmp. - -2006-04-17 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (mark_derived_probe::emit_{de}registrations): - Use cmpxchg to synchronize. - -2006-04-12 Tom Zanussi <zanussi@us.ibm.com> - - PR 2538 - * buildrun.cxx (compile_pass): Remove space - between -I and runtime path. - -2006-04-12 Martin Hunt <hunt@redhat.com> - - PR 2497 - * translate.cxx (translate_pass): Don't - reset STP_STRING_SIZE if it was already defined. - Set it to 1024 by default. - -2006-04-10 Martin Hunt <hunt@redhat.com> - - * translate.cxx (visit_print_format): Call - _stp_snprintf() instead of snprintf(). - -2006-04-09 Martin Hunt <hunt@redhat.com> - - Add binary printf support. - - * elaborate.cxx (visit_print_format): Don't include - conv_literal or conv_size in components vector. - Add conv_binary to switch statement. - - * translate.cxx (visit_print_format): Eliminate - special cast to (long long) for pe_long because new - vsnprintf uses int64_t. - - * staptree.h (struct print_format): Add conv_binary and conv_size. - - * staptree.cxx (components_to_string): Add conv_binary case. - Add conv_size case. - (string_to_components): Add cases for 'b' and 'n' - -2006-04-08 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (resolve_prologue_endings): Rewrote. - (resolve_prologue_endings2): Removed. - - * gen-stapmark.h: Emit a 0-arity marker. - * stapmark.h: Regenerated for arities 0..6. - -2006-04-04 Roland McGrath <roland@redhat.com> - - * configure.ac: Bump version to 0.5.5. - Require elfutils-0.120. - * configure: Regenerated. - * systemtap.spec.in: Likewise. - - * main.cxx (version): Use dwfl_version. - - * loc2c.c (array_stride): stride_size -> byte_stride - -2006-04-04 Tom Zanussi <zanussi@us.ibm.com> - - * stp_check: Change test for relay vs relayfs - -2006-03-30 Martin Hunt <hunt@redhat.com> - - * tapsets.cxx (dwarf_derived_probe::emit_registrations): - Change maxactive so single-processor kernels using - kretprobes don't get lots of dropped probes. - -2006-03-30 Frank Ch. Eigler <fche@elastic.org> - - PR 953, part 1 - * tapsets.cxx: (mark_derived_probe*): New classes. - (register_standard_tapsets): Register kernel/module.mark() family. - * stapmark.h: New header for static instrumentation markers. - * gen-stapmark.h: New perl script to generate it. - * elaborate.cxx (derived_probe ctor): Ignore null location*. - -2006-03-29 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (hrtimer_derived_probe::*): creates a probe point - based on the hrtimer APIs. - * tapsets.cxx (hrtimer_builder::*): parses the user's time-spec - into a 64-bit nanosecond value, and calls the appropriate - derived_probe. - * tapsets.cxx (register_standard_tapsets): add hrtimer bindings - * translate.cxx (translate_pass): add linux/random.h include, - used for generating 64-bit random numbers for hrtimers. - -2006-03-28 Martin Hunt <hunt@redhat.com> - - * testsuite/buildok/syscall.stp: Update so - it works again. - -2006-03-16 Tom Zanussi <zanussi@us.ibm.com> - - * configure.ac: Revert relayfs version check. - * configure: Reverted. - * translate.cxx (compile_pass): Remove relayfs include path. - -2006-03-15 Tom Zanussi <zanussi@us.ibm.com> - - * configure.ac: Add check for relayfs version. - * configure: Regenerated. - * stp_check.in: Remove bundled relayfs loading/compilation, add - check for relay (vs relayfs). - -2006-03-13 Josh Stone <joshua.i.stone@intel.com> - - * safety/safety.py: Support IA64 disassembly matching. - * safety/data/opcodes-ia64: new opcode rules for IA64. - * safety/data/references: Add references used by example scripts - when compiled for IA64. - -2006-03-13 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_globals): Tag globals, especially the locks, - as __cacheline_aligned. - -2006-03-09 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_locks): Emit dummy references to unlock_ ... - (emit_module_init): ... and probe_point. - -2006-03-06 Frank Ch. Eigler <fche@elastic.org> - - PR 2425 - * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): - Realize that $var-setter functions have side-effects. - * testsuite/transok/tval-opt.stp: New test. - -2006-03-06 Martin Hunt <hunt@redhat.com> - - * buildrun.cxx (run_pass): Add "-u username". - * stapfuncs.5.in: Document system(). - -2006-03-06 Frank Ch. Eigler <fche@elastic.org> - - * stapex.5.in: Use \[aq] for plain single quotes for encoding - variation tolerance. - -2006-03-03 Josh Stone <joshua.i.stone@intel.com> - - * main.cxx (main): search forward for dashes in the kernel release, - to work properly with release names with more than one dash. Also - * parse.cxx (eval_pp_conditional): ditto - * tapsets.cxx (profile_derived_probe::profile_derived_probe): ditto - * safety/safety.py (StaticSafety::__build_search_suffixes): ditto, - and add copyright & GPL tag - - PR 2390 - * main.cxx (main): expand search path so that revision w.x.y.z - searches w.x.y.z, w.x.y, and w.x. - -2006-03-03 Frank Ch. Eigler <fche@elastic.org> - - * tapset/indent.stp, indent-default.stp: New little tapset. - * stapfuncs.5.in: Document it. - * testsuite/buildok/indent.stp: Build it. - -2006-02-27 Josh Stone <joshua.i.stone@intel.com> - - * safety/*: Add a static safety checker. - -2006-02-25 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (var::init): Don't crush string module_params. - (emit_global_param): New function, forked out of emit_global, - to put module_param calls at the bottom of C file. - * translate.h: Corresponding changes. - -2006-02-23 Frank Ch. Eigler <fche@elastic.org> - - PR 1304 - * parse.cxx (lexer): Take systemtap_session argument. - (lexer::scan): Support $1..$NNNN and @1...@NNNN expansion. - * stap.1.in: Document this. - * testsuite/semok/args.stp: New test. - * translate.cxx (var::init, emit_global): Emit code to allow - named module parameters to initialize global string/number scalars. - * stap.1.in: Don't document this yet. - - PR 2334 - * main.cxx (main): Clarify "-v" option repeatibility. - * stap.1.in: Ditto. - -2006-02-23 Roland McGrath <roland@redhat.com> - - * Makefile.am (AUTOMAKE_OPTIONS): New variable, set dist-bzip2. - * Makefile.in: Regenerated. - -2006-02-23 Martin Hunt <hunt@redhat.com> - - PR 1989. Adds support for %p in printf - * staptree.h (struct print_format): Add conv_unsigned_ptr. - * staptree.cxx (components_to_string): Output 'p' - for conv_unsigned_ptr. - * elaborate.cxx (visit_print_format): Add case for - conv_unsigned_ptr. - -2006-02-23 Martin Hunt <hunt@redhat.com> - - * Makefile.am (install-data-local): Create tapset/i686 and - tapset/x86_64 directories. This fixes a problem where they - were included, but had bad permissions. - * Makefile.in: Rebuilt. - -2006-02-22 Frank Ch. Eigler <fche@elastic.org> - - * stapfuncs.5.in: Document get_cycles(). - * testsuite/buildok/timestamp.stp: Build it and its friends. - -2006-02-22 Frank Ch. Eigler <fche@elastic.org> - - PR 2293. - * tapsets.cxx (emit_probe_epilogue): Emit early local_irq_save(). - (emit_probe_epilogue): ... and matching _restore(). - - * main.cxx (main): Emit a "hello, I'm starting" message - before pass 5 in verbose mode. - -2006-02-17 Frank Ch. Eigler <fche@elastic.org> - - * stapfuncs.5.in (cpu): Document contextinfo function. - -2006-02-15 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (varlock*): Removed now unnecessary class. - (aggregation_locks): Renamed field to aggregations_active. - -2006-02-14 Frank Ch. Eigler <fche@elastic.org> - - * stapfuncs.5.in: Document new queue_stats tapset. - * elaborate.cxx (*): Put "while:" clarification messages before a - thrown semantic error. - * staptree.cxx (print_format::string_to_components): Correct - parse of "%%" formatting element. - -2006-02-07 Frank Ch. Eigler <fche@elastic.org> - - * src/testsuite/buildok/syscalls.stp: Build with "-u" to build-test - all auxiliary functions. - * tapsets.cxx (dwarf_query::add_probe_point): Add some "-vv" output. - -2006-02-07 Josh Stone <joshua.i.stone@intel.com> - - PR 2068 - * tapsets.cxx (dwarf_query::blacklisted_p): add __switch_to - to the blacklist for x86_64 architecture only. - -2006-02-06 Will Cohen <wcohen@redhat.com> - - * tapset/syscall2.stp: Correct opening comment typo. - -2006-02-06 Will Cohen <wcohen@redhat.com> - - * tapset/syscall2.stp: Correct closing comment typos. - -2006-02-01 Frank Ch. Eigler <fche@elastic.org> - - * testsuite/semko/one.stp: Make sure test case stays broken. - -2006-02-01 Martin Hunt <hunt@redhat.com> - - * stapfuncs.5.in: Document is_return(), returnval() and - probefunc(). - * testsuite/buildok/syscall.stp: Basic syscall test. - -2006-02-01 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac, systemtap.spec.in: Version 0.5.4. - * configure: Regenerated. - -2006-01-31 Josh Stone <joshua.i.stone@intel.com> - - PR 2252 - * translate.cxx (translate_pass): Fix legacy definition of - read_trylock. - -2006-01-30 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): Also print elapsed real time for each pass. - -2006-01-27 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx: Make "-v" (verbose) flag a counter. - * stap.1.in: Document this. - * session.h: Corresponding changes. - * {elaborate,buildrun,tapsets,translate}.cxx: Update all uses of - verbose flag to compare it to sensible level for value of message. - -2006-01-27 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): In verbose mode, print user+sys times after - each pass. - * buildrun.cxx (compile_pass): Move success message back to main(). - -2006-01-26 Frank Ch. Eigler <fche@elastic.org> - - PR 2060: lock elevation, mop-up - * staptree.cxx (functioncall_traversing_visitor): Store a - current_function pointer during traversal. - (visit_embeddedcode): Use it to handle $target-synthesized functions. - (varuse_collecting_visitor::visit_assignment): Correct l-lr typo. - (visit_foreach_loop): Note added write on sorted foreach. - (visit_delete_statement): Note as read+write. - * staptree.h: Corresponding changes. - * elaborate.cxx (dead_assignment_remover::visit_expr_statement): - Correct stmt token after possible expression rewriting. - * tapsets.cxx (visit_target_symbol): Create naming convention - to recognize $target-synthesized functions. - * translate.cxx (emit_locks, emit_unlocks): New functions to - emit lock/unlock sequences at the outermost level of a probe. - (emit_probe): Call them. - (varlock_*): #if-0 out the lock code generation. Later, these - classes should be removed. - (translate_pass): Emit read_trylock() kludge macro for old kernels. - -2006-01-25 Frank Ch. Eigler <fche@elastic.org> - - PR 2205, patch from <hiramatu@sdl.hitachi.co.jp>: - * parse.cxx (scan): Correct EOF detection for %{ %} case. - -2006-01-24 Frank Ch. Eigler <fche@elastic.org> - - PR 2060 etc. - * tapsets.cxx (visit_target_symbol): Tolerate failed resolution by - letting target_symbol instance pass through to optimizer and - type checker. - * elaborate.cxx (semantic_pass_optimize): New family of functions and - associated visitor classes. - (visit_for_loop): Tolerate absent init/incr clauses. - (semantic_pass): Invoke unless unoptimized (-u) option given. - * main.cxx, session.h: Add support for flag. - * staptree.cxx (visit_for_loop): Tolerate absent init/incr clauses. - (traversing_visitor::visit_arrayindex): Visit the index expressions. - (functioncall_traversing_visitor): New class. - (varuse_tracking_visitor): New class. - * staptree.h: Corresponding changes. - * parse.cxx (parse_for_loop): Represent absent init/incr expressions - with null statement pointer instead of optimized-out dummy numbers. - * stap.1.in: Document optimization. - * testsuite/{semko,transko}/*.stp: Added "-u" or other code to many - tests to check bad code without optimizer elision. - * testsuite/semok/optimize.stp: New test. - - * elaborate.cxx (unresolved, invalid, mismatch): Standardize error - message wording. - * stapfuncs.5.in: Tweak print/printf docs. - * tapset/logging.stp: Remove redundant "print" auxiliary function, - since it's a translator built-in. - * testsuite/transok/five.stp: Extend test. - * translate.cxx (emit_symbol_data): Put symbol table into a separate - temporary header file, to make "-p3" output easier on the eyes. - * buildrun.cxx (compile_pass): Eliminate test-mode support throughout. - * main.cxx, session.h, translate.cxx: Ditto. - * main.cxx (main): For last-pass=2 runs, print post-optimization ASTs. - -2006-01-18 Josh Stone <joshua.i.stone@intel.com> - - * tapsets.cxx (profile_derived_probe::emit_probe_entries): Setup - c->regs properly in light of the emit_probe_prologue change. - -2006-01-18 Josh Stone <joshua.i.stone@intel.com> - - * translate.cxx (c_unparser::visit_foreach_loop): improved the error - message when _stp_pmap_agg fails. - -2006-01-18 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (c_unparser_assignment::visit_arrayindex): - Eliminate dummy assignments for "<<<" code. - -2006-01-17 Josh Stone <joshua.i.stone@intel.com> - - PR 2156 - * testsuite/buildok/pmap_foreach.stp: Add test with sorting - -2006-01-17 Josh Stone <joshua.i.stone@intel.com> - - PR 2156 - * translate.cxx (c_unparser::visit_foreach_loop): Check the return - value of _stp_pmap_agg() for NULL. - -2006-01-17 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec.in: Remove explicit kernel-devel dependency, - since some old kernel rpm builds don't virtual-provide it for - e.g. smp, hugemem. - -2006-01-17 Frank Ch. Eigler <fche@elastic.org> - - PR 2142 - * translate.cxx (EXTRACTORS_PERMISSIVE): New experimental policy - parameter. - (c_unparser::visit_arrayindex, visit_print_format, visit_stat_op): - Tolerate absent index (= NULL runtime return) in pmap. - (*): Make semantic_error messages consistently lower case. - * testsuite/buildok/iterate_histogram_buckets.stp: Note some missing - functionality. - -2006-01-17 Josh Stone <joshua.i.stone@intel.com> - - * stap.1.in: Document the 'delete' operator. - -2006-01-16 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in (elfutils_version): Require 0.119 now. - * configure.ac, systemtap.spec.in: Version 0.5.3. - * configure: Regenerated. - -2006-01-16 Josh Stone <joshua.i.stone@intel.com> - - PR 2140 - * translate.cxx (mapvar::del): Add ability to delete an indexed stat - from (p)maps. - (delete_statement_operand_visitor::visit_symbol): Add ability to - delete entire pmaps and scalars. - (delete_statement_operand_tmp_visitor): Add a special tmpvar visitor - to parallel delete_statement_operand_visitor. - (c_tmpcounter::visit_delete_statement): Invoke the new visitor. - * testsuite/buildok/delete.stp: Also test scalar deletes. - * vim/syntax/stap.vim: Recognize 'delete' operator. - -2006-01-15 Frank Ch. Eigler <fche@elastic.org> - - PR 2148 - * translate.cxx (MAXERRORS): Actually the max should be 0, so first - error aborts session. - -2006-01-13 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx (main): Suppress "Try again with -v" message if already - verbose. - -2006-01-13 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (c_unparser:getmap): Correct exception throwing typo. - -2006-01-12 Josh Stone <joshua.i.stone@intel.com> - - PR 2056 - * translate.cxx (c_unparser::aggregation_locks): Keeps track of - foreach's locks on pmaps to avoid extra aggregation. - (c_unparser::visit_foreach_loop): Set aggregation_locks appropriately. - (c_unparser::load_aggregate, mapvar::call_prefix, mapvar::get): - Use a new parameter to indicate that we should read from the - already-aggregated map rather than the full pmap.. - (c_unparser::visit_arrayindex c_unparser::visit_print_format, - c_unparser::visit_stat_op): Use aggregation_locks to avoid taking a - lock and aggregating the pmap. - (c_unparser::emit_map_type_instantiations): To read from a pmap's - aggregated map, we need to include map-gen.c for the _stp_map_* - functions. - (c_unparser::obtained_locks, varlock::varlock, varlock::~varlock): - Add simple static checking to detect incompatible nested locks during - translation, and flag it as an error. - -2006-01-11 Josh Stone <joshua.i.stone@intel.com> - - PR 2140 - * testsuite/buildok/delete.stp: Test correct compilation of the - 'delete' operator for all "legal" variations. - -2006-01-11 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (MAXERRORS): Oops, set back to intended default of 1. - -2006-01-10 Frank Ch. Eigler <fche@redhat.com> - - PR 1972. - * tapsets.cxx (var_expanding_copy_visitor::visit_target_symbol): - Produce error message for $var access within .return probes. - * testsuite/semko/thirtyfour.stp: New test. - -2006-01-10 Frank Ch. Eigler <fche@redhat.com> - - PR 2060. - * buildrun.cxx (compile_pass): Add "V=1" to kbuild if verbose. - * translate.cxx (translator_output): For output-file constructor, - set an explicit output buffer. - (emit_module_init, emit_module_exit): Reorganize output, to spit - each individual probe registration/deregistration blurb into a - separate function. - * translate.h: Corresponding changes; set default buffer size to 8K. - * translate.cxx, tapsets.cxx: Replace "endl" by buffer-friendly "\n" - throughout code generation routines. - -2006-01-09 Frank Ch. Eigler <fche@redhat.com> - - * HACKING: Extend guidelines for tapset testing. - -2006-01-06 Will Cohen <wcohen@redhat.com> - - * Makefile.am (gcov,lcov): Don't remove .gcno .gcda files. - * Makefile.am (gcov): Fix to report data when tests fail. - * Makefile.am (lcov): New rule to generate html coverage data. - * Makefile.in: Regenerated. - -2006-01-05 Josh Stone <joshua.i.stone@intel.com> - - PR 2056 - * translate.cxx (var::~var, var::hist, var::buckets): make these - methods virtual, so we can use polymorphism. - (mapvar::hist, mapvar::buckets): Override the corresponding var - methods to handle pmaps correctly. - (c_unparser::visit_arrayindex, c_unparser::visit_print_format): Make - use of the new polymorphic behavior of var & mapvar when dealing with - histogram data. - * testsuite/buildok/pmap_foreach.stp: Add tests to check histogram - accesses with for/foreach. - -2006-01-04 Frank Ch. Eigler <fche@elastic.org> - - PR 2057. - * translate.cxx (c_unparser_assignment::visit_arrayindex): Don't take - write lock around pmap accumulation. - -2006-01-04 Will Cohen <wcohen@redhat.com> - - * testsuite/buildok/printf.stp: Improve test coverage. - -2006-01-03 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (emit_deregistration): Fix bad thinko on loop nesting. - -2006-01-03 Frank Ch. Eigler <fche@redhat.com> - - PR 1144, 1379 - * tapsets.cxx (emit_probe_prologue, _epilogue): New routines. - Call from existing derived_probe spots. Implement soft errors in - epilogue code. Implement reentrancy detection in prologue code. - (dwarf_derived_probe::emit_deregistration): Add kprobes layer - "nmissed" to skipped_count. - * translate.cxx (varlock): Use nsleep(TRYLOCKDELAY) in lock - contention loop. - (emit_module_exit): Report number of soft errors and skipped probes. - (emit_function, _probe): Add __restrict__ marker to context pointer. - (translate_pass): Define new MAXTRYLOCK, TRYLOCKDELAY, MAXERRORS, - MAXSKIPPED parameters. - * tapset/logging.stp (error): Don't stp_error, just set context state. - * stap.1.in, stapfuncs.5.in: Document soft errors. - * elaborate.h: Corresponding changes. - -2005-12-23 Kevin Stafford <krstaffo@us.ibm.com> - - * tapset/2.6.9-20.ELsmp/syscalls.stp: added kernel - version tapset - * tapset/2.6.9-20.ELsmp/i686/syscalls.stp: added kernel - version arch specific tapset - * tapset/doc/discrepancies.txt: log of kernel version - discrepancies. - -2005-12-22 Roland McGrath <roland@redhat.com> - - * configure.ac: Pass LDFLAGS to elfutils configure to force DT_RUNPATH. - * configure: Regeneraed. - -2005-12-21 Josh Stone <joshua.i.stone@intel.com> - - PR 2056 - * translate.cxx (itervar::next): emit different code for pmaps - -2005-12-21 Frank Ch. Eigler <fche@elastic.org> - - * loc2c.h: Add __attribute__ defeating code for g++ 3.3 compatibility. - -2005-12-20 Josh Stone <joshua.i.stone@intel.com> - - * vim/filetype.vim: defines *.stp files as SystemTap scripts - * vim/ftplugin/stap.vim: sets the comment styles - * vim/indent/stap.vim: enables simple auto-indenting - * vim/syntax/stap.vim: defines syntax highlighting - -2005-12-19 Roland McGrath <roland@redhat.com> - - * configure.ac, systemtap.spec.in: Version 0.5.2. - * configure: Regenerated. - -2005-12-17 Roland McGrath <roland@redhat.com> - - * staptree.h: #include <cassert> here. - -2005-12-14 Kevin Stafford <krstaffo@us.ibm.com> - - * tapset/2.6.14/syscalls.stp: Added 2.6.14 syscalls to tapset. - * 2.tapset/6.14/i686/syscalls.stp: Added i386 arch specific syscalls - to tapset for kernel 2.6.14. - * tapset/2.6.9-24.ELsmp/syscalls.stp: Added 2.6.9-24.ELsmp syscalls. - * tapset/2.6.9-24.ELsmp/x86_64/syscalls.stp: Added x86_64 arch - specific syscalls to tapset for kernel 2.6.9-24.ELsmp. - * tapset/system_calls.stp: File removed. - -2005-12-14 Martin Hunt <hunt@redhat.com> - - * tapset/system_calls.stp (epoll.ctl): Temporarily remove - references to $op and $event because gcc 4.0.2 can't - find them. - (epoll.wait): Ditto for $maxevents. - -2005-12-13 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (var_expanding_copy_visitor::visit_target): - Transcribe token pointer to synthesized functiondecl. - -2005-12-12 Josh Stone <joshua.i.stone@intel.com> - - * tapset/context.stp - (execname,pid,tid,ppid,pexecname,gid,egid,uid,euid): Removed - in_interrupt checks and other pointer checks. We now operate on - the assumption that "current" and its related data are always - valid. - * tapsets.cxx (profile_derived_probe::*,profile_builder::build): - Do kernel version checks at translation time, using the same - internal mechanisms as the preprocessor - a la %( kernel_v < - "2.6.10" %? ... %: ... %) - -2005-12-12 Kevin Stafford <krstaffo@us.ibm.com> - - * main.cxx (main): Added arch directory to the existing - kernel-version-sensitive search path. - -2005-12-12 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (translate_pass): Emit #include <linux/profile.h>. - -2005-12-12 Will Cohen <wcohen@redhat.com> - - * tapset/logging.stp (function_exit): Make sure systemtap probes - stop collection additional data. - -2005-12-12 Frank Ch. Eigler <fche@redhat.com> - - Fix parse tree pretty-printer. - * staptree.h (print_format): Add raw_components field. - * parse.cxx (parse_symbol): Set it. - * staptree.cxx (lex_cast_qstring): Copy it here too. - (binary_expression::print): Add a space around operator, due to - lexical ambiguity (expr % paren-expr) vs %( preprocessor op. - (array_in:: foreach_loop:: arrayindex::print): Print base as indexable. - (print_format::string_to_components): Use parse_error, not semantic. - (print_format::print): Properly quote formatting string. Print - histogram argument. - * translate.cxx (visit_print_format): Properly quote formatting string. - (varlock): Reword lock timeout error message. - * testsuite/buildok/printf.stp: Add some quoting troublemakers. - * testsuite/parseok/unparser.stp: New file. - -2005-12-11 Roland McGrath <roland@redhat.com> - - * configure.ac: Bump version to 0.5.1 for test builds. - * systemtap.spec.in: Remove ExclusiveArch. - * configure: Regenerated. - - PR 1916 - * configure.ac: Grok --with-elfutils. - * Makefile.am [BUILD_ELFUTILS] (install-elfutils, stamp-elfutils): - New targets. - [BUILD_ELFUTILS] (stap_LDFLAGS, stap_LDFLAGS): Add flags - to point at local elfutils build. - [BUILD_ELFUTILS] (BUILT_SOURCES): Add stamp-elfutils. - [BUILD_ELFUTILS] (stap_DEPENDENCIES): New variable. - [BUILD_ELFUTILS] (lib-elfutils/libdw.so): New target. - [BUILD_ELFUTILS] (install-exec-local): Depend on install-elfutils. - (loc2c_test_LDADD): Set this to $(stap_LDADD). - (loc2c_test_CPPFLAGS, loc2c_test_LDFLAGS): New variables. - * Makefile.in: Regenerated. - * compile: New file from automakeland. - * systemtap.spec.in (elfutils_version): Require 0.118 or later. - [bundled_elfutils]: Remove old hacks for building elfutils, and rely - on configure --with-elfutils instead. - - * Makefile.am (pkglibexecdir): New variable. - (AM_CPPFLAGS): Use it. - (pkglibexec_PROGRAMS): Set this instead of noinst_PROGRAMS with stpd. - (pkglibexec_SCRIPTS, CLEANFILES): New variables. - (install-exec-local): Target removed. - * runtest.sh: Set LD_LIBRARY_PATH when lib-elfutils is in use. - - * loc2c-test.c (get_location): Fix function name in error message. - -2005-12-09 Graydon Hoare <graydon@redhat.com> - - * elaborate.cxx (alias_expansion_builder::build): Fix comment typo. - * tapsets.cxx (symbol_cache): New class. - (dwflpp::cache): Add cache. - (dwflpp::pattern_limited_cus): New member. - (dwflpp::pattern_limited_funcs): New member. - (dwflpp::limit_search_to_function_pattern): New method. - (dwflpp::iterate_over_cus): Modify to use cached, limited sets. - (dwflpp::iterate_over_functions): Likewise. - (dwarf_builder::user_dw): New member. - (dwarf_builder::kern_dw): New member. - (dwarf_builder::~dwarf_builder): Add dtor. - (query_module): Call dwflpp::limit_search_to_function_pattern. - (dwarf_builder::build): Initialize persistent dwflpp members on demand. - -2005-12-08 Graydon Hoare <graydon@redhat.com> - - * translate.cxx (delete_statement_operand_visitor::visit_arrayindex): - Prohibit deleting histogram buckets. - (c_tmpcounter::visit_array_in): Direct to visit_arrayindex. - (c_unparser::visit_array_in): Likewise. - - * testsuite/buildok/histogram_operator_in.stp: New test. - -2005-12-08 Frank Ch. Eigler <fche@elastic.org> - - PR 1937 - * buildrun.cxx (run_pass): Pass new "-d PID" option to stpd. - Set SIGHUP to SIG_IGN too. - -2005-12-07 Graydon Hoare <graydon@redhat.com> - - * staptree.cxx (traversing_visitor::visit_foreach_loop): Visit - the base indexable of the foreach loop. - - * translate.cxx (c_tmpcounter::visit_foreach_loop): Implement - histogram bucket iteration arm. - (c_unparser::visit_foreach_loop): Likewise. - (c_tmpcounter::visit_arrayindex): Fix typo. - - * testsuite/buildok/iterate_histogram_buckets.stp: New test. - -2005-12-07 Martin Hunt <hunt@redhat.com> - - * translate.cxx (mapvar::fini): Use _stp_pmap_del() on pmaps. - (emit_global): For pmaps, use "PMAP" instead of "MAP". - -2005-12-06 Frank Ch. Eigler <fche@elastic.org> - - PR 1934. - * tapsets.cxx (resolve_prologue_endings2): Add new heuristic for - tail-call optimized functions. - (query_func_info): Make somewhat less verbose. - -2005-12-06 Graydon Hoare <graydon@redhat.com> - - * translate.cxx (visit_print_format): Explicitly Cast int64_t - (pe_long) args to (long long) in generated code, for portability. - -2005-12-05 Frank Ch. Eigler <fche@elastic.org> - - * *.cxx: Add <cassert> #include as needed. - -2005-12-02 Graydon Hoare <graydon@redhat.com> - - * elaborate.cxx (mutated_var_collector): Forward - traversal portion of calls to base class. - (mutated_var_collector::visit_arrayindex): Resolve - arrayindex-into-histogram expression as pe_long. - (typeresolution_info::visit_print_format): Traverse - into histogram if present. - - * parse.cxx (parse_symbol): Handle parse ambiguity surrounding - print(@hist_op(...)[...]). - - * staptree.cxx (traversing_visitor::visit_arrayindex): Visit - base member of arrayindex. - - * translate.cxx (c_unparser::histogram_index_check): New method. - (var::hist): Fix bug. - (var::buckets): New method. - (stmt_expr::stmt_expr): Print with newline. - (c_unparser::load_map_indices): Handle indexing-histogram case. - (c_tmpcounter::visit_arrayindex): Likewise. - (c_unparser::visit_arrayindex): Likewise. - (c_tmpcounter_assignment::visit_arrayindex): Throw error when - user attempts to write to histogram bucket. - (c_unparser_assignment::visit_arrayindex): Likewise. - - * testsuite/buildok/print_histogram_entry.stp: New test. - -2005-12-02 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bump version number. - * stap.1.in: Document some of the new print/stats stuff. - * configure: Regenerated. - * systemtap.spec.in: Enable ia64 and ppc builds. - -2005-12-01 Frank Ch. Eigler <fche@elastic.org> - - PR 1944 improved hack. - * translator.cxx (c_tmpcounter::visit_block): New routine, allows - overlay of sequential statements' temporaries within context. - -2005-12-01 Frank Ch. Eigler <fche@redhat.com> - - PR 1944 quick hack. - * translator.cxx (translate_pass): Reduce default MAXNESTING to 10. - (emit_module_init): Add a paranoid check against oversize contexts. - * stap.1.in: Document MAXNESTING change. - -2005-11-30 Frank Ch. Eigler <fche@redhat.com> - - PR 1276 - From Josh Stone <joshua.i.stone@intel.com>: - * tapsets.cxx (profile_derived_probe, profile_builder, - register_standard_tapsets): Support timer.profile variety. - * stapprobes.5.in: Document it. - * testsuite/builok/fourteen.stp: Test its buildability. - -2005-11-28 Graydon Hoare <graydon@redhat.com> - - * translate.cxx (var::assert_hist_compatible): New method. - (var::hist): New method. - (c_unparser::load_aggregate): New method. - (hist_op_downcaster): Remove, it was a mistake. - (expression_is_hist_op): Likewise. - (c_tmpcounter::visit_print_format): Implement print(@hist(...)). - (c_unparser::visit_print_format): Likewise. - - * staptree.h (struct print_format): Add optional hist_op* member. - * staptree.cxx (traversing_visitor::visit_functioncall): Visit - hist_op if present in print_format. - (deep_copy_visitor::visit_print_format): Likewise. - - * parse.cxx (parse_symbol): Special case to consume print(@hist(...)). - - * elaborate.cxx (typeresolution_info::visit_arrayindex): Fix type inference bug. - (typeresolution_info::visit_foreach_loop): Likewise. - - * testsuite/buildok/print_histograms.stp: New test. - -2005-11-28 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (c_tmpcounter_assignment::visit_symbol): Don't - emit unused temporary into context. Saves mucho space with strings. - -2005-11-27 Roland McGrath <roland@redhat.com> - - * loc2c.c (location_from_address): Diagnose null FB_ATTR specially. - - * loc2c.c (location_from_address): Fix function name in error message. - -2005-11-27 Frank Ch. Eigler <fche@elastic.org> - - * loc2c.c (location_from_address): Tolerate errors with NULL *input. - -2005-11-26 Roland McGrath <roland@redhat.com> - - PR 1868. - * loc2c.c (struct location): Move frame_base member out of the union. - (alloc_location): Initialize it. - (new_synthetic_loc, translate, location_from_address): Update uses. - (emit_loc_value): Don't handle frame_base here. - (c_emit_location): Do it here instead. - (translate): Track USED_DEREF separately for each piece. - Use a temporary struct when allocating a new piece, letting - a pending loc_address piece finish up first. - - * loc2c-test.c (main): Free SCOPES at end. - (handle_variable): Free POOL at end. - - * loc2c.c (translate): Initialize LOC->address.used_deref at start. - -2005-11-25 Frank Ch. Eigler <fche@elastic.org> - - PR 1336. - * tapsets.cxx (translate_final_fetch_or_store): Remove apparently - unnecessary check. - * testsuite/transok/ten.stp: New test for void* integerification. - -2005-11-24 Frank Ch. Eigler <fche@redhat.com> - - PR 1903 - * parse.cxx (eval_pp_conditional): Support %( arch == "i686" %) form. - * stap.1.in: Document it. - * testsuite/parseok/fourteen.stp: Test it. - * session.h (architecture): New field. - * main.cxx (main): Initialize it. - -2005-11-24 Frank Ch. Eigler <fche@redhat.com> - - PR 1917 - * translate.cxx (emit_common_header, emit_module_init, - emit_module_exit): Switch context array to per-cpu kmalloc variant. - * tapsets (*::emit_probe_entires): Use per_cpu_ptr() for my context. - -2005-11-23 Graydon Hoare <graydon@redhat.com> - - * elaborate.h (get_symbol_within_expression): Make visible. - * elaborate.cxx (get_symbol_within_expression): Make non-static. - (stat_decl_collector): New struct. - (semantic_pass_stats): New semantic pass. - (semantic_pass): Call it. - (semantic_pass_symbols): Remove collection of statistic_decls from files. - (visit_stat_op): Only fail if inferred type is not pe_long. - - * parse.cxx (parser::parse): Don't pass per-file statistic_decl - into parse_global. - (parser::parse_global): Don't parse global statistic_decls, - they're obsolete. - * parse.hh (parser::parse_global): Adjust signature to match. - - * session.h (statistic_decl::operator==): New method. - - * staptree.h (print_format::is_empty): New method. - (stapfile::stat_decls): Remove field. - * staptree.cxx (string_to_components): Fix bugs in format-string - parser. - - * translate.cxx (var): Make private fields protected. - (var::init): Support HIST_NONE stats. - (aggvar): New struct. - (mapvar::is_parallel): New method. - (mapvar::call_prefix): Use it. - (mapvar::calculate_aggregate): New method. - (mapvar::fetch_existing_aggregate): New method. - (mapvar::get): Support pe_stats. - (mapvar::init): Use is_parallel(), and support HIST_NONE. - (itervar::itervar): Only fault on pe_unknown. - (itervar::start): Use mapvar::is_parallel and - mapvar::fetch_existing_aggregate. - (emit_map_type_instantiations): Include alloc.c before pmap-gen.c. - Include pmap-gen.c for pe_stats maps. - (c_unparser::gensym_aggregate): New method. - (c_unparser::visit_foreach_loop): Handle mapvar::is_parallel case. - (arrayindex_downcaster): New struct. - (expression_is_arrayindex): New function. - (c_tmpcounter::visit_stat_op): New method. - (c_unparser::visit_stat_op): Implement. - (c_unparser::visit_hist_op): Add commentary, still not implemented. - - * testsuite/buildok/stat_{insert,extract}.stp: New tests. - * testsuite/semok/ten.stp: Correct for changes to global declarations. - * testsuite/semko/*.stp: Likewise. - -2005-11-21 Roland McGrath <roland@redhat.com> - - * loc2c.c (c_translate_location): Take Dwarf_Op vector as argument - directly, not Dwarf_Attribute. - * loc2c.h: Update decl. - * loc2c-test.c (get_location): New function. - (handle_variable): Use it. - * tapsets.cxx (dwflpp::translate_location): New method. - (dwflpp::translate_components, dwflpp::literal_stmt_for_local): Use it. - -2005-11-21 Frank Ch. Eigler <fche@elastic.org> - - PR 1276 - From Josh Stone <joshua.i.stone@intel.com>: - * tapsets.cxx (timer_derived_probe, timer_builder, - register_standard_tapsets): Support timer.ms() variety. - * stapprobes.5.in: Document it. - * testsuite/builok/fourteen.stp: Test its buildability. - -2005-11-18 Martin Hunt <hunt@redhat.com> - - PR 1837 - * testsuite/buildko/one.stp: Replace printk. - * testsuite/buildok/one.stp: Ditto. - * testsuite/buildok/two.stp: Ditto. - * testsuite/semko/fifteen.stp: Ditto. - * testsuite/semko/fourteen.stp: Ditto. - * testsuite/semko/thirteen.stp: Ditto. - * testsuite/transok/eight.stp: Ditto. - * testsuite/transok/seven.stp: Ditto. - * testsuite/transok/six.stp: Ditto. - - * tapsets.cxx (*::emit_probe_entries): Replace printk() calls - with _stp_warn(). - - * stap.1.in: Replace printk with printf in example. - - * stapfuncs.5.in: Remove docs for printk and add for - print and printf. - - * tapset/logging.stp (printk): Deleted. - -2005-11-13 Graydon Hoare <graydon@redhat.com> - - * staptree.h (struct indexable): New struct. - (classify_indexable): New function. - (classify_const_indexable): New function. - (struct symbol): Implement indexable. - (struct arrayindex): Take indexable as base. - (struct foreach_loop): Take indexable as base. - (struct print_format): New struct. - (enum stat_component_type): New enum. - (struct stat_op): New struct. - (enum historgram_type): New enum. - (struct hist_op): New struct. - (struct visitor) - (struct traversing_visitor) - (struct throwing_visitor) - (struct deep_copy_visitor): Add new visitor methods. - (require): Specialize for indexable*. - - * staptree.cxx (print_format::*) - (stat_op::*) - (hist_op::*) - (indexable::*) - (traversing_visitor::*) - (throwing_visitor::*) - (deep_copy_visitor::*) - (classify_indexable) - (classify_const_indexable): Implement - (deep_copy_visitor::*): Update to use indexables. - - * parse.h (parser::parse_indexable): New method. - (parser::parse_hist_op_or_bare_name): New method. - - * parse.cxx (lexer::scan): Accept @ in identifiers. - (parser::parse_array_in) - (parser::parse_foreach_loop): Call parse_indexable. - (parser::parse_hist_op_or_bare_name): Implement. - (parser::parse_indexable): Implement. - (parser::parse_symbol): Accept printf, stat_ops, hist_ops. - - * elaborate.h (struct typeresolution_info): Add methods for - visiting print_format, stat_op, hist_op. - - * elaborate.cxx (symbol_fetcher): New class. - (get_symbol_within_expression): New function. - (get_symbol_within_indexable): New function. - (mutated_var_collector): Replace mutated_map_collector. - (no_var_mutation_during_iteration_check): Replace - no_map_mutation_during_iteration_check. - (semantic_pass_vars): Replace semantic_pass_maps. - (semantic_pass): Update call accordingly. - (symresolution_info::*) Add new visitors, teach about indexables - (typeresolution_info::*) Likewise. - - * translate.cxx - (c_unparser::getiter): Take symbol, not foreach_loop. - (c_unparser::*) Add new visitors, teach about indexables. - (c_tmpcounter::*) - (delete_statement_operand_visitor::visit_arrayindex) - (c_tmpcounter_assignment::*) - (c_unparser_assignment::*): Likewise. - (hist_op_downcaster): New struct. - (expression_is_hist_op): New function. - - * testsuite/buildok/printf.stp: New test for print_format. - -2005-11-10 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (c_unparser::visit_array_in, visit_arrayindex): - Finish adapting to PR 1275 by switching back to read locks. - -2005-11-09 Martin Hunt <hunt@redhat.com> - - * translate.cxx: New API uses HIST_LOG and HIST_LINEAR - instead of HSTAT_LOG and HSTAT_LINEAR. - -2005-11-09 Frank Ch. Eigler <fche@elastic.org> - - Reported by Guang Lei Li <liguangl@cn.ibm.com>: - * tapset/context.stp (pid,ppid,tid): Correctly pick tgid vs pid. - * testsuite/buildok/context_test.stp: Print out tid() too. - -2005-11-08 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (blacklisted_p): Tolerate NULL filename parameter. - * src/testsuite/semok/twenty.stp: New test to enumerate everything - dwarfly probeable. - -2005-11-08 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (c_unparser::visit_foreach_loop): With PR 1275 - done, add back read lock around foreach loop. Add a write lock - around preceding sort operation. Leave a race condition window. :-( - -2005-11-08 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (mapvar::exists): Correct some more. - -2005-11-08 Frank Ch. Eigler <fche@redhat.com> - - Patch from "Mao, Bibo" <bibo.mao@intel.com> - * translate.cxx (mapvar::exists): Correct 64-bit type mismatch. - -2005-11-08 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (blacklisted_p): Add blacklist for some .return - probes to kludge around bug #1345. - * tapset/system_calls.stp: Add some %( %? %) conditionals to - get closer to using tapset on 2.6.9 kernel. - -2005-11-07 Frank Ch. Eigler <fche@redhat.com> - - PR 1828. - * tapsets.cxx (blacklisted_p): New function. Add a few blacklist - entries. - * testsuite/semko/thirtythree.stp: New test. - -2005-11-07 Frank Ch. Eigler <fche@redhat.com> - - * testsuite/buildok/twentytwo.stp: Add another test for PR 1271. - -2005-11-04 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (dwarf_derived_probe::emit_registrations): Add - possible kprobe address prechecking logic. Set kretprobes - maxactive to zero. - * translate.cxx (emit_module_init): Set a more helpful default - probe_point value for use in registration errors. Exit properly - after registration failure of probe #0. - -2005-11-04 Roland McGrath <roland@redhat.com> - - * tapsets.cxx (add_probe_point): Use dwfl_module_relocation_info to - get symbol name when dwfl_module_relocations has the info. - -2005-11-03 Roland McGrath <roland@redhat.com> - - * tapsets.cxx (add_probe_point): Use explicit test with assignment in - while condition. - -2005-11-03 Frank Ch. Eigler <fche@elastic.org> - - PR 1329. - * tapsets.cxx (dwarf_query::add_probe_point): Look up section name - containing given address. Skip request if it came from .init.*. - * testsuite/semko/thirtytwo.stp: New test. - -2005-11-02 Martin Hunt <hunt@redhat.com> - - * Makefile.am (EXTRA_DIST): Add session.h. - * Makefile.in: Regenerated. - -2005-11-01 Frank Ch. Eigler <fche@elastic.org> - - Sound advice from <drepper@redhat.com>: - * configure.ac: Undo last change. - * configure.ac: Unregenerated. - * parse.cxx: Use glibc strverscmp function instead of rpmlib. - * stap.1.in: Update correspondingly. - -2005-11-01 Graydon Hoare <graydon@redhat.com> - - * translate.cxx (c_unparser::collect_map_index_types) - (c_unparser::emit_map_type_instantiations) - (c_unparser::visit_arrayindex) - (c_unparser::visit_array_in) - (delete_statement_operand_visitor::visit_arrayindex) - (c_unparser_assignment::visit_arrayindex) - (mapvar::*): Update to new runtime map API. - -2005-11-01 Frank Ch. Eigler <fche@elastic.org> - - PR 1425. - * configure.ac: Look for rpm-devel headers and libs. - * configure: Regenerated. - * session.h: New file to contain systemtap_session decl. - * staptree.h: Likewise evict statistics_decl. - * elaborate.h: Corresponding changes. - * main.cxx (usage): Elaborate. Re-enable "-r RELEASE" option. - * parse.cxx (parser): Add systemtap_session& field. Update users. - (scan_pp, eval_pp_conditional): New routines for preprocessing. - (peek, next): Call it. - (lexer::scan): Lex the preprocessor operators. - (parser::parse): Include an extra level of exception catching - for parse errors that occur during recovery. - * parse.h: Corresponding changes. - (parse_error): Allow explicit token parameter. - * stap.1.in: Document preprocessing. - * testsuite/parseok/fourteen.stp: New test. - -2005-10-31 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in, configure.ac: Version 0.4.2 cooked. - * configure: Regenerated. - - * configure.ac: Update libdw test to require 0.116 with dwarf_diecu. - * configure: Regenerated. - * systemtap.spec.in: Update elfutils requirement to 0.116. - * loc2c.c: Dwarf_Loc -> Dwarf_Op. - (location_from_address): dwarf_addrloclists -> dwarf_getlocation_addr. - (c_translate_location): Likewise. - (max_fetch_size): Remove fakeo dwarf_diecu macro. - * tapsets.cxx (dwflpp): Dwarf_Func -> Dwarf_Die; - dwarf_func_name -> dwarf_diename; - dwarf_func_entrypc -> dwarf_entrypc; - dwarf_func_file, dwarf_func_line -> dwarf_decl_file, dwarf_decl_line. - -2005-10-26 Roland McGrath <roland@redhat.com> - - * loc2c.c (max_fetch_size): Default to host pointer size, - while still waiting for new libdw entrypoint. - -2005-10-25 Roland McGrath <roland@redhat.com> - - PR 1271 cont'd. - * testsuite/buildok/twentytwo.stp: New file. - * testsuite/buildok/twentythree.stp: New file. - * loc2c.c (discontiguify): Add missing ; in output. - -2005-10-20 Graydon Hoare <graydon@redhat.com> - - PR 917 (incomplete) - * staptree.h (struct statistic_decl): New struct. - (stapfile::stat_decls): New member. - - * parse.h, parse.cxx - (parser::expect_known): Fix typo. - (parser::expect_number): New method. - (parser::parse_global): Parse global statistic_decls. - - * elaborate.h (systemtap_session::stat_decls): New member. - * elaborate.cxx (semantic_pass_symbols): Copy per-file stat_decls - to session-wide. - (typeresolution_info::visit_assignment): Detect some semantic stats - errors in type resolution pass. - - * translate.cxx (var::sd): New private member. - (var::var): Initialize it. - (var::sdecl): New accessor. - (var::init): Handle stats values. - (mapvar::mapvar): Pass through statistic_decl to var ctor. - (mapvar::get): Test for long explicitly. - (mapvar::set): Likewise. - (mapvar::init): Handle stats values. - (c_unparser::emit_common_header): Remove typedef of stats_t, - include stat.c when necessary. - (mapvar::key_typename): Typo. - (c_unparser::emit_map_type_instantiations): Thinko: value_typename not key_typename. - (c_unparser::c_typename): Implementation typename is "Stat", not "stats_t". - (c_unparser::c_assign): Fix bad error message. - (c_unparser_assignment::c_assignop): Handle operator <<<. - (c_unparser::getvar): Feed session statistic_decl into var. - (c_unparser::getmap): Likewise. - (c_unparser::visit_assignment): Handle operator <<<. - (c_tmpcounter_assignment::visit_symbol): Derive type from rvalue when present. - (c_unparser_assignment::visit_symbol) - (c_tmpcounter_assignment::visit_arrayindex) - (c_unparser_assignment::load_map_indices): Likewise. - (c_unparser::visit_arrayindex): Likewise, and Prohibit statistic rvalues. - (c_unparser_assignment::visit_arrayindex): Handle operator <<<. - - * testsuite/semko/twentyfour.stp: - * testsuite/semko/twentyfive.stp: - * testsuite/semko/twentysix.stp: - * testsuite/semko/twentyseven.stp: - * testsuite/semko/twentyeight.stp: - * testsuite/semko/twentynine.stp: - * testsuite/semko/thirty.stp: - * testsuite/semko/thirtyone.stp: New tests for prohibited statistic contexts. - * testsuite/buildok/twentytwo.stp: New test for legal statistic contexts. - -2005-10-19 Tom Zanussi <zanussi@us.ibm.com> - - PR 1194. - * elaborate.h: Move output_file variable into systemtap_session. - * buildrun.cxx (run_pass): Pass output file to stpd if applicable. - * main.cxx (main): Set output_file if -o option specified. - -2005-10-18 Frank Ch. Eigler <fche@redhat.com> - - PR 1477. - * main.cxx (main): Set PATH and LC_ALL, so - * buildrun.cxx (compile_pass, run_pass): ... and ... - * translate.cxx (emit_symbol_data): ... don't have to. - -2005-10-18 Frank Ch. Eigler <fche@elastic.org> - - PR 1482 cont'd. - * translator.cxx (emit_module_init): Set aside a variable for - detailed probe point id. - * tapsets.cxx (emit_registrations): Use it. - (add_probe_point): Correct synthesized probe-point typo. - -2005-10-17 Martin Hunt <hunt@redhat.com> - - PR 1482 - * tapsets.cxx (emit_registrations): On failure, don't - forget to unregister probe 0; - -2005-10-17 Frank Ch. Eigler <fche@elastic.org> - - PR 1338. - * parse.cx (parse_probe): Unconditionally visit parse_probe_point. - (parse_probe_point): Accept "*" as component name. - * stapprobes.5.in: Document this. - * elaborate.cxx (derive_probes): Rewrite. Make top-level function. - (match_node::find_and_build): New function to replace - (find_builder): Removed. - (match_key operator <): Correct one nasty typo. - (match_node::bind): Refuse to bind "*" component names. - (derived_probe_builder::build): Remove recursion output param. - (alias_expandion_builder::build): Recurse to derive_probes instead. - * elaborate.h: Corresponding changes. - * tapsets.cxx: Ditto. - (query_cu): Elide prologue finding for uninteresting CUs. - * testsuite/semok/nineteen.stp: New test. - * testsuite/semko/twentythree.stp: New test. - * testsuite/semko/twentyone/two.stp: Fix -p2. - -2005-10-17 Graydon Hoare <graydon@redhat.com> - - * testsuite/semko/twentyone.stp: Check function doesn't match inline. - - * testsuite/semko/twentytwo.stp: Check inline doesn't match function. - - * testsuite/buildok/six.stp: Change "function" to "inline". - - * stapprobes.5.in: Describe "inline" probes. - - * tapsets.cxx (TOK_INLINE): New token "inline". - (dwarf_query::has_inline_str) - (dwarf_query::has_inline_num) - (dwarf_query::inline_str_val) - (dwarf_query::inline_num_val): New members. - (dwarf_query::dwarf_query): Load new members. - (query_dwarf_inline_instance) - (query_dwarf_func) - (query_cu) - (query_module) - (dwarf_derived_probe::add_probe_point) - (dwarf_builder::build): - Use inline-related members where appropriate. - (dwarf_derived_probe::register_inline_variants): New method. - (dwarf_derived_probe::register_function_and_statement_variants): - Call it. - -2005-10-14 Roland McGrath <roland@redhat.com> - - PR 1271. - * loc2c.c (translate): Set LOC->byte_size in loc_noncontiguous result. - (struct location.address): New member `declare'. - (new_synthetic_loc, translate): Initialize it. - (struct location.type): Add loc_fragment, loc_decl to enum. - (c_emit_location): Emit unadorned code for loc_fragment. - (discontiguify): New function. - (c_translate_fetch, c_translate_store): Call it. - (get_bitfield): New function, broken out of .... - (emit_bitfield): ... here. Function removed. - (declare_noncontig_union): New function. - (max_fetch_size): New function. - (translate_base_fetch): New function, broken out of ... - (c_translate_fetch): ... here. Call it. - Use get_bitfield here, not emit_bitfield. - (c_translate_store): Likewise. - (c_emit_location): Emit declarations first. - - * loc2c.c (dwarf_diename_integrate): Function removed. - Change all callers to use dwarf_diename. - - * loc2c-test.c (handle_variable): Check for "=" before fetching DIE - from ATTR_MEM. - -2005-10-13 Roland McGrath <roland@redhat.com> - - * loc2c.c (c_emit_location): Use final location's used_deref flag too. - - * loc2c.c (translate): Pass LOC to alloc_location, not INPUT. - - * loc2c-test.c (fail): Print a newline after the error message. - -2005-10-10 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (match_node::bind): Improve error message. - (register_library_aliases): Catch and verbosify error message. - (semantic_pass): Provide a back-up exception catcher. - -2005-10-10 Frank Ch. Eigler <fche@elastic.org> - - PR 1456. - * translate.cxx (c_unparser_assignment): Rename "pre" field to "post", - add blurb to clarify polarity. - (visit_pre/post_crement): Flip passed flag value. - -2005-10-07 Frank Ch. Eigler <fche@elastic.org> - - PR 1366. - * staptree.h (foreach_loop): Add sort_column, sort_direction fields. - * parse.cxx (parse_foreach_loop): Parse "+"/"-" suffix operators. - * stap.1.in, stapex.5.in: Document them. - * staptree.cxx (foreach_loop print, copy): Propagate them. - * translate.cxx (visit_foreach_loop): Support them. - * testsuite/parseok/fifteen.stp, parseko/thirteen.stp, - buildok/twentyone.stp: Test them. - -2005-10-07 Kevin Stafford <kevinrs@us.ibm.com> - - * tapset/system_calls.stp: All 281 syscalls *prototyped*. They - are still untested. Many of the aliases useability are contin- - gent upon resolution of namely: bz #1295 & bz #1382. - -2005-10-06 Frank Ch. Eigler <fche@elastic.org> - - * stap.1.in: Document -b/-s options. - * main.cxx (usage): Clarify -b/-s blurbs. - * translator.cxx (translate_pass): Handle bulk_mode here instead. - -2005-10-06 Frank Ch. Eigler <fche@elastic.org> - - PR 1332. - * translate.cxx (emit_symbol_data): New function to transcribe - a processed address->symbol lookup table, based upon /proc/kallsyms. - -2005-10-05 Tom Zanussi <zanussi@us.ibm.com> - - * buildrun.cxx (run_pass): Add bulk/buffer_size flags to flags - passed to stpd. - * elaborate.h (systemtap_session): Add bulk/buffer_size flags. - * main.cxx (usage,main): Add -b (bulk), -s (buffer_size) options. - processing. - -2005-10-04 Graydon Hoare <graydon@redhat.com> - - PR 1131. - * tapsets.cxx - (target_variable_flavour_calculating_visitor::visit_target_symbol) - (var_expanding_copy_visitor::visit_target_symbol): - Require guru mode for writing to target vars. - * testsuite/buildok/twenty.stp: Test writing to target vars. - -2005-10-01 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (get_module_dwarf): Add "required" parameter, which - throws an exception if debuginfo is not found. - (focus_on_module_containing_global_address): Tolerate miss. - (query_kernel_exists): New function to test for "kernel" module in - dwfl_getmodules() result set. - (dwarf_builder::build): Call it if appropriate. - -2005-09-30 Graydon Hoare <graydon@redhat.com> - - PR 1131. - * tapsets.cxx (dwflpp::find_variable_and_frame_base) - (dwflpp::translate_components) - (dwflpp::resolve_unqualified_inner_typedie) - (dwflpp::translate_final_fetch_or_store): New functions. - (dwflpp::literal_stmt_for_local): Factor a bit. - (variable_flavour_calculating_visitor::visit_target_symbol): - Don't fault on lvalue, just collect an extra char. - (var_expanding_copy_visitor::target_symbol_setter_functioncalls): - New member. - (var_expanding_copy_visitor::visit_assignment): New method. - (var_expanding_copy_visitor::visit_target_symbol): Permit lvalues. - -2005-09-30 Frank Ch. Eigler <fche@elastic.org> - - * tapset/system_calls.stp (*_str): Simplified boolean test logic - throughout, fixed some typos. - -2005-09-28 Frank Ch. Eigler <fche@elastic.org> - - PR 1182. - * main.cxx (main): Support -D macro-setting option. - * stap.1.in: Document it and related macros. - * buildrun.cxx (compile_pass): Emit macro definitions. - * translate.cxx (translate_pass): Guard limit macros with #ifdef. - Eliminate MAXCONCURRENCY macro. - * elaborate.h (systemtap_session): Add "macros" field. - * parse.cxx (parse_if_statement): Clear "elseblock" if needed. - -2005-09-27 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (query_cu_containing_global_address): Tolerate - way out of range addresses that result in null cudie pointers. - -2005-09-27 Frank Ch. Eigler <fche@elastic.org> - - PR 1368. - * translate.cxx (emit_common_header): Move some MAX* definitions out ... - (translate_pass): ... to here. Fix probe_start API impedance mismatch. - (emit_module_init, exit): Tolerate registration errors, such as absence - of kretprobes support. - -2005-09-27 Frank Ch. Eigler <fche@elastic.org> - - PR 1311. - * tapsets.cxx (target_variable_flavour_calculating_visitor:: - visit_target_symbol): Print verbose error. - (var_expanding_copy_visitor::visit_target_symbol): Throw - simple error. - -2005-09-26 Frank Ch. Eigler <fche@elastic.org> - - * stapfuncs.5.in: Extend errno_str verbiage. - * tapset/errno.stp: Canonicalize script code slightly. - -2005-09-26 Frank Ch. Eigler <fche@elastic.org> - - PR 1295. - * tapsets.cxx (resolve_prologue_endings2): Try another heuristic - for end-of-prologue. - -2005-09-22 Graydon Hoare <graydon@redhat.com>, - Frank Ch. Eigler <fche@elastic.org> - - PR 1330. - * tapsets.cxx (dwarf_derived_probe): Allow multiple probe_point - locations per derived_probe. - (dwarf_query): Add probe "flavour" concept, to reuse probe bodies for - identical flavours across wildcards. - (dwarf::emit_registrations, emit_deregistrations, emit_probe_entries): - Reorganize. - * staptree (probe::printsig): Put multiple locations on separate lines. - -2005-09-22 Will Cohen <wcohen@redhat.com> - - * stap.1.in: Correct sys_read alias example. - -2005-09-19 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (*::emit_probe_entries): Handle busy-count correctly - upon contention. - -2005-09-14 Graydon Hoare <graydon@redhat.com> - - PR 1260 - * tapsets.cxx (dwflpp::resolve_prologue_endings): Correct logic - error triggered by consecutive function-beginning line records. - -2005-09-14 Frank Ch. Eigler <fche@elastic.org> - - PR 1344 - * translate.cxx: Call _stp_map_clear for "delete ARRAY" statement. - -2005-09-14 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in: Version 0.4.1 cooked. - Build runpath into elfutils libs too. - -2005-09-14 Frank Ch. Eigler <fche@elastic.org> - - PR 1257 - * Makefile.am (AM_CFLAGS): Add -fexceptions. - * loc2c.c (c_translate_location): Invoke *fail properly. - * Makefile.in: Regenerated. - -2005-09-13 Graydon Hoare <graydon@redhat.com> - - PR 1260 - * tapsets.cxx (func_info::func_info): Initialize fields. - (inline_instance_info::inline_instance_info): Likewise. - (query_inline_instance_info): Add try-catch block. - (query_func_info): Likewise, and fault when missing prologue-end. - (query_dwarf_func): Fault when missing entrypc. - -2005-09-12 Frank Ch. Eigler <fche@elastic.org> - - PR 1335 - * translate.cxx (c_tmpcounter::visit_functioncall): Correct - recursion sequence. - * testsuite/buildok/nineteen.stp: New test case. - -2005-09-12 Graydon Hoare <graydon@redhat.com> - - PR 1306 - * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Fix two - off-by-one errors in previous change. - -2005-09-12 Graydon Hoare <graydon@redhat.com> - - PR 1306 - * tapsets.cxx (dwflpp::has_single_line_record): New function. - (dwflpp::iterate_over_srcfile_lines): Throw when user requests - single statement line with multiple records (and provide advice). - (query_cu): Adjust call to match. - (query_srcfile_line): Fix indentation. - -2005-09-10 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am, runtest.sh: Use a "testresuilt/" directory in build - tree rather than overloading "testsuite/". - * TODO: Removed obsoleted file. - * Makefile.in: Regenerated. - -2005-09-07 Martin Hunt <hunt@redhat.com> - - * stap.1.in: Document current "-c" and "-x" options. - -2005-09-07 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec.in: Remove kernel-debuginfo dependency. - -2005-09-07 Frank Ch. Eigler <fche@redhat.com> - - * main.cxx (main): Choose getpid()-based module names. - * tapsets.cxx: Make timer.jiffies' use of task_pt_regs __i386__-only. - -2005-09-07 Frank Ch. Eigler <fche@redhat.com> - - * stap.1.in: Oops, && and || do short-circuit. - -2005-09-06 Frank Ch. Eigler <fche@elastic.org> - - * stap.1.in: Clarify absence of short-circuiting in && and ||. - * translate.cxx (emit_function): Improve "array locals" message. - * tapset/timestamp.stp: Add gettimeofday_us function. Correct - arithmetic typing in other functions. - * stapfuncs.5.in: Document new function. - -2005-09-06 Martin Hunt <hunt@redhat.com> - - * systemtap.spec.in: Bump elfutils_version to .115. - -2005-09-05 Roland McGrath <roland@redhat.com> - - * loc2c.h: Comment fix. - -2005-09-06 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Require elfutils 0.115+. - * tapsets.cxx: Restore graydon's PR 1244 code. - * testsuite/buildok/eighteen.stp: Correct typing. - * configure: Regenerated. - -2005-09-06 Martin Hunt <hunt@redhat.com> - - * tapset/context.stp: Add function target(). - * stapfuncs.5.in (target): Document it. - * elaborate.h (struct systemtap_session): Add cmd and target_pid to - the struct. - * main.cxx (usage): Add descriptions of "-c" and "-x" options. - (main): Set s.cmd and s.target_pid. - * buildrun.cxx (stringify): Copy this utility func here too. - (run_pass): Add new options to set cmd and pid to the stpd - command line. - -2005-09-06 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (emit_probe_entries): Disable fault_handler for now. - -2005-09-05 Frank Ch. Eigler <fche@elastic.org> - - PR 1289 - * translate.cxx (lex_cast_qstring): Correct "cast" of object - to string containing more than one word. - * tapset.cxx (lex_cast_qstring): Ditto. - (dwarf_derived_module::emit_probe_entries): Emit and use - a generic fault_handler. - -2005-09-05 Frank Ch. Eigler <fche@elastic.org> - - PR 1172. - * staptree.h, staptree.cxx: Make all ::print*(), operator<< - functions take const staptree objects. - (literal_string::print): \-prefix double-quotes. - * translate.cxx (emit_common_header): Add context probe_point field. - Switch to atomic_t busy flags. - (emit_module_exit): Use atomic operations for busy flag. - (visit_*): Use lex_cast_qstring for last_stmt strings. - * tapsets.cxx (lex_cast_qstring): New function. - (*::emit_probe_entries): Populate probe_point. Use atomic operations - for busy flag. - * tapset/context.stp (pp): New function. - * stapfuncs.5.in: Document it. - * testsuite/buildok/context_test.stp: Test it. - -2005-09-04 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (visit_literal_string): \-prefix double-quotes. - -2005-09-04 Martin Hunt <hunt@redhat.com> - - * testsuite/buildok/context_test.stp: New test. - * tapset/logging.stp (log): Call _stp_printf(). - * stapfuncs.5.in: Add contextinfo funcs. - * tapset/context.stp: Minor cleanup. - -2005-09-03 Frank Ch. Eigler <fche@elastic.org> - - PR 1187 prime - * tapset.cxx (literal_stmt_for_local): Don't automgaically copy - target char*'s to systemtap strings. - * tapset/conversions.stp (user_string, kernel_string): New functions. - * stapfuncs.5.in: Document new functions. - -2005-09-03 Frank Ch. Eigler <fche@elastic.org> - - PR 1292, by popular request. - * parse.cxx (parse_functiondecl): Allow optional value/param type - declarations. - * stap.1.in: Document this. - * tapset/*.stp: Convert most functions accordingly. - * testsuite/parseok/twelve.stp, semok/seven.stp, - semko/twenty.stp: Test this. - -2005-09-02 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (varlock): Use trylock only for write locks. - (translate_pass): Remove read_trylock macro hack. - (visit_foreach_loop): Remove protective read lock, until PR 1275. - (visit_*): Added many more "last_stmt"-setting expressions in the - output, to improve last_error message locality. - -2005-09-02 Martin Hunt <hunt@redhat.com> - - * tapset/logging.stp: Make log() be same as print(). - -2005-09-02 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx: Temporarily rolled back graydon's changes. - -2005-09-02 Frank Ch. Eigler <fche@elastic.org> - - * tapset/*.stp: Renamed several files to simplify names. - -2005-09-01 Graydon Hoare <graydon@redhat.com> - - PR systemtap/1244 - * testsuite/buildok/eighteen.stp: New test. - * tapsets.cxx (dwflpp::literal_stmt_for_local) - (query_statement, query_inline_instance_info) - (query_func_info, query_srcfile_line, query_cu) - (var_expanding_copy_visitor, visit_target_symbol) - (dwarf_derived_probe): Fix 1244. - -2005-09-01 Martin Hunt <hunt@redhat.com> - - * tapset/builtin_logging.stp: Add print. - - * tapset/context.stp: New file. First cut at some - context info. - -2005-09-01 Martin Hunt <hunt@redhat.com> - - * translate.cxx (emit_probe): Add a call to _stp_print_flush - at the end of each probe. - (translate_pass): Define STP_NUM_STRINGS to be 1 for - a scratch string. Include current.c and stack.c. Don't - define KALLSYMS_LOOKUP_NAME or KALLSYMS_LOOKUP. Remove - references to next_fmt() and stp_dbug(). - -2005-08-31 Graydon Hoare <graydon@redhat.com> - - PR systemtap/1258 - * tapsets.cxx (dwflpp::literal_stmt_for_local): - Support DW_TAG_enumeration_type tag as synonymous with - DW_TAG_base_type. - * loc2c.c (base_byte_size): Likewise. - * testsuite/buildok/seven.stp: Adjust to work on UP kernels. - -2005-08-31 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Correct segv - reported in PR 1270. - -2005-08-31 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (visit_array_in, visit_arrayindex): Use write locks - even for array reads, until PR 1275. - (translate_pass): Add read_trylock -> write_trylock escalation. - -2005-08-30 Roland McGrath <roland@redhat.com> - - * Makefile.am (install-data-local): Use mkdir -p, not -mkdir. - * Makefile.in: Regenerated. - -2005-08-30 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx (dwflpp::literal_stmt_for_local): Handle dwarf - pointer-to-1-byte-means-char case (found in PR 1187) - * parse.cxx (parse_symbol): Eliminate use of "." from target - symbol parser, conflicting with string concatenation operator. - * staptree.h (target_symbol::component_type) Eliminate - comp_struct_pointer_member, since . and -> are considered the - same now. - * staptree.cxx (target_symbol::print): Likewise. - * testsuite/buildok/seventeen.stp: Test solution on PR 1191. - * testsuite/buildok/six.stp: Test working portion of PR 1155. - * testsuite/semko/nineteen.stp: Unresolved portion of PR 1155. - -2005-08-30 Frank Ch. Eigler <fche@elastic.org> - - PR systemtap/1268 - * translator (varlock): Add deadlock detection code. - (emit_common_header): Add a new MAXTRYLOCK configuration macro. - -2005-08-29 Graydon Hoare <graydon@redhat.com> - - PR translator/1265 - * tapsets.cxx - (func_info::decl_file) - (func_info::decl_line) - (inline_instance_info::decl_file) - (inline_instance_info::decl_line): New fields. - (dwflpp::function_srcfile): Remove. - (dwflpp::function_file): Add. - (dwflpp::function_line): Add. - (dwarf_derived_probe::dwarf_derived_probe): Update. - (query_statement): Pass func, file, line through. - (query_inline_instance_info): Likewise. - (query_func_info): Likewise. - (query_srcfile_line): Query statement lines if - statement_str exists, rather than *_info. - (query_dwarf_inline_instance): Extract file and line. - (query_dwarf_func): Likewise. - (query_cu): Pass empty func, file, line, for address-based - queries. - -2005-08-29 Frank Ch. Eigler <fche@redhat.com> - - * runtest.sh: Tolerate relative $SRCDIR. - -2005-08-29 Frank Ch. Eigler <fche@redhat.com> - - * stapprobes.5.in, stapfuncs.5.in, stapex.5.in: New man pages. - * stap.1.in: Moved some content out. - * Makefile.am (man_MANS): Add new man pages. - * configure.ac (AC_CONFIG_FILES): Add them. - * systemtap.spec.in: Package them. - * Makefile.in, configure: Regenerated. - * buildrun.cxx (run_pass): Pass "-r" to stpd. - * translate.cxx (emit_common_header): Wrap try/catch around - variable decls, to improve exception particularity. - (visit_literal_number): Emit as unsigned literal, which is - actually a subtle correctness issue. - -2005-08-28 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (visit_target): Make target variable exceptions - more informative. - (literal_stmt_for_local): Improve bad-type exception message. - * translate.cxx (emit_module_init): Include probe point in comments. - -2005-08-27 Roland McGrath <roland@redhat.com> - - * loc2c-test.c (print_type): New function. - (print_vars): Use it. - - * loc2c-test.c (paddr, print_vars): New functions. - (main): If given no variable name argument, print out variables. - -2005-08-26 Graydon Hoare <graydon@redhat.com> - - * translate.cxx: Revert tmp initialization changes. - -2005-08-26 Graydon Hoare <graydon@redhat.com> - - * parse.cxx (scan): Preserve basic C-ish escapes. - * translate.cxx (c_tmpcounter::declaring): New flag. - (c_tmpcounter::declare_or_init): New helper method. - (c_tmpcounter::visit_*): Use declare_or_init. - (c_unparser::emit_function): Run a tmpcounter to initialize tmps. - (c_unparser::emit_probe): Likewise. - (c_unparser::c_strcpy): Use strlcpy. - (c_unparser::c_strcat): Use strlcat. - -2005-08-25 Roland McGrath <roland@redhat.com> - - * Makefile.am (EXTRA_DIST): List .h files explicitly. - Automake really does not like wildcards. - * Makefile.in: Regenerated. - -2005-08-25 Frank Ch. Eigler <fche@redhat.com> - - * Makefile.am (docs): Removed target. - * Makefile.in: Regenerated. - -2005-08-24 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx (dwflpp::literal_stmt_for_local): Fetch pointer types, - array types, strings, from target. - -2005-08-24 Roland McGrath <roland@redhat.com> - - * loc2c-test.c (handle_variable): Iterate on const_type/volatile_type. - -2005-08-24 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Require elfutils 0.114. - * tapsets.cxx: Brought back graydon's changes. - * configure: Regenerated. - -2005-08-24 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in: Update elfutils requirement. - -2005-08-24 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_global, emit_module_init): Use 2.6.9-compatible - rwlock initialization. - -2005-08-24 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (*::emit_probe_entries): Treat NULL and "" last_errors - both as clean early returns, not errors. - * translate.cxx: Revamp last_error handling logic. Remove all - "goto out" paths from expression context. - (visit_statement): Handle last_error exit one nesting level at a time. - (visit_return_statement, visit_functioncall): Set/reset last_error="". - (c_tmpcounter::visit_for_loop): New routine. - (c_unparser::visit_foreach, visit_for_loop): Rewrite to properly - support continue/breaks, non-local exits, (foreach) locks. - (emit_global): Emit lock variable. - (varlock ctor, dtor): Lock/unlock global variable. - (varlock_w, varlock_r): New concrete subclasses. Update all users. - * tapset/builtin_logging.stp (exit): Don't set last_error. - * src/testsuite/buildok/sixteen.stp: New test. - - * tapsets.cxx: Temporarily rolled back graydon's changes. - -2005-08-23 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx: Re-implement dwarf probe-pattern resolution. - -2005-08-22 Frank Ch. Eigler <fche@elastic.org> - - PR systemtap/1134 - * elaborate.h (module_fds): New member in systemtap_session. - * tapsets.cxx (dwarf_derived_probe ctor): Open /sys/module/$MOD/.text - for the duration of a systemtap session, to lock module in memory. - -2005-08-21 Frank Ch. Eigler <fche@redhat.com> - - PR systemtap/1195, systemtap/1193 - * elaborate.cxx (alias_expansion_builder): Set new block token. - * parse.cxx (parse_symbol): Set new target_symbol token. - * runtest.sh: Store more pertinent failure data. - * tapsets.cxx (emit_probe_entries): Rewrite error-handling path. - * translate.cxx (emit_common_header): Goodbye errorcount, hello - last_error & last_stmt. - (c_unparser::visit_statement): New "header" for all other stmts. - (c_assignop, visit_binary_expression): Adapt to last_error. - * tapset/builtin_logging.stp: Adapt to last_error. - -2005-08-19 Frank Ch. Eigler <fche@elastic.org> - - PR systemtap/1213 - * translate.cxx (visit_if_statement): Translate else arms. - -2005-08-19 Frank Ch. Eigler <fche@elastic.org> - - PR systemtap/1209 - * elaborate.cxx (derived_probe_builder): Add get_param function. - * elaborate.h: Declare them. - * tapsets.cxx (dwarf_query::get_*_param): Call them. - (timer_derived_probe, timer_builder): New classes. - (register_standard_tapsets): Register timer.jiffies(N) and friend. - * translate.cxx (translate_pass): #include <linux/timers.h>. - * stap.1.in: Document timer.jiffies(N) probe points. - * testsuite/buildok/fourteen.stp: New test. - -2005-08-19 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (find_var): Remove $pid/$tid builtin logic. - -2005-08-19 Martin Hunt <hunt@redhat.com> - - * stp_check.in: Remove stp-control. - -2005-08-18 Roland McGrath <roland@redhat.com> - - * loc2c.c (c_translate_addressof): Take TYPEDIE instead of TYPEATTR. - * loc2c.h: Update decl. - * loc2c-test.c (handle_variable): Handle DW_TAG_pointer_type target - for fetch. - -2005-08-18 Will Cohen <wcohen@redhat.com> - - * stp_check.in: See if relayfs available filesystem. - -2005-08-18 Roland McGrath <roland@redhat.com> - - * loc2c.c (struct location): New member `emit_address'. - (alloc_location): Initialize new member from ORIGIN. - (location_from_address): New argument EMIT_ADDRESS. - Initialize new member. - (translate): Use LOC->emit_address hook to format DW_OP_addr constant. - (location_relative): Die if DW_OP_addr is used. - (default_emit_address): New function. - (c_translate_location): New argument EMIT_ADDRESS, pass it down. - Use default_emit_address if argument is null. - * loc2c.h: Update decl. - * loc2c-test.c (handle_variable): Update caller. - * tapsets.cxx (dwflpp::literal_stmt_for_local): Update caller. - (dwflpp::loc2c_emit_address): New static method. - -2005-08-17 Roland McGrath <roland@redhat.com> - - PR systemtap/1197 - * loc2c.c (struct location): New members `fail', `fail_arg'. - (alloc_location): New function. Initialize those members. - (new_synthetic_loc, translate): Use that instead of obstack_alloc. - (location_from_address, location_relative): Likewise. - (FAIL): New macro. Use it everywhere in place of `error'. - (c_translate_location): Take new args FAIL, FAIL_ARG. - * loc2c.h: Update declaration. - * loc2c-test.c (fail): New function. - (handle_variable): Pass it to c_translate_location. - * tapsets.cxx (dwflpp::loc2c_error): New static method. - (dwflpp::literal_stmt_for_local): Pass it to to c_translate_location. - - PR systemtap/1205, systemtap/1206 - * loc2c.c (c_translate_fetch): Take TYPEDIE instead of TYPEATTR. - (c_translate_store): Likewise. - * loc2c.h: Update decls. - * loc2c-test.c (handle_variable): Update callers. - Look up type, resolve typedefs, and check that it's DW_TAG_base_type. - * tapsets.cxx (dwflpp::literal_stmt_for_local): Likewise. - - * loc2c.c (base_byte_size): Add assert on expected DIE tag. - (c_translate_array, c_translate_pointer): Likewise. - * loc2c.h: Amend comments to explicitly state type DIE tags expected. - - * loc2c.c: #include "loc2c.h". - -2005-08-16 Frank Ch. Eigler <fche@elastic.org> - - PR systemtap/1180 - * tapsets.cxx (*): Add more verbose-predicatation to informative - messages. Correct more hex/dec ostream mismatches. - (query_function): Use entry/querypc, not prologue-end, for - function().return and .statement() probe points. - (dwarf_derived_probe ctor): Reorganize function/statement - probe point regeneration. - -2005-08-16 Frank Ch. Eigler <fche@elastic.org> - - * main.cxx: Don't print library parse trees if last_pass=1. - -2005-08-14 Roland McGrath <roland@redhat.com> - - * systemtap.spec.in: Update elfutils_version requirement to 0.113; - restore bundled_elfutils setting to 1. - -2005-08-12 Graydon Hoare <graydon@redhat.com> - - * translate.cxx (c_tmpcounter::visit_array_in): Implement. - (c_unparser::visit_array_in): Likewise. - (mapvar::exists): New method. - -2005-08-12 Frank Ch. Eigler <fche@elastic.org> - - PR systemtap/1122 et alii - * parse.cxx (parse_literal): Parse and range-limit 64-bit numbers. - (parse_unary): Correct precedence glitch. - * staptree.h (literal_number): Store an int64_t. - * staptree.cxx: Corresponding changes. - * translate.cxx (check_dbz): Remove - insufficient. - (emit_function): Define CONTEXT macro sibling for THIS. - (c_typename): pe_long -> int64_t. - (visit_literal_number): Format literal rigorously and uglily. - (c_assignop, visit_binary_expression): Handle div/mod via new - helper functions in runtime. - * tapset/builtin_logging.stp: Add error, exit builtins. - * testsuite/buildok/ten,eleven.stp: New tests. - * testsuite/parse{ko,ok}/six.stp: Modify for larger numbers. - * testsuite/transok/one.stp: Add more ";"s, maybe unnecessarily. - -2005-08-11 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.spec.in: Tweak to turn into fedora-flavoured spec. - Don't build/install runtime docs. - -2005-08-11 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (uninstall-local): New target. - * Makefile.in: Regenerate. - -2005-08-11 Frank Ch. Eigler <fche@elastic.org> - - * translate.cxx (emit_function): Add an extra { } around the - function body visitation. - * tapset/timestamp_functions.stp: New file. - * tapset/builtin_conversions.stp: Aggregated from [hex]string. - * tapset/builtin_logging.stp: Aggregated from log/warn/printk. - -2005-08-11 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx: Tweak hex/decimal printing for consistency. - (emit_registrations): Remove module-specific code, anticipating - that libelf gives us run-time addresses already. - -2005-08-10 Roland McGrath <roland@redhat.com> - - * loc2c.c (emit_base_store): New function. - (emit_bitfield): Rewritten to handle stores, change parameters. - (c_translate_fetch): Update caller. - (c_translate_store): New function. - * loc2c.h: Declare it. - * loc2c-test.c (handle_variable): Grok "=" last argument to do a store. - - * loc2c.c (c_translate_location): Increment INDENT. - (c_translate_pointer): Likewise. - (emit_loc_value): Increment INDENT after emit_header. - -2005-08-10 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx (dwflpp::literal_stmt_for_local): Copy code from - loc2c-test to implement target member variable access. - -2005-08-10 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx - (dwflpp::global_addr_of_line_in_cu): Implement next-line heuristic. - (dwarf_query::get_number_param): Dwarf_Addr variant. - (query_cu): Add line-selecting variant for function iteration. - -2005-08-10 Frank Ch. Eigler <fche@elastic.org> - - PR translator/1186 - * elaborate.cxx (resolve_2types): Accept a flag to tolerate unresolved - expression types. - (visit_functioncall): Call it thusly. - * translate.cxx (emit_function): Tolerate void functions. - * stap.1.in: Document possibility of void functions. - * tapset/builtin_{log,printk,warn}.stp: Make these void functions. - * testsuite/buildok/nine.stp, semok/eighteen.stp: New tests. - -2005-08-10 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx: Correct hex/decimal misformatting of verbose messages. - * main.cxx: Add formal "-h" and "-V" options. - * stap.1.in: Document them. - -2005-08-10 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx: Move around "focusing on ..." messages to print - them only for matching functions/modules. - (dwflpp ctor): Also add cu (source file) name to derived - probe point. - -2005-08-09 Graydon Hoare <graydon@redhat.com> - - * testsuite/parseok/nine.stp: Update - * testsuite/semok/{six,seven,eleven,seventeen}.stp: Update. - -2005-08-09 Graydon Hoare <graydon@redhat.com> - - * staptree.{cxx,h} - (target_symbol): New struct. - (*_visitor::visit_target_symbol): Support it. - (visitor::active_lvalues) - (visitor::is_active_lvalue) - (visitor::push_active_lvalue) - (visitor::pop_active_lvalue): Support lvalue-detection. - (delete_statement::visit) - (pre_crement::visit) - (post_crement::visit) - (assignment::visit): Push and pop lvalue expressions. - * elaborate.{cxx,h} - (lvalule_aware_traversing_visitor): Remove class. - (no_map_mutation_during_iteration_check) - (mutated_map_collector): Update lvalue logic. - (typeresolution_info::visit_target_symbol): Add, throw error. - * parse.{cxx,h} - (tt2str) - (tok_is) - (parser::expect_*) - (parser::peek_*): New helpers. - (parser::parse_symbol): Rewrite, support target_symbols. - * translate.cxx (c_unparser::visit_target_symbol): Implement. - * tapsets.cxx (var_expanding_copy_visitor): Update lvalue logic, - change visit_symbol to visit_target_symbol. - -2005-08-09 Martin Hunt <hunt@redhat.com> - - PR 1174 - * stp_check.in: Supply path for lsmod. - * stp_check: Removed. - -2005-08-09 Graydon Hoare <graydon@redhat.com> - - * elaborate.cxx: - (delete_statement_symresolution_info): New struct. - (symresolution_info::visit_delete_statement): Use it. - (delete_statement_typeresolution_info): New struct. - (typeresolution_info::visit_delete_statement): Use it. - (symresolution_info::find_var): Accept -1 as 'unknown' arity. - * elaborate.h: Update to reflect changes in .cxx. - * translate.cxx (mapvar::del): New method. - (c_unparser::getmap): Check arity >= 1; - (delete_statement_operand_visitor): New struct. - (c_unparser::visit_delete_statement): Use it. - * staptree.cxx (vardecl::set_arity): Accept and ignore -1. - (vardecl::compatible_arity): Likewise. - * testsuite/buildok/eight.stp: New test for 'delete' operator. - -2005-08-08 Roland McGrath <roland@redhat.com> - - * loc2c-test.c: New file. - * Makefile.am (noinst_PROGRAMS): Add loc2c-test. - (loc2c_test_SOURCES, loc2c_test_LDADD): New variables. - * Makefile.in, aclocal.m4: Regenerated. - -2005-08-08 Frank Ch. Eigler <fche@elastic.org> - - * stap.1.in: Autoconfify old man page. - * configure.ac: Make it so. - * stap.1: Removed. - * configure, Makefile.in, aclocal.m4: Regenerated. - -2005-08-05 Frank Ch. Eigler <fche@elastic.org> - - * runtest.sh: Keep around log files from crashed processes, - those whose rc is neither 0 nor 1. - -2005-08-05 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (query_statement|function|cu|module): Add explicit - nested try/catch, since elfutils iteration seems to block - exception catching. - -2005-08-05 Frank Ch. Eigler <fche@elastic.org> - - PR translator/1175 - * translate.cxx (*): Added unlikely() markers to most emitted error - checks. - (mapvar::get,set): Handle NULL<->"" impedance mismatch. - (itervar::get_key): Ditto. Use base index=1 for keys. - * testsuite/buildok/one.stp: Extend. And it runs with -p5 too. - * stap.1: Document use of ";" statament as mechanism for grammar - ambiguity resolution. - * stp_check.in: Set $prefix. - * systemtap.spec.in: Prereq kernel-devel, kernel-debuginfo, - and not tcl. - * tapsets.cxx: Make slightly less verbose. - -2005-08-03 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx (dwflpp): Fix address calculation logic a bit, - and use prologue-end addresses for function probes. - -2005-08-03 Frank Ch. Eigler <fche@redhat.com> - - * stap.1: More meat, all stub sections filled. - * elaborate.cxx (visit_assignment): Add numerous missing cases. - * parse.cxx: Parse ".=" operator. - * testsuite/semok/sixteen.stp: Check them. - * main.cxx (usage): Don't show incompletely supported options. - -2005-08-03 Martin Hunt <hunt@redhat.com> - - * stp_check.in : Copy sources to /var/cache/systemtap. - * systemtap.spec.in: Install stp_check. - * Makefile.am (install-exec-local): Install stp_check. - -2005-08-03 Martin Hunt <hunt@redhat.com> - - * configure.ac: Add stp_check to AC_CONFIG_FILES. - * stp_check.in : New file. - -2005-08-03 Frank Ch. Eigler <fche@elastic.org> - - * README: Be more specific about prerequisites. - * tapset/builtin_string.stp: New builtin. - * testsuite/buildok/seven.stp, semko/eighteen.stp: New tests. - -2005-08-03 Roland McGrath <roland@redhat.com> - - * configure.ac, systemtap.spec.in: Version 0.2.1. - * Makefile.in, aclocal.m4, configure: Regenerated. - -2005-08-02 Roland McGrath <roland@redhat.com> - - * loc2c.c (emit_bitfield): Return bool, value from emit_base_fetch. - (c_translate_fetch): Update caller. - (c_translate_pointer): Never ignore emit_base_fetch return value. - - * systemtap.spec.in (%install): Remove parameters after %makeinstall. - -2005-08-02 Frank Ch. Eigler <fche@elastic.org> - - * loc2.c (emit_loc_address): Emit interleaved declaration into - its own nested { } block. - * tapsets.cxx (literal_stmt_for_local): Emit deref_fault block - unconditionally. - * tapset/builtin_hexstring.stp: New builtin. - * testsuite/buildok/six.stp: New test. - -2005-08-02 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx (emit_registrations): Treat module_name="kernel" - as if module_name="". - -2005-08-01 Graydon Hoare <graydon@redhat.com> - - * staptree.{cxx,h} (probe_point::component): Add a ctor. - * tapsets.cxx (dwarf_derived_probe): Synthesize concrete - probe_point for matched pattern. - (dwarf_probe_type) - (dwarf_query::add_kernel_probe) - (dwarf_query::add_module_probe): Remove, they were noise. - (dwflpp::module_name_matches): Don't call get_module_dwarf(). - -2005-08-01 Frank Ch. Eigler <fche@elastic.org> - - * tapsets.cxx: Support ".return" option for function probe points. - * testuite/buildok/five.stp: Try it. - -2005-08-01 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (derive_probes, semantic_pass_symbols): Improve - error message specificity. - * translate.cxx (emit_module_init): Compact partial registration - recovery code. - (emit_module_exit): Invert deregistration sequence. - * testsuite/buildok/four.stp: Some module() test case. - -2005-08-01 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (derive_probes): Print error if results empty. - * tapsets.cxx (dwflpp_assert): Handle positive RCs, which likely - came from errno. - (dwflpp::setup): Improve missing debug-info messages. - * testsuite/semko/sixteen,seventeen.stp: New tests. - * runtest.sh: Save stdout/stderr of FAIL/XPASS test cases. - * Makefile.am (clean-local): Clean up testsuite/. - * Makefile.in, aclocal.m4: Regenerated. - -2005-07-29 Frank Ch. Eigler <fche@redhat.com> - - From Graydon Hoare <graydon@redhat.com: - * tapsets.cxx (var_expanding_copy_visitor): Correct lvalue cases. - -2005-07-29 Frank Ch. Eigler <fche@redhat.com> - - * Makefile.am: Make sure stpd goes into libexec/systemtap/ - * Makefile.in: Regenerated. - -2005-07-29 Frank Ch. Eigler <fche@redhat.com> - - * configure.ac: Fail configure stage if elfutils 0.111+ is not found. - * Makefile.am, elaborate.cxx, tapsets.cxx: Unconditionalize. - * configure, Makefile.in, config.in: Regenerated. - -2005-07-29 Roland McGrath <roland@redhat.com> - - * Version 0.2 distribution. - - * systemtap.spec.in: Include %{_datadir}/systemtap/tapset directory. - (%check): Add section, run make check. - * Makefile.am (EXTRA_DIST): Add runtest.sh. - * Makefile.in: Regenerated. - - * systemtap.spec.in: Include man pages. - * Makefile.am (man_MANS): Renamed to dist_man_MANS. - - * configure.ac: Add AM_CONDITIONAL definition of HAVE_LIBDW. - * Makefile.am [HAVE_LIBDW] (stap_SOURCES_libdw): New variable. - (stap_SOURCES): Use it, moving loc2c.c there. - * configure, config.in: Regenerated. - - * tapsets.cxx: <libdw.h> -> <elfutils/libdw.h> - * loc2c.c, loc2c.h: Likewise. - - * main.cxx (main): Check return value of system. - - * systemtap.spec.in (LDFLAGS): Punt using $ORIGIN here, just hard-code - %{_libdir}. - (elfutils_version): Bump to 0.111. - [bundled_elfutils]: Don't massage libdwfl.h header any more. - - * configure.ac: Don't check for libelf.h, not actually #include'd. - Update -ldw check for merged libdwfl+libdw. - (stap_LIBS): New substituted variable. Set only this, not LIBS, - with -ldw check. - * Makefile.am (stap_LDADD): New variable, use @stap_LIBS@. - - * Makefile.am (AM_CPPFLAGS): Use ${pkgdatadir}. - (AM_CFLAGS): Use -W instead of -Wextra, for gcc 3 compatibility. - (stpd_LDFLAGS): Variable removed. - (AM_MAKEFLAGS): Variable removed. - -2005-07-28 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (find_var): Correct array dereferencing thinko. - -2005-07-28 Graydon Hoare <graydon@redhat.com> - - * elaborate.cxx (derived_probe::derived_probe): Accept NULL probe. - * staptree.cxx (provide, require): Move from here... - * staptree.h: to here, and virtualize deep-copy methods. - * translate.cxx - (c_unparser::emit_common_header): Include loc2c-runtime.h - * tapsets.cxx - (dwflpp::iterate_over_modules): Use new, faster getmodules loop. - (dwflpp::literal_stmt_for_local): New method, call loc2c. - (var_expanding_copy_visitor): New struct which expands $-vars. - (dwarf_derived_probe): Rebuild this->body using var expander. - (query_function): Refactor logic a bit for speed. - * loc2c.{c,h}: Copies (with minor changes) of Roland's work - from elfutils CVS. - * Makefile.am (AM_CFLAGS): Set to elfutils-style. - (stap_SOURCES): Add loc2c.c. - * Makefile.in: Regenerate. - -2005-07-28 Frank Ch. Eigler <fche@redhat.com> - - * stap.1: Beginnings of a man page. - * Makefile.am: Install it. Comment out stpd LDADD goodies. - * configure.ac: Futilely complain about non-stpd LIBS. - * Makefile.in, configure.in: Regenerated. - * main.cxx (usage): Remove ARGS from help text, as nothing is - done with these yet. - -2005-07-28 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx: Add "pt_regs*" field to context. - * tapsets.cxx (*): Correct kprobes API interface. - * testsuite/buildok/three.stp: New test, copied from semok. - * Makefile.am (install-data-local): Also install runtime/relayfs, - so scripts can build against headers located thereunder. - * Makefile.in: Regenerated. - -2005-07-28 Frank Ch. Eigler <fche@redhat.com> - - translator/1120 - * main.cxx (main): Preset -R and -I options from environment - variables (if set). Pass guru mode flags to parser. - * parse.cxx (privileged): New parser operation flag. Update callers. - (parse_embeddedcode): Throw an error if !privileged. - (parse_functiondecl): Change signature. Prevent duplicates. - (parse_globals): Ditto. - * parse.h: Corresponding changes. - * tapset/*.stp: Beginnings of real tapset library, to replace - previous builtins. - * tapsets.cxx: Greatly reduce verbose mode output. - * Makefile.am: Install & dist it. - * runtest.sh: Refer to it. - * Makefile.in, aclocal.m4: Regenerated. - * testsuite/*/*.stp: Set guru mode via /bin/sh if needed. - * testusite/*/*ko.stp: Homogenize shell scripts. - -2005-07-28 Frank Ch. Eigler <fche@redhat.com> - - translator/1120 - translator/1123 - * elaborate.cxx (semantic_pass_symbols): Print a more helpful - error message around exceptions. - * elaborate.h (systemtap_session): Add guru_mode field. - * main.cxx (main): Initialize it to false. Add version-sensitive - script library searching. Add more failure messages. - * tapsets.cxx (dwflpp_assert): Add a decorative text parameter. - Update callers. - -2005-07-28 Martin Hunt <hunt@redhat.com> - - * Makefile.am (install-data-local): Add runtime/transport. - * Makefile.in: regenerated. - -2005-07-26 Graydon Hoare <graydon@redhat.com> - - * elaborate.cxx: Revert builtin-function code. - * translate.cxx: Likewise. - * tapsets.{h,cxx}: Likewise. - -2005-07-26 Martin Hunt <hunt@redhat.com> - - * buildrun.cxx (compile_pass): Add -Wno-unused to CFLAGS because - usually a module doesn't use every function in the runtime. - -2005-07-26 Martin Hunt <hunt@redhat.com> - - * Makefile.am (stpd_LDFLAGS): Set rpath correclty because otherwise - automake doesn't seem to get it right when binaries are in libexec - subdirs. - (AM_CPPFLAGS): revert. - * systemtap.spec.in (LDFLAGS): Set libexecdir here instead. - -2005-07-26 Frank Ch. Eigler <fche@redhat.com> - - Support %{ embedded-c %} - * staptree.h (embeddedcode): New statement subtype. Stub support in - visitors. - * staptree.cxx: Ditto. - * parse.cxx: Parse %{ / %}. Accept "_" as identifier leading char. - (parse_probe): Simplify calling convention. - * elaborate.h: Store embedded code. - * elaborate.cxx: Pass it. - * translate.cxx: Transcribe it. Return some dropped module init/exit - code. - * Makefile.am: Add buildok/buildko tests. - * Makefile.in: Regenerated. - * main.cxx: Return EXIT_SUCCESS/FAILURE even for weird rc. - * testsuite/parseok/nine.stp: Test _identifiers. - * testsuite/transko/*.stp: Tweak to force -p3 rather than -p2 errors. - * testsuite/semok/transko.stp: ... and keep it that way in the future. - * testsuite/parse*/*: Some new tests for %{ %}. - * testsuite/build*/*: New tests for -p4. - -2005-07-26 Martin Hunt <hunt@redhat.com> - - * Makefile.am (AM_CPPFLAGS): Set PKGLIBDIR correctly. - -2005-07-26 Martin Hunt <hunt@redhat.com> - - * systemtap.spec.in: Stpd goes in libexec/systemtap. - * Makefile.am (libexecdir): Set to libexecdir/systemtap. - * aclocal.m4, Makefile.in: Regenerated - -2005-07-25 Roland McGrath <roland@redhat.com> - - * configure.ac: Don't define PKGLIBDIR and PKGDATADIR here. - * Makefile.am (AM_CPPFLAGS): New variable, use -D here instead. - (dist-hook): Don't remove ChangeLog files. - (install-data-local): Don't install docs, just runtime stuff. - (rpm, clean-local): Use make variables instead of @substitution@s. - * configure, config.in, aclocal.m4, Makefile.in: Regenerated - -2005-07-22 Graydon Hoare <graydon@redhat.com> - - * translate.cxx (itervar): New class. - (*::visit_foreach_loop): Implement. - Various bug fixes. - * staptree.cxx (deep_copy_visitor::*): Copy tok fields. - * elaborate.cxx (lvalue_aware_traversing_visitor): - (mutated_map_collector): - (no_map_mutation_during_iteration_check): New classes. - (semantic_pass_maps): New function to check map usage. - (semantic_pass): Call it. - * testsuite/transok/eight.stp: Test 'foreach' loop translation. - * testsuite/semko/{thirteen,fourteen,fifteen}.stp: - Test prohibited forms of foreach loops. - -2005-07-21 Martin Hunt <hunt@redhat.com> - - * Makefile.am (EXTRA_DIST): Add systemtap.spec. - (install-data-local): Install docs and probes. - (docs): New target. - (rpm): New target. - - * configure.ac: Set initial version to 0.1.1. - (pkglibdir): Set to libexec. - - * Makefile.in: Regenerated. - -2005-07-20 Graydon Hoare <graydon@redhat.com> - - * elaborate.{cxx,h} (find_array): Remove. - (find_scalar): Rename to find_var, add array support. - * staptree.{cxx,h} (vardecl::compatible_arity): New method. - * translate.cxx: Refactor, add array read/write support. - * testsuite/transok/three.stp: Uncomment array uses. - * testsuite/transok/seven.stp: New test of array r/w. - -2005-07-20 Frank Ch. Eigler <fche@redhat.com> - - * tapsets.cxx (*::emit_[de]registrations): Add logic for probe - lifecycle control (session_state). - * translate.cxx (emit_common_header,emit_module_{init,exit}): Ditto. - (visit_*): Use per-context errorcount. - -2005-07-19 Frank Ch. Eigler <fche@redhat.com> - - * Makefile.am (dist-hook): Complete the resulting tarball. - * Makefile.in: Regenerated. - -2005-07-19 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (emit_module_init/exit, translate_pass): Conform - to newer runtime startup/shutdown hooks. - -2005-07-15 Frank Ch. Eigler <fche@redhat.com> - - * Makefile.am (install-data-local): Correct typo. - * buildrun.cxx (compile_pass): Ditto. - * main.cxx (main): Print errors if passes 4 or 5 fail. - -2005-07-14 Frank Ch. Eigler <fche@redhat.com> - - * buildrun.cxx (compile_pass, run_pass): Get closer to a working - test_mode. - * translate.cxx (emit_module_init, emit_common_header): Ditto. - (translate_pass): Ditto. - -2005-07-14 Frank Ch. Eigler <fche@redhat.com> - - * Makefile.am (stpd): Install in $pkglibdir. - (runtime): Copy to $pkgdatadir. - * configure.ac: Pass along pkgdatadir and pkglibdir. - * main.cxx: Default runtime_path from pkgdatadir. - * buildrun.cxx (run_pass): Correct stpd directory. - * Makefile.in, configure, config.in: Regenerated. - -2005-07-12 Graydon Hoare <graydon@redhat.com> - - * elaborate.cxx - (semantic_pass_symbols): Only enter body if non-null. - (semantic_pass_types): Likewise. - (semantic_pass): Pass session to register_standard_tapsets. - * translate.cxx - (builtin_collector): New struct. - (hookup_builtins): New function. - (translate_pass): Only translate functions with bodies. - (c_unparser::emit_common_header): Likewise, and call hookup_builtins. - * tapsets.hh (builtin_function): New class. - (register_standard_tapsets): Change parameter to session. - * tapsets.cc (bultin_function::*): Implement class. - (register_standard_tapsets): Register printk, log, warn. - * testsuite/transok/six.stp: New test. - -2005-07-12 Frank Ch. Eigler <fche@redhat.com> - - * buildrun.cxx (compile_pass): Make non-verbose mode quieter. - (run_pass): Spawn stpd for dirty work. - * Makefile.am: Also build stpd into libexecdir. - * configure.ac: Pass LIBEXECDIR. - * Makefile.in, configure, config.in: Regenerated. - * AUTHORS: Update. - -2005-07-11 Graydon Hoare <graydon@redhat.com> - - * staptree.cxx (require): Generally handle null pointers in src. - (deep_copy_visitor::visit_if_statement): Revert fche's change. - -2005-07-11 Frank Ch. Eigler <fche@redhat.com> - - * parse.cxx (parse_literal): Compile cleanly on 64-bit host. - * staptree.cxx (deep_copy_visitor::visit_if_statement): Don't - freak on a null if_statement.elseblock. - -2005-07-07 Graydon Hoare <graydon@redhat.com> - - * staptree.{h,cxx} (deep_copy_visitor): New visitor. - * elaborate.cxx - (derived_probe::derived_probe): - (alias_expansion_builder::build): Use it. - * testsuite/semok/fifteen.stp: New test which relies on deep copy. - -2005-07-07 Frank Ch. Eigler <fche@redhat.com> - - * Makefile.am (dist): Package up the source tree, including - testsuite and runtime. - * main.cxx: Use clog instead of cerr for logging messages. - * buildrun.cxx: Ditto. - (compile_pass): Add -Iruntime/user for test mode. - * translate.cxx (*): Commonalize test/real mode output. - * Makefile.in: Regenerated. - -2005-07-05 Graydon Hoare <graydon@redhat.com> - - * elaborate.{h,cxx}: Revert previous changes. - * tapsets.{h,cxx}: Adapt to verbose as a member of session. - * elaborate.cxx (alias_expansion_builder::build): Avoid copying - locals between alias definition and use. - * testsuite/semok/{twelve,thirteen,fourteen}.stp: New tests. - * staptree.cxx (probe_alias::printsig): Print equals sign. - -2005-07-05 Frank Ch. Eigler <fche@redhat.com> - - * elaborate.h (systemtap_session): Add more command-line arguments. - * staptree.h (verbose): Bad global, no donut. - * elaborate.cxx: Temporarily disable verbose variable access. - * main.cxx: Support more arguments, build/run passes. Revamp - temporary file generation and partial-pass output generation. - * tapsets.cxx, translate.cxx: Emit just enough extra punctuation - and fluff to make generated probe pass -Werror. - * buildrun.cxx, buildrun.h: New files for passes 4/5. Partial - support for build pass, nothing on probe execution yet. - * testsuite/transok/*.stp: Force just -p3, now that -p4/5 exist. - * Makefile.am, Makefile.in: Corresponding changes. - -2005-07-04 Graydon Hoare <graydon@redhat.com> - - * elaborate.h (symresolution_info::current_derived_probe): New field. - (symresolution_info::current_probe): Change type. - * elaborate.cxx (semantic_pass_symbols): Add passes for resolving - locals in pre-derivation base probes and pre-expansion aliases. - (symresolution_info::visit_symbol): - (symresolution_info::find_scalar): Update to match new field. - -2005-06-27 Graydon Hoare <graydon@redhat.com> - - * staptree.{h,cxx} (probe_alias): New structure. - * parse.{h,cxx} (parser::parse): Parse probes or probe aliases. - (parser::parse_probe): Likewise. - * tapsets.{h,cxx}: - (derived_probe_builder): - (match_key): - (match_node): - (alias_derived_probe): Move from here, - * elaborate.{h,cxx}: to here. - * elaborate.h (systemtap_session::pattern_root): New member. - (register_library_aliases): New function. - * tapsets.cxx: Build one dwarf_derived_probe per target address. - -2005-06-23 Graydon Hoare <graydon@redhat.com> - - * tapsets.cxx - (probe_type): New enum. - (probe_spec): New struct. - (dwarf_derived_probe): Reorganize a bit, interpret .return. - (query_statement): Translate addresses back to module space. - (probe_entry_function_name): - (probe_entry_struct_kprobe_name): - (foreach_dwarf_probe_entry): - (declare_dwarf_kernel_entry): - (deregister_dwarf_kernel_entry): - (register_dwarf_kernel_entry): - (register_dwarf_module): - (declare_dwarf_module_entry): - (deregister_dwarf_module_entry): - (register_dwarf_module_entry): New functions. - (dwarf_derived_probes::emit_probe_entries): - (dwarf_derived_probes::emit_registrations): - (dwarf_derived_probes::emit_deregistrations): Implement. - -2005-06-21 Frank Ch. Eigler <fche@redhat.com> - - * config.in, configure: Regenerated. - * tapsets.cxx: Make dwarf code conditional on new elfutils header. - -2005-06-20 Graydon Hoare <graydon@redhat.com> - - * configure.ac: Scan for libdwfl. - * staptree.h (verbose): New global. - * main.cxx (usage, main): Implement -v option. - * tapsets.cxx (dwflpp): New struct. - (query_statement): New function. - (query_function): New function. - (query_cu): New function. - (query_module): New function. - (dwarf_derived_probe): Implement primary forms. - -2005-06-14 Graydon Hoare <graydon@redhat.com> - - * tapsets.h: New file. - (derived_probe_builder): Callback for making derived probes. - (match_key): Component of pattern-matching tree. - (match_node): Other component of pattern-matching tree. - * tapsets.cxx: Add pattern-matching system for probes. - (alias_derived_probe): Skeleton for alias probes. - (dwarf_derived_probe): Skeleton for dwarf probes. - (register_standard_tapsets): Registry for standard tapsets. - -2005-06-13 Frank Ch. Eigler <fche@redhat.com> - - Start separating out translator-side probe point recognition. - * tapsets.cxx: New file. - (be_derived_probe): Support for begin/end probes. - (derive_probe): Ditto. Reject anything unrecognized. - * translator.cxx: Move out old code. - * Makefile.am: Add new source file. - * testsuite/semok/*: Switch to begin/end probes only. - -2005-06-08 Frank Ch. Eigler <fche@redhat.com> - - systemtap/916 - Implement all basic scalar operators, including modify-assignment. - * parse.cxx (lexer): Allow multi-character lookahead in order to - scan 1/2/3-character operators. - (parse_boolean_or/and/xor/shift): New routines. - * translate.cxx (visit_assignment, visit_binary_expression, - visit_*_crement): Generally rewrote. - (visit_*): Added more parentheses in output. - (emit_module_init): Initialize globals. - * staptree.h, elaborate.cxx, elaborate.h: Remove exponentiation. - * main.cxx (main): Add an end-of-line to output file. - * testsuite/*: Several new tests. - -2005-06-05 Frank Ch. Eigler <fche@elastic.org> - - Implement for/next/continue/break/while statements. - * staptree.h: Declare new 0-arity statement types. Tweak for_loop. - * parse.cxx: Parse them all. - * translate.cxx (c_unparser): Maintain break/continue label stack. - (visit_for_loop, *_statement): New implementations. - * elaborate.*, staptree.cxx: Mechanical changes. - * testsuite/parseok/ten.stp, semko/twelve.stp, transko/two.stp, - transok/five.stp: New tests. - -2005-06-03 Frank Ch. Eigler <fche@elastic.org> - - * elaborate.cxx (find_*): Remove arity checks from here ... - * staptree.cxx (set_arity): Put arity match assertion here. - * testsuite/semko/{six,nine}.stp: Confirm logic. - * testsuite/transko/one.stp: First translation-time ko test. - -2005-06-03 Frank Ch. Eigler <fche@redhat.com> - - * TODO: Removed entries already represented in bugzilla. - * elaborate.cxx: Rewrite type inference for several operators. - * main.cxx (main): For -p2 runs, print types of function/probe locals. - * parse.cxx (scan): Identify more two-character operators. - (parse_comparison): Support the whole suite. - * translate.cxx (visit_unary_expression, logical_or_expr, - logical_and_expr, comparison,ternary_expression): New support. - * testsuite/parseok/semok.stp: Clever new test. - * testsuite/transok/four.stp: New test. - * testsuite/*: Some tweaked tests for syntax changes. - -2005-06-03 Frank Ch. Eigler <fche@redhat.com> - - * parse.cxx (scan): Support C and C++ comment styles. - * testsuite/parseok/four.stp: Test them some ... - * testsuite/parseko/nine.stp: ... and some more. - -2005-06-02 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx (visit_concatenation, visit_binary_expression): - New basic implementation. - (*): Reduce emitted whitespace and remove `# LINE "FILE"' lines. - -2005-06-02 Frank Ch. Eigler <fche@redhat.com> - - Parse foreach construct. Added fuller copyright notices throughout. - * staptree.h (foreach_loop): New tree node type. - * staptree.cxx: Print it, visit it, love it, leave it. - * parse.cxx: Parse it. - (parse_stmt_block): Don't require ";" separators between statements. - (parse_array_in): Use [] as index group operator instead of (). - * elaborate.cxx (visit_foreach_loop): New code. - * translate.cxx: Slightly tighten errorcount/actioncount handling. - * main.cxx: Accept "-" as script file name standing for stdin. - (visit_arrayindex): Switch to simpler set_arity call. - * configure.ac: Generate DATE macro. - * Makefile.in, configure, config.in: Regenerated. - * testsuite/*: New/updated tests for syntax changes, foreach (). - -2005-05-30 Frank Ch. Eigler <fche@redhat.com> - - More fully parse & elaborate "expr in array" construct. - * staptree.h (array_in): Make this unary. Update .cxx to match. - * parse.cxx (parse_array_in): Rewrite. - (parse_symbol_plain): Removed. Update .h to match. - * elaborate.cxx (typeresolution_info::visit_array_in): New function. - (find_array): Tentatively, accept arity=0. - * translate.cxx (c_unparser::c_assign): New functions to eliminate - much ugly duplication. Use throughout. - (visit_symbol): Correct function formal argument search. - (c_tmpcounter*::visit): Add missing recursion in several functions. - * testsuite/*: Add new tests for array-in construct. Add the - first "transok" test. - * Makefile.am: Add transok tests. - * Makefile.in: Regenerated. - -2005-05-26 Frank Ch. Eigler <fche@redhat.com> - - * translate.cxx: Traverse trees just for common-header generation, - to emit explicit temp variables into context. Switch to explicit - "frame" pointer in generated function/probe bodies. Initialize - locals in function bodies. Rename "test_unparser" to "c_unparser" - throughout. - -2005-05-24 Frank Ch. Eigler <fche@redhat.com> - - * elaborate.cxx (find_array): Support automagic tapset globals. - * testsuite/semok/nine.stp: Test it. - * staptree.cxx (stapfile print): List globals. - -2005-05-24 Frank Ch. Eigler <fche@redhat.com> - - * testsuite/semlib/*: New tapset library chunks for "-I" testing. - * testsuite/semok/eight.stp, nine.stp: New tests. - -2005-05-22 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (gcov): New target to generate test-coverage data from - a testsuite run. - * Makefile.in: Regenerated. - -2005-05-20 Frank Ch. Eigler <fche@redhat.com> - - Many changes throughout. Partial sketch of translation output. - * elaborate.*: Elaboration pass. - * translate.*: Translation pass. - * staptree.*: Simplified for visitor concept. - * main.cxx: Translator mainline. - * *test.cxx: Removed. - * testsuite/*: Some new tests, some changed for newer syntax. - -2005-05-05 Frank Ch. Eigler <fche@redhat.com> - - * parse.cxx (parse): Add helper methods. - (lexer::scan, parse_assignment): Parse "<<<" operator. Fix assignment - associativity. - (parse_symbol): Permit function with empty arg list. - (parse_global, parse_statement, parse_functiondecl): Expect - unconsumed leading keyword. - (parse_global): Don't use ";" termination. - * parse.h: Corresponding changes. - * staptree.cxx (binary_expression::resolve_types): Fix <<< - type inference. - (translator_output): Improve pretty-printing. - (*): Add general visitors to statement/expression types. - * staptree.h: Corresponding changes. Tweak symresolution_info fields. - Add semantic_error class. - * semtest.cxx: Adapt to this. - * testsuite/parseok/two.stp, semok/*.stp: Adapt to syntax changes. - -2005-03-15 Frank Ch. Eigler <fche@redhat.com> - - * semtest.cxx: Print probe signatures properly. - * staptree.cxx (probe::printsig): New function. - -2005-03-15 Frank Ch. Eigler <fche@redhat.com> - - * TODO: New file. Include some probe-point-provider syntax examples. - * parse.cxx (lexer::scan, parser::parse_literal): Support hex, octal - numbers via strtol. - (parse_probe, parse_probe_point): Modify for dotted syntax. - * staptree.cxx: Ditto. - * parsetest.cxx, semtest.cxx: Print parse/sem results even if - .stp files were given on command line. - * parse.h, staptree.h: Rename probe_point_spec -> probe_point. - * runtest.sh: New test-runner front-end script. - * Makefile.am: Use it for TESTS_ENVIRONMENT. - * testsuite/*: Update probe point syntax. Add a bunch of new tests. - -2005-03-04 Frank Ch. Eigler <fche@redhat.com> - - * parse.cxx (scan): Support '$' characters in identifiers. - (parse_symbol): Support thread-> / process-> shorthand. - * staptree.cxx (symresolution_info::find): Split up into - find_scalar, find_array, find_function. - (resolve_symbols): Call the above for symbol/arrayindex/functioncall. - (find_scalar): Add stub support for synthetic builtin variables. - * staptree.h: Corresponding changes. - * testsuite/*: Some new tests. - -2005-03-03 Frank Ch. Eigler <fche@redhat.com> - - * parse.cxx (parse_assignment): Assert lvalueness of left - operand. - * staptree.h (expression): Add is_lvalue member. - * staptree.cxx (functioncall::resolve_types): Don't crash on - formal-vs-actual argument count mismatch. - (*): Add some is_lvalue stub functions. - * testsuite/*: Some new tests. - -2005-03-01 Frank Ch. Eigler <fche@redhat.com> - - * parse.cxx: Implement left-associativity for several types of - operators. Add some more statement types. Parse functions. - Be able to print tokens. Simplify error generating functions. - Save tokens in all parse tree nodes. - * parse.h: Corresponding changes. - * staptree.cxx: Move tree-printing functions here. Add many - new functions for symbol and type resolution. - * staptree.h: Corresponding changes. - * semtest.cxx: New semantic analysis pass & test driver. - * testsuite/sem*/*: New tests. - * parsetest.cxx: Separated parse test driver. - * testsuite/parse*/*: Adapt tests to parsetest driver. - * Makefile.am: Build semtest. Run its tests. - * Makefile.in: Regenerated. - -2005-02-11 Frank Ch. Eigler <fche@redhat.com> - - * parse.cxx, parse.h: New files: parser. - * staptree.h: New file: semantic object declarations. - * staptree.cxx: New dummy driver file. @@ -6,10 +6,9 @@ the <systemtap@sources.redhat.com> mailing list. Submissions should be in an easy-to-read diff/patch form, unless this is inappropriate due to size, relevance, or fraction of novel - content. They should be accompanied by an explanation, and - ChangeLog entries. The relevant test suites should be run before - and after your changes, and regressions avoided, explained, or - corrected. + content. They should be accompanied by an explanation. The + relevant test suites should be run before and after your changes, + and regressions avoided, explained, or corrected. Established contributors may be considered for direct GIT write access. Other contributors should simply pack up the goods into a @@ -31,13 +30,22 @@ the <systemtap@sources.redhat.com> mailing list. - coding style Abide by the general formatting of the code you are modifying. The - code base generally follows the GNU standards. ChangeLog entries - are used for nontrivial changes to source or documentation files. - Some subdirectories have ChangeLog files of their own, so make sure - you find the correct ones to prepend. - - In the git commit message, make the first line an brief summary of - the patch. There is no need to transcribe the ChangeLog entries there. + code base generally follows the GNU standards in usermode code and + the Linux kernel standards in runtime code. + +- commit messages + + In the git commit message, make the first line a brief (<=50 char) + summary of the patch, and leave the second line blank. If you have + trouble coming up with a concise summary, consider whether your + patch might be better broken into smaller commits. + + For trivial changes, the summary alone may be sufficient, but most + commits should include a paragraph or two giving more details about + what the change is and why it is needed. Extra information like + bugzilla numbers and mailing-list discussion links are appreciated + as a supplement, but they are not a replacement for a real + description. - test suites @@ -2,7 +2,7 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -67,6 +67,9 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== diff --git a/Makefile.am b/Makefile.am index 90c90550..4c84309c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,8 @@ # Makefile.am --- automake input file for systemtap ## process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = no-dist +# we don't maintain a ChangeLog, which makes us non-GNU -> foreign +AUTOMAKE_OPTIONS = no-dist foreign pkglibexecdir = ${libexecdir}/${PACKAGE} oldincludedir = ${includedir}/sys @@ -16,7 +17,7 @@ man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 man/st bin_PROGRAMS = stap staprun bin_SCRIPTS = stap-report -oldinclude_HEADERS = runtime/sdt.h +oldinclude_HEADERS = includes/sys/sdt.h if BUILD_SERVER man_MANS += stap-server.8 bin_PROGRAMS += stap-client-connect stap-server-connect @@ -114,6 +115,16 @@ install-elfutils: install-exec-local: install-elfutils endif +if BUILD_SERVER +install-exec-local: install-scripts + +PHONIES += install-scripts +install-scripts: + for f in $(bin_SCRIPTS); do \ + sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir)," $(DESTDIR)$(bindir)/$$f; \ + done +endif + staprun_SOURCES = runtime/staprun/staprun.c runtime/staprun/staprun_funcs.c\ runtime/staprun/ctl.c runtime/staprun/common.c @@ -204,6 +215,7 @@ install-data-local: i_cmd="$(INSTALL_PROGRAM)"; else \ i_cmd="$(INSTALL_DATA)"; fi; \ $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done) + test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap TEST_COV_DIR = coverage @@ -249,11 +261,13 @@ uninstall-local: rm -rf $(DESTDIR)$(sysconfdir)/systemtap # XXX: leaves behind man pages -SUBDIRS = testsuite doc +SUBDIRS = doc +DIST_SUBDIRS = testsuite $(SUBDIRS) -check: +check-local: SRCDIR=`cd $(srcdir); pwd`; \ - $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$(PWD)/lib-elfutils:$(PWD)/lib-elfutils/systemtap SYSTEMTAP_PATH="$(PWD)" RUNTESTFLAGS="$(RUNTESTFLAGS)"; + PWD=`pwd`; \ + $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$$PWD/lib-elfutils:$$PWD/lib-elfutils/systemtap SYSTEMTAP_PATH=$$PWD SYSTEMTAP_INCLUDES=$$PWD/includes RUNTESTFLAGS="$(RUNTESTFLAGS)"; installcheck: if test \! -e $(DESTDIR)$(bindir)/stap; then \ diff --git a/Makefile.in b/Makefile.in index b768c3cb..000b6b89 100644 --- a/Makefile.in +++ b/Makefile.in @@ -50,13 +50,13 @@ bin_PROGRAMS = stap$(EXEEXT) staprun$(EXEEXT) $(am__EXEEXT_1) @BUILD_ELFUTILS_TRUE@am__append_7 = stamp-elfutils @BUILD_ELFUTILS_TRUE@am__append_8 = lib-elfutils/libdw.so @BUILD_ELFUTILS_TRUE@am__append_9 = install-elfutils +@BUILD_SERVER_TRUE@am__append_10 = install-scripts pkglibexec_PROGRAMS = stapio$(EXEEXT) noinst_PROGRAMS = loc2c-test$(EXEEXT) subdir = . -DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ - $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.in $(srcdir)/stap.1.in \ +DIST_COMMON = INSTALL NEWS README AUTHORS $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/config.in $(srcdir)/stap.1.in \ $(srcdir)/stapprobes.5.in $(srcdir)/stapfuncs.5.in \ $(srcdir)/stapvars.5.in $(srcdir)/stapex.5.in \ $(srcdir)/staprun.8.in $(srcdir)/stap-server.8.in \ @@ -71,7 +71,8 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(top_srcdir)/man/stapprobes.signal.5.in \ $(top_srcdir)/man/stapprobes.socket.5.in \ $(top_srcdir)/man/stapprobes.tcp.5.in \ - $(top_srcdir)/man/stapprobes.udp.5.in $(srcdir)/run-stap.in \ + $(top_srcdir)/man/stapprobes.udp.5.in \ + $(top_srcdir)/initscript/systemtap.in $(srcdir)/run-stap.in \ depcomp $(oldinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -88,7 +89,7 @@ CONFIG_CLEAN_FILES = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 \ man/stapprobes.process.5 man/stapprobes.rpc.5 \ man/stapprobes.scsi.5 man/stapprobes.signal.5 \ man/stapprobes.socket.5 man/stapprobes.tcp.5 \ - man/stapprobes.udp.5 run-stap + 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/||"`;; \ @@ -189,7 +190,6 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ @@ -239,7 +239,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIECFLAGS = @PIECFLAGS@ PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ -PKG_CONFIG = @PKG_CONFIG@ PROCFLAGS = @PROCFLAGS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ @@ -284,9 +283,7 @@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ nspr_CFLAGS = @nspr_CFLAGS@ -nspr_LIBS = @nspr_LIBS@ nss_CFLAGS = @nss_CFLAGS@ -nss_LIBS = @nss_LIBS@ oldincludedir = ${includedir}/sys pdfdir = @pdfdir@ prefix = @prefix@ @@ -304,7 +301,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = no-dist + +# we don't maintain a ChangeLog, which makes us non-GNU -> foreign +AUTOMAKE_OPTIONS = no-dist foreign pkglibexecdir = ${libexecdir}/${PACKAGE} AM_CPPFLAGS = -DBINDIR='"$(bindir)"' -DPKGDATADIR='"${pkgdatadir}"' -DPKGLIBDIR='"$(pkglibexecdir)"' AM_CFLAGS = -D_GNU_SOURCE -fexceptions -Wall -Werror -Wunused -Wformat=2 -W @@ -317,7 +316,7 @@ man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 \ man/stapprobes.signal.5 man/stapprobes.socket.5 \ man/stapprobes.tcp.5 man/stapprobes.udp.5 $(am__append_1) bin_SCRIPTS = stap-report $(am__append_3) dtrace -oldinclude_HEADERS = runtime/sdt.h +oldinclude_HEADERS = includes/sys/sdt.h stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \ @@ -343,7 +342,7 @@ stap_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_4) 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) dist-gzip +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\ @@ -382,7 +381,8 @@ EXAMPLE_SOURCE_DIR = $(srcdir)/testsuite/systemtap.examples EXAMPLE_META_FILES = $(EXAMPLE_SOURCE_DIR)/*/*.meta TEST_COV_DIR = coverage # XXX: leaves behind man pages -SUBDIRS = testsuite doc +SUBDIRS = doc +DIST_SUBDIRS = testsuite $(SUBDIRS) # Any extra flags, such as: # --define "with_docs 0" @@ -399,15 +399,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -481,6 +481,8 @@ man/stapprobes.tcp.5: $(top_builddir)/config.status $(top_srcdir)/man/stapprobes cd $(top_builddir) && $(SHELL) ./config.status $@ man/stapprobes.udp.5: $(top_builddir)/config.status $(top_srcdir)/man/stapprobes.udp.5.in cd $(top_builddir) && $(SHELL) ./config.status $@ +initscript/systemtap: $(top_builddir)/config.status $(top_srcdir)/initscript/systemtap.in + 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) @@ -1355,6 +1357,7 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) \ @@ -1389,7 +1392,7 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -@BUILD_CRASHMOD_FALSE@@BUILD_ELFUTILS_FALSE@install-exec-local: +@BUILD_CRASHMOD_FALSE@@BUILD_ELFUTILS_FALSE@@BUILD_SERVER_FALSE@install-exec-local: clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-local \ @@ -1465,8 +1468,8 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 install-exec-am install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local am--refresh check check-am clean \ - clean-binPROGRAMS clean-generic clean-local \ + 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 \ @@ -1529,6 +1532,12 @@ cscope: @BUILD_ELFUTILS_TRUE@ done @BUILD_ELFUTILS_TRUE@install-exec-local: install-elfutils +@BUILD_SERVER_TRUE@install-exec-local: install-scripts +@BUILD_SERVER_TRUE@install-scripts: +@BUILD_SERVER_TRUE@ for f in $(bin_SCRIPTS); do \ +@BUILD_SERVER_TRUE@ sed -i -e "/INSTALL-HOOK/d;s,exec_prefix=,exec_prefix=$(exec_prefix)/bin/,;s,sysconfdir=.*,sysconfdir=$(sysconfdir)," $(DESTDIR)$(bindir)/$$f; \ +@BUILD_SERVER_TRUE@ done + install-exec-hook: if [ `id -u` -eq 0 ]; then chmod 04111 "$(DESTDIR)$(bindir)/staprun"; fi @@ -1567,6 +1576,7 @@ install-data-local: i_cmd="$(INSTALL_PROGRAM)"; else \ i_cmd="$(INSTALL_DATA)"; fi; \ $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done) + test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap gcov: @-$(MAKE) clean CXXFLAGS="-g -fprofile-arcs -ftest-coverage" all check @@ -1609,9 +1619,10 @@ uninstall-local: done rm -rf $(DESTDIR)$(sysconfdir)/systemtap -check: +check-local: SRCDIR=`cd $(srcdir); pwd`; \ - $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$(PWD)/lib-elfutils:$(PWD)/lib-elfutils/systemtap SYSTEMTAP_PATH="$(PWD)" RUNTESTFLAGS="$(RUNTESTFLAGS)"; + PWD=`pwd`; \ + $(MAKE) -C testsuite check SYSTEMTAP_RUNTIME=$$SRCDIR/runtime SYSTEMTAP_TAPSET=$$SRCDIR/tapset LD_LIBRARY_PATH=$$PWD/lib-elfutils:$$PWD/lib-elfutils/systemtap SYSTEMTAP_PATH=$$PWD SYSTEMTAP_INCLUDES=$$PWD/includes RUNTESTFLAGS="$(RUNTESTFLAGS)"; installcheck: if test \! -e $(DESTDIR)$(bindir)/stap; then \ @@ -1,11 +1,67 @@ -* What's new +* What's new in version 0.9 + +- Typecasting is now supported using the @cast operator. A script can + define a pointer type for a "long" value, and then access type members + using the same syntax as with $target variables. For example, this will + retrieve the parent pid from a kernel task_struct: + @cast(pointer, "task_struct", "kernel")->parent->pid + +- process().mark() probes are now possible to trace static user space + markers put in programs with the STAP_PROBE macro using the new + sys/sdt.h include file. This also provides dtrace compatible markers + through DTRACE_PROBE and an associated python 'dtrace' script that + can be used in builds based on dtrace that need dtrace -h or -G + functionality. + +- For those that really want to run stap from the build tree there is + now the 'run-stap' script in the top-level build directory that sets + up the SYSTEMTAP_TAPSET, SYSTEMTAP_RUNTIME, SYSTEMTAP_STAPRUN, and + SYSTEMTAP_STAPIO environment variables (installing systemtap, in a + local prefix, is still recommended for common use). + +- Systemtap now comes with a new Beginners Guide that walks the user + through their first steps setting up stap, understanding how it all + works, introduces some useful scripts and describes some common + pitfalls. It isn't created by default since it needs a Publican + setup, but full build instructions can be found in the wiki: + http://sourceware.org/systemtap/wiki/PublicanQuikHowto + An online version can be found at: + http://sourceware.org/systemtap/SystemTap_Beginners_Guide.pdf + +- Standard tapsets included with Systemtap were modified to include + extractable documentation information based on the kernel-doc + infrastructure. When configured --enabled-docs a HTML and PDF + version of the Tapset Reference Manual is produced explaining probes + defined in each tapset. + +- The systemtap client and compile server are now available. + These allow you to compile a systemtap module on a host other than + the one which it will be run, providing the client and server + are compatible. Other than using a server for passes 1 through + 4, the client behaves like the 'stap' front end itself. This + means, among other things, that the client will automatically + load the resulting module on the local host unless -p[1234] + was specified. See stap-server(8) for more details. + The client/server now use SSL for network connection security and + for signing. + + The systemtap client and server are prototypes only. Interfaces, options + and usage may change at any time. + +- function("func").label("label") probes are now supported to allow matching + the label of a function. + +- Systemtap initscript is available. This initscript allows you to run + systemtap scripts as system services (in flight recorder mode) and + control those scripts individually. + See README.initscript for details. - The stap "-r DIR" option may be used to identify a hand-made kernel build directory. The tool determines the appropriate release string automatically from the directory. -- A serious problem associated with user-space probing in shared libraries - was corrected, making it now possible to experiment with probe shared +- Serious problems associated with user-space probing in shared libraries + were corrected, making it now possible to experiment with probe shared libraries. Assuming dwarf debugging information is installed, use this twist on the normal syntax: @@ -13,7 +69,7 @@ This would probe all threads that call into that library. Running "stap -c CMD" or "stap -x PID" naturally restricts this to the target - command+descendants only. + command+descendants only. $$vars etc. may be used. - For scripts that sometimes terminate with excessive "skipped" probes, rerunning the script with "-t" (timing) will print more details about @@ -114,21 +170,6 @@ yet current lkml-track utrace; a "pass 4a"-time build failure means your system cannot use this yet. -- Prototype systemtap client and compile server are now available. - These allow you to compile a systemtap module on a host other than - the one which it will be run, providing the client and server - are compatible. Other than using a server for passes 1 through - 4, the client behaves like the 'stap' front end itself. This - means, among other things, that the client will automatically - load the resulting module on the local host unless -p[1234] - was specified. - - This client/server implementation is a prototype. It provides - NO NETWORK SECURITY OF ANY KIND and should be used only - among trusted hosts on a trusted network. - - See stap-server(8) for more details. - - Global variables which are written to but never read are now automatically displayed when the session does a shutdown. For example: @@ -13,168 +13,12 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.63],, -[m4_warning([this file was generated for autoconf 2.63. +m4_if(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# 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. -# -# 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES - # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/auto_free.h b/auto_free.h index 58290821..53b13d47 100644 --- a/auto_free.h +++ b/auto_free.h @@ -56,3 +56,5 @@ private: pointer_type& _ptr; }; #endif + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/buildrun.cxx b/buildrun.cxx index c626cf2a..3a6e20ae 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -1,5 +1,5 @@ // build/run probes -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-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 @@ -60,6 +60,24 @@ run_make_cmd(systemtap_session& s, string& make_cmd) return rc; } +static void +output_autoconf(systemtap_session& s, ofstream& o, const char *autoconf_c, + const char *deftrue, const char *deffalse) +{ + o << "\t"; + if (s.verbose < 4) + o << "@"; + o << "if $(CHECK_BUILD) $(SYSTEMTAP_RUNTIME)/" << autoconf_c; + if (s.verbose < 5) + o << " > /dev/null 2>&1"; + o << "; then "; + if (deftrue) + o << "echo \"#define " << deftrue << " 1\""; + if (deffalse) + o << "; else echo \"#define " << deffalse << " 1\""; + o << "; fi >> $@" << endl; +} + int compile_pass (systemtap_session& s) { @@ -86,7 +104,8 @@ compile_pass (systemtap_session& s) o << "_KBUILD_CFLAGS := $(call flags,KBUILD_CFLAGS)" << endl; o << "stap_check_gcc = $(shell " << superverbose << " if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo \"$(1)\"; else echo \"$(2)\"; fi)" << endl; - o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(LINUXINCLUDE) $(_KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; + o << "CHECK_BUILD := $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(LINUXINCLUDE) $(_KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc " << endl; + o << "stap_check_build = $(shell " << superverbose << " if $(CHECK_BUILD) $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; o << "SYSTEMTAP_RUNTIME = \"" << s.runtime_path << "\"" << endl; @@ -106,29 +125,40 @@ compile_pass (systemtap_session& s) // o << module_cflags << " += -Iusr/include" << endl; // since such headers are cleansed of _KERNEL_ pieces that we need - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-rel.c, -DSTAPCONF_HRTIMER_REL,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-getset-expires.c, -DSTAPCONF_HRTIMER_GETSET_EXPIRES,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-inode-private.c, -DSTAPCONF_INODE_PRIVATE,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-constant-tsc.c, -DSTAPCONF_CONSTANT_TSC,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-tsc-khz.c, -DSTAPCONF_TSC_KHZ,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-ktime-get-real.c, -DSTAPCONF_KTIME_GET_REAL,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-x86-uniregs.c, -DSTAPCONF_X86_UNIREGS,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-nameidata.c, -DSTAPCONF_NAMEIDATA_CLEANUP,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-unregister-kprobes.c, -DSTAPCONF_UNREGISTER_KPROBES,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-real-parent.c, -DSTAPCONF_REAL_PARENT,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-uaccess.c, -DSTAPCONF_LINUX_UACCESS_H,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-oneachcpu-retry.c, -DSTAPCONF_ONEACHCPU_RETRY,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-dpath-path.c, -DSTAPCONF_DPATH_PATH,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-synchronize-sched.c, -DSTAPCONF_SYNCHRONIZE_SCHED,)" << endl; - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-task-uid.c, -DSTAPCONF_TASK_UID,)" << endl; + 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; + o << "\t@echo -n > $@" << endl; + output_autoconf(s, o, "autoconf-hrtimer-rel.c", "STAPCONF_HRTIMER_REL", NULL); + output_autoconf(s, o, "autoconf-hrtimer-getset-expires.c", "STAPCONF_HRTIMER_GETSET_EXPIRES", NULL); + output_autoconf(s, o, "autoconf-inode-private.c", "STAPCONF_INODE_PRIVATE", NULL); + output_autoconf(s, o, "autoconf-constant-tsc.c", "STAPCONF_CONSTANT_TSC", NULL); + output_autoconf(s, o, "autoconf-tsc-khz.c", "STAPCONF_TSC_KHZ", NULL); + output_autoconf(s, o, "autoconf-ktime-get-real.c", "STAPCONF_KTIME_GET_REAL", NULL); + output_autoconf(s, o, "autoconf-x86-uniregs.c", "STAPCONF_X86_UNIREGS", NULL); + output_autoconf(s, o, "autoconf-nameidata.c", "STAPCONF_NAMEIDATA_CLEANUP", NULL); + output_autoconf(s, o, "autoconf-unregister-kprobes.c", "STAPCONF_UNREGISTER_KPROBES", NULL); + output_autoconf(s, o, "autoconf-real-parent.c", "STAPCONF_REAL_PARENT", NULL); + output_autoconf(s, o, "autoconf-uaccess.c", "STAPCONF_LINUX_UACCESS_H", NULL); + output_autoconf(s, o, "autoconf-oneachcpu-retry.c", "STAPCONF_ONEACHCPU_RETRY", NULL); + output_autoconf(s, o, "autoconf-dpath-path.c", "STAPCONF_DPATH_PATH", NULL); + output_autoconf(s, o, "autoconf-synchronize-sched.c", "STAPCONF_SYNCHRONIZE_SCHED", NULL); + 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); #if 0 /* NB: For now, the performance hit of probe_kernel_read/write (vs. our * homegrown safe-access functions) is deemed undesireable, so we'll skip * this autoconf. */ - o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-probe-kernel.c, -DSTAPCONF_PROBE_KERNEL,)" << endl; + output_autoconf(s, o, "autoconf-probe-kernel.c", "STAPCONF_PROBE_KERNEL", NULL); #endif + o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl; + for (unsigned i=0; i<s.macros.size(); i++) o << "EXTRA_CFLAGS += -D " << lex_cast_qstring(s.macros[i]) << endl; @@ -306,3 +336,5 @@ run_pass (systemtap_session& s) rc = system (staprun_cmd.c_str ()); return rc; } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -16,3 +16,5 @@ int run_pass (systemtap_session& s); #endif // BUILDRUN_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -25,9 +25,38 @@ extern "C" { using namespace std; +#define SYSTEMTAP_CACHE_MAX_FILENAME "cache_mb_limit" +#define SYSTEMTAP_CACHE_DEFAULT_MB 64 + +struct cache_ent_info { + string path; + bool is_module; + size_t size; + long weight; //lower == removed earlier + + cache_ent_info(const string& path, bool is_module); + bool operator<(const struct cache_ent_info& other) const + { return weight < other.weight; } + void unlink() const; +}; + +static void clean_cache(systemtap_session& s); + + void add_to_cache(systemtap_session& s) { + string stapconf_src_path = s.tmpdir + "/" + s.stapconf_name; + if (s.verbose > 1) + clog << "Copying " << stapconf_src_path << " to " << s.stapconf_path << endl; + if (copy_file(stapconf_src_path.c_str(), s.stapconf_path.c_str()) != 0) + { + cerr << "Copy failed (\"" << stapconf_src_path << "\" to \"" + << s.stapconf_path << "\"): " << strerror(errno) << endl; + s.use_cache = false; + return; + } + string module_src_path = s.tmpdir + "/" + s.module_name + ".ko"; if (s.verbose > 1) clog << "Copying " << module_src_path << " to " << s.hash_path << endl; @@ -65,14 +94,38 @@ add_to_cache(systemtap_session& s) bool get_from_cache(systemtap_session& s) { + string stapconf_dest_path = s.tmpdir + "/" + s.stapconf_name; string module_dest_path = s.tmpdir + "/" + s.module_name + ".ko"; string c_src_path = s.hash_path; - int fd_module, fd_c; + int fd_stapconf, fd_module, fd_c; if (c_src_path.rfind(".ko") == (c_src_path.size() - 3)) c_src_path.resize(c_src_path.size() - 3); c_src_path += ".c"; + // See if stapconf exists + fd_stapconf = open(s.stapconf_path.c_str(), O_RDONLY); + if (fd_stapconf == -1) + { + // It isn't in cache. + return false; + } + + // Copy the stapconf header file to the destination + if (copy_file(s.stapconf_path.c_str(), stapconf_dest_path.c_str()) != 0) + { + cerr << "Copy failed (\"" << s.stapconf_path << "\" to \"" + << stapconf_dest_path << "\"): " << strerror(errno) << endl; + close(fd_stapconf); + return false; + } + + // We're done with this file handle. + close(fd_stapconf); + + if (s.verbose > 1) + clog << "Pass 3: using cached " << s.stapconf_path << endl; + // See if module exists fd_module = open(s.hash_path.c_str(), O_RDONLY); if (fd_module == -1) @@ -146,7 +199,7 @@ get_from_cache(systemtap_session& s) } -void +static void clean_cache(systemtap_session& s) { if (s.cache_path != "") @@ -170,7 +223,9 @@ clean_cache(systemtap_session& s) cache_mb_max = SYSTEMTAP_CACHE_DEFAULT_MB; if (s.verbose > 1) - clog << "Cache limit file " << s.cache_path << "/" << SYSTEMTAP_CACHE_MAX_FILENAME << " missing, creating default." << endl; + clog << "Cache limit file " << s.cache_path << "/" + << SYSTEMTAP_CACHE_MAX_FILENAME + << " missing, creating default." << endl; } //glob for all kernel modules in the cache dir @@ -179,33 +234,44 @@ clean_cache(systemtap_session& s) glob(glob_str.c_str(), 0, NULL, &cache_glob); - set<struct cache_ent_info, struct weight_sorter> cache_contents; + set<struct cache_ent_info> cache_contents; unsigned long cache_size_b = 0; //grab info for each cache entry (.ko and .c) for (unsigned int i = 0; i < cache_glob.gl_pathc; i++) { - struct cache_ent_info cur_info; string cache_ent_path = cache_glob.gl_pathv[i]; - long cur_size = 0; + cache_ent_path.resize(cache_ent_path.length() - 3); - cache_ent_path = cache_ent_path.substr(0, cache_ent_path.length() - 3); - cur_info.path = cache_ent_path; - cur_info.weight = get_cache_file_weight(cache_ent_path); + struct cache_ent_info cur_info(cache_ent_path, true); + if (cur_info.size != 0 && cur_info.weight != 0) + { + cache_size_b += cur_info.size; + cache_contents.insert(cur_info); + } + } - cur_size = get_cache_file_size(cache_ent_path); - cur_info.size = cur_size; - cache_size_b += cur_size; + globfree(&cache_glob); + //grab info for each stapconf cache entry (.h) + glob_str = s.cache_path + "/*/*.h"; + glob(glob_str.c_str(), 0, NULL, &cache_glob); + for (unsigned int i = 0; i < cache_glob.gl_pathc; i++) + { + string cache_ent_path = cache_glob.gl_pathv[i]; + cache_ent_path.resize(cache_ent_path.length() - 3); + + struct cache_ent_info cur_info(cache_ent_path, false); if (cur_info.size != 0 && cur_info.weight != 0) { + cache_size_b += cur_info.size; cache_contents.insert(cur_info); } } globfree(&cache_glob); - set<struct cache_ent_info, struct weight_sorter>::iterator i; + set<struct cache_ent_info>::iterator i; unsigned long r_cache_size = cache_size_b; string removed_dirs = ""; @@ -216,8 +282,8 @@ clean_cache(systemtap_session& s) break; //remove this (*i) cache_entry, add to removed list + i->unlink(); r_cache_size -= i->size; - unlink_cache_entry(i->path); removed_dirs += i->path + ", "; } @@ -238,43 +304,29 @@ clean_cache(systemtap_session& s) } } -//Get the size, in bytes, of the module (.ko) and the -// corresponding source (.c) -long -get_cache_file_size(const string &cache_ent_path) +// Get the size of a file in bytes +static size_t +get_file_size(const string &path) { - size_t cache_ent_size = 0; - string mod_path = cache_ent_path + ".ko", - source_path = cache_ent_path + ".c"; - struct stat file_info; - if (stat(mod_path.c_str(), &file_info) == 0) - cache_ent_size += file_info.st_size; + if (stat(path.c_str(), &file_info) == 0) + return file_info.st_size; else return 0; - - //Don't care if the .c isn't there, it's much smaller - // than the .ko anyway - if (stat(source_path.c_str(), &file_info) == 0) - cache_ent_size += file_info.st_size; - - - return cache_ent_size; // / 1024 / 1024; //convert to MiB } -//Assign a weight to this cache entry. A lower weight +//Assign a weight for a particular file. A lower weight // will be removed before a higher weight. //TODO: for now use system mtime... later base a // weighting on size, ctime, atime etc.. -long -get_cache_file_weight(const string &cache_ent_path) +static long +get_file_weight(const string &path) { time_t dir_mtime = 0; struct stat dir_stat_info; - string module_path = cache_ent_path + ".ko"; - if (stat(module_path.c_str(), &dir_stat_info) == 0) + if (stat(path.c_str(), &dir_stat_info) == 0) //GNU struct stat defines st_atime as st_atim.tv_sec // but it doesnt seem to work properly in practice // so use st_atim.tv_sec -- bad for portability? @@ -284,14 +336,36 @@ get_cache_file_weight(const string &cache_ent_path) } -//deletes the module and source file contain -void -unlink_cache_entry(const string &cache_ent_path) +cache_ent_info::cache_ent_info(const string& path, bool is_module): + path(path), is_module(is_module) { - //remove both .ko and .c files - string mod_path = cache_ent_path + ".ko"; - string source_path = cache_ent_path + ".c"; + if (is_module) + { + string mod_path = path + ".ko"; + string source_path = path + ".c"; + size = get_file_size(mod_path) + get_file_size(source_path); + weight = get_file_weight(mod_path); + } + else + { + size = get_file_size(path); + weight = get_file_weight(path); + } +} + - unlink(mod_path.c_str()); //it must exist, globbed for it earlier - unlink(source_path.c_str()); //if its not there, no matter +void +cache_ent_info::unlink() const +{ + if (is_module) + { + string mod_path = path + ".ko"; + string source_path = path + ".c"; + ::unlink(mod_path.c_str()); + ::unlink(source_path.c_str()); + } + else + ::unlink(path.c_str()); } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -1,20 +1,4 @@ -#define SYSTEMTAP_CACHE_MAX_FILENAME "cache_mb_limit" -#define SYSTEMTAP_CACHE_DEFAULT_MB 64 - -struct cache_ent_info { - std::string path; - size_t size; - long weight; //lower == removed earlier -}; - -struct weight_sorter { - bool operator() (const struct cache_ent_info& c1, const struct cache_ent_info& c2) const - { return c1.weight < c2.weight;} -}; - void add_to_cache(systemtap_session& s); bool get_from_cache(systemtap_session& s); -void clean_cache(systemtap_session& s); -long get_cache_file_size(const std::string &cache_ent_path); -long get_cache_file_weight(const std::string &cache_ent_path); -void unlink_cache_entry(const std::string &cache_ent_path); + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for systemtap 0.8. +# Generated by GNU Autoconf 2.61 for systemtap 0.9. # # Report bugs to <systemtap@sources.redhat.com>. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -17,7 +17,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -39,45 +39,17 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi # Support unset when possible. @@ -93,6 +65,8 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) +as_nl=' +' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -115,7 +89,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -128,10 +102,17 @@ PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -153,7 +134,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -179,7 +160,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -261,7 +242,7 @@ IFS=$as_save_IFS if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -282,7 +263,7 @@ _ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -362,10 +343,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -434,10 +415,9 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message } @@ -473,7 +453,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -501,6 +481,7 @@ case `echo -n x` in *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -513,22 +494,19 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -553,10 +531,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -596,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='systemtap' PACKAGE_TARNAME='systemtap' -PACKAGE_VERSION='0.8' -PACKAGE_STRING='systemtap 0.8' +PACKAGE_VERSION='0.9' +PACKAGE_STRING='systemtap 0.9' PACKAGE_BUGREPORT='systemtap@sources.redhat.com' # Factoring default headers for most tests. @@ -636,148 +614,129 @@ ac_includes_default="\ # include <unistd.h> #endif" -enable_option_checking=no -ac_subst_vars='LTLIBOBJS -LIBOBJS -subdirs -CXXCPP -PROCFLAGS -DATE -stap_LIBS -elfutils_abs_srcdir -BUILD_ELFUTILS_FALSE -BUILD_ELFUTILS_TRUE -BUILD_SERVER_FALSE -BUILD_SERVER_TRUE -nspr_LIBS -nspr_CFLAGS -nss_LIBS -nss_CFLAGS -PKG_CONFIG -BUILD_REFDOCS_FALSE -BUILD_REFDOCS_TRUE -have_xmlto -BUILD_DOCS_FALSE -BUILD_DOCS_TRUE -have_latex2html -have_ps2pdf -have_dvips -have_latex -BUILD_CRASHMOD_FALSE -BUILD_CRASHMOD_TRUE -staplog_CPPFLAGS -sqlite3_LIBS -PIECXXFLAGS -PIECFLAGS -PIELDFLAGS -RANLIB -ANSI2KNR -U -EGREP -GREP -CPP -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -LN_S -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' +LN_S +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CPP +GREP +EGREP +U +ANSI2KNR +RANLIB +PIELDFLAGS +PIECFLAGS +PIECXXFLAGS +sqlite3_LIBS +staplog_CPPFLAGS +BUILD_CRASHMOD_TRUE +BUILD_CRASHMOD_FALSE +have_latex +have_dvips +have_ps2pdf +have_latex2html +BUILD_DOCS_TRUE +BUILD_DOCS_FALSE +have_xmlto +BUILD_REFDOCS_TRUE +BUILD_REFDOCS_FALSE +nss_CFLAGS +nspr_CFLAGS +BUILD_SERVER_TRUE +BUILD_SERVER_FALSE +BUILD_ELFUTILS_TRUE +BUILD_ELFUTILS_FALSE +elfutils_abs_srcdir +stap_LIBS +DATE +PROCFLAGS +CXXCPP +subdirs +LIBOBJS +LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_maintainer_mode -enable_dependency_tracking -enable_perfmon -enable_prologues -enable_ssp -enable_pie -enable_sqlite -enable_crash -enable_docs -enable_refdocs -enable_server -with_elfutils -' ac_precious_vars='build_alias host_alias target_alias @@ -790,19 +749,12 @@ CXX CXXFLAGS CCC CPP -PKG_CONFIG -nss_CFLAGS -nss_LIBS -nspr_CFLAGS -nspr_LIBS CXXCPP' ac_subdirs_all='testsuite' # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -901,21 +853,13 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -928,21 +872,13 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1133,38 +1069,22 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -1184,7 +1104,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option + -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1193,16 +1113,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1211,38 +1131,22 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. +# Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1257,7 +1161,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1273,10 +1177,10 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1284,12 +1188,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1316,12 +1220,12 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1348,7 +1252,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures systemtap 0.8 to adapt to many kinds of systems. +\`configure' configures systemtap 0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1370,9 +1274,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1382,25 +1286,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/systemtap] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/systemtap] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1414,12 +1318,11 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of systemtap 0.8:";; + short | recursive ) echo "Configuration of systemtap 0.9:";; esac cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful @@ -1464,11 +1367,6 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor - PKG_CONFIG path to pkg-config utility - nss_CFLAGS C compiler flags for nss, overriding pkg-config - nss_LIBS linker flags for nss, overriding pkg-config - nspr_CFLAGS C compiler flags for nspr, overriding pkg-config - nspr_LIBS linker flags for nspr, overriding pkg-config CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help @@ -1482,17 +1380,15 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1528,7 +1424,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1537,11 +1433,11 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -systemtap configure 0.8 -generated by GNU Autoconf 2.63 +systemtap configure 0.9 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1551,8 +1447,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by systemtap $as_me 0.8, which was -generated by GNU Autoconf 2.63. Invocation command line was +It was created by systemtap $as_me 0.9, which was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1588,7 +1484,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1623,7 +1519,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1675,12 +1571,11 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1710,9 +1605,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1727,9 +1622,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1745,8 +1640,8 @@ _ASBOX echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1788,24 +1683,21 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE +# Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + set x "$prefix/share/config.site" "$prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" +shift +for ac_site_file do - test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1815,16 +1707,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1838,38 +1730,29 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1879,12 +1762,10 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1940,8 +1821,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1967,12 +1848,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -2001,29 +1881,17 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 fi fi done done ;; esac - done IFS=$as_save_IFS -rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -2036,8 +1904,8 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2047,8 +1915,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file @@ -2071,9 +1939,9 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi @@ -2084,23 +1952,26 @@ then # Ok. : else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! +echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. +# Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -2111,15 +1982,15 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin @@ -2154,8 +2025,8 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in @@ -2167,10 +2038,10 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2183,7 +2054,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2194,23 +2065,22 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -2227,12 +2097,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2251,8 +2121,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi @@ -2269,7 +2139,7 @@ fi # Define the identity of the package. PACKAGE='systemtap' - VERSION='0.8' + VERSION='0.9' cat >>confdefs.h <<_ACEOF @@ -2307,10 +2177,10 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. @@ -2323,7 +2193,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2334,11 +2204,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2347,10 +2217,10 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. @@ -2363,7 +2233,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2374,11 +2244,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -2386,8 +2256,12 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -2411,8 +2285,8 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval @@ -2420,8 +2294,8 @@ else USE_MAINTAINER_MODE=no fi - { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -2440,15 +2314,16 @@ case $mkdir_p in */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } fi ac_ext=c @@ -2459,10 +2334,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2475,7 +2350,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2486,11 +2361,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2499,10 +2374,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2515,7 +2390,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2526,11 +2401,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2538,8 +2413,12 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2552,10 +2431,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2568,7 +2447,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2579,11 +2458,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2592,10 +2471,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2613,7 +2492,7 @@ do continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2636,11 +2515,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2651,10 +2530,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2667,7 +2546,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2678,11 +2557,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2695,10 +2574,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2711,7 +2590,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2722,11 +2601,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2738,8 +2617,12 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2749,50 +2632,44 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2811,22 +2688,27 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2837,11 +2719,10 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' @@ -2852,7 +2733,7 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2879,27 +2760,25 @@ else ac_file='' fi -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables +echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then @@ -2908,53 +2787,49 @@ if test "$cross_compiling" != yes; then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. +echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi fi fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2963,33 +2838,31 @@ $as_echo "$ac_try_echo") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3012,43 +2885,40 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3074,21 +2944,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -3098,19 +2967,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -3137,21 +3002,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3176,21 +3040,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3216,21 +3079,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3245,8 +3107,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3262,10 +3124,10 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3336,21 +3198,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3366,15 +3227,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3395,8 +3256,8 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none @@ -3423,8 +3284,8 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. @@ -3448,10 +3309,10 @@ fi depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3539,8 +3400,8 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -3568,10 +3429,10 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -3584,7 +3445,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3595,11 +3456,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3612,10 +3473,10 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -3628,7 +3489,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3639,11 +3500,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3655,8 +3516,12 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -3666,47 +3531,43 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3732,21 +3593,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -3756,19 +3616,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes @@ -3795,21 +3651,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" @@ -3834,21 +3689,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag @@ -3874,21 +3728,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3903,8 +3756,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then @@ -3928,10 +3781,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -4019,8 +3872,8 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if @@ -4039,15 +3892,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -4079,21 +3932,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -4117,14 +3969,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -4132,7 +3983,7 @@ $as_echo "$ac_try_echo") >&5 # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -4157,8 +4008,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -4186,21 +4037,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -4224,14 +4074,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -4239,7 +4088,7 @@ $as_echo "$ac_try_echo") >&5 # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -4255,13 +4104,11 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=c @@ -4278,10 +4125,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4294,7 +4141,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4305,11 +4152,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4318,10 +4165,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -4334,7 +4181,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4345,11 +4192,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4357,8 +4204,12 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4371,10 +4222,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4387,7 +4238,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4398,11 +4249,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4411,10 +4262,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4432,7 +4283,7 @@ do continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4455,11 +4306,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4470,10 +4321,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4486,7 +4337,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4497,11 +4348,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4514,10 +4365,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -4530,7 +4381,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4541,11 +4392,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4557,8 +4408,12 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4568,56 +4423,50 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4643,21 +4492,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -4667,19 +4515,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -4706,21 +4550,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -4745,21 +4588,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -4785,21 +4627,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -4814,8 +4655,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -4831,10 +4672,10 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -4905,21 +4746,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -4935,15 +4775,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -4955,10 +4795,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -5046,8 +4886,8 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -5065,16 +4905,16 @@ fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc if test "x$CC" != xcc; then - { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } + { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } else - { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } + { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } fi -set dummy $CC; ac_cc=`$as_echo "$2" | +set dummy $CC; ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5100,21 +4940,19 @@ if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes @@ -5125,11 +4963,10 @@ then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* @@ -5137,21 +4974,19 @@ $as_echo "$ac_try_echo") >&5 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. @@ -5169,11 +5004,11 @@ rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 @@ -5195,11 +5030,11 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then fi -{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5 -$as_echo_n "checking for function prototypes... " >&6; } +{ echo "$as_me:$LINENO: checking for function prototypes" >&5 +echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; } if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define PROTOTYPES 1 @@ -5211,43 +5046,48 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$GREP"; then ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -5262,60 +5102,74 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 - done + + $ac_path_GREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } - fi +fi + else ac_cv_path_GREP=$GREP fi + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - if test -z "$EGREP"; then + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -5330,31 +5184,40 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 - done + + $ac_path_EGREP_found && break 3 done done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } - fi +fi + else ac_cv_path_EGREP=$EGREP fi + fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5381,21 +5244,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no @@ -5487,40 +5349,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -5542,11 +5401,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5564,21 +5423,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -5586,15 +5444,12 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5613,21 +5468,20 @@ fi for ac_header in string.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5643,33 +5497,32 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5683,52 +5536,51 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -5737,24 +5589,21 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5765,10 +5614,10 @@ done if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -5781,7 +5630,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5792,11 +5641,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -5805,10 +5654,10 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -5821,7 +5670,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5832,11 +5681,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -5844,8 +5693,12 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -5869,12 +5722,11 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5903,29 +5755,17 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 fi fi done done ;; esac - done IFS=$as_save_IFS -rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -5938,8 +5778,8 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -5949,12 +5789,11 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -5971,12 +5810,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -5994,10 +5833,10 @@ if test "${enable_perfmon+set}" = set; then LDFLAGS="$LDFLAGS -L$enable_perfmon/lib" fi -{ $as_echo "$as_me:$LINENO: checking for pfm_start in -lpfm" >&5 -$as_echo_n "checking for pfm_start in -lpfm... " >&6; } +{ echo "$as_me:$LINENO: checking for pfm_start in -lpfm" >&5 +echo $ECHO_N "checking for pfm_start in -lpfm... $ECHO_C" >&6; } if test "${ac_cv_lib_pfm_pfm_start+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpfm $LIBS" @@ -6029,37 +5868,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pfm_pfm_start=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pfm_pfm_start=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pfm_pfm_start" >&5 -$as_echo "$ac_cv_lib_pfm_pfm_start" >&6; } -if test "x$ac_cv_lib_pfm_pfm_start" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pfm_pfm_start" >&5 +echo "${ECHO_T}$ac_cv_lib_pfm_pfm_start" >&6; } +if test $ac_cv_lib_pfm_pfm_start = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPFM 1 _ACEOF @@ -6068,8 +5903,8 @@ _ACEOF else - { { $as_echo "$as_me:$LINENO: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&5 -$as_echo "$as_me: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&2;} + { { echo "$as_me:$LINENO: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&5 +echo "$as_me: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&2;} { (exit 1); exit 1; }; } fi @@ -6078,17 +5913,17 @@ fi if test "${enable_prologues+set}" != set; then - { $as_echo "$as_me:$LINENO: checking to see if prologue searching should be the default" >&5 -$as_echo_n "checking to see if prologue searching should be the default... " >&6; } + { echo "$as_me:$LINENO: checking to see if prologue searching should be the default" >&5 +echo $ECHO_N "checking to see if prologue searching should be the default... $ECHO_C" >&6; } if { echo '#if __i386__ == 1 && __GNUC__ < 4' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then enable_prologues=yes - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi # Check whether --enable-prologues was given. @@ -6097,7 +5932,7 @@ if test "${enable_prologues+set}" = set; then if test "$enable_prologues" = yes; then cat >>confdefs.h <<\_ACEOF -#define ENABLE_PROLOGUES /**/ +#define ENABLE_PROLOGUES _ACEOF fi @@ -6124,30 +5959,29 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 -$as_echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} + { echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 +echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" CXFXLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: Compiler does not support -fstack-protector-all et al." >&5 -$as_echo "$as_me: Compiler does not support -fstack-protector-all et al." >&6;} + { echo "$as_me:$LINENO: Compiler does not support -fstack-protector-all et al." >&5 +echo "$as_me: Compiler does not support -fstack-protector-all et al." >&6;} CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" fi @@ -6178,24 +6012,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then - { $as_echo "$as_me:$LINENO: Compiling with gcc pie et al." >&5 -$as_echo "$as_me: Compiling with gcc pie et al." >&6;} + { echo "$as_me:$LINENO: Compiling with gcc pie et al." >&5 +echo "$as_me: Compiling with gcc pie et al." >&6;} # LDFLAGS is special since it may be passed down to bundled-elfutils, # and interfere with the .so's built therein PIELDFLAGS="$LDFLAGS" @@ -6206,12 +6037,12 @@ $as_echo "$as_me: Compiling with gcc pie et al." >&6;} CXXFLAGS="$save_CXXFLAGS" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: Compiler does not support -pie et al." >&5 -$as_echo "$as_me: Compiler does not support -pie et al." >&6;} + { echo "$as_me:$LINENO: Compiler does not support -pie et al." >&5 +echo "$as_me: Compiler does not support -pie et al." >&6;} PIECFLAGS="" CFLAGS="$save_CFLAGS" PIECXXFLAGS="" @@ -6220,7 +6051,6 @@ $as_echo "$as_me: Compiler does not support -pie et al." >&6;} LDFLAGS="$save_LDFLAGS" fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -6237,10 +6067,10 @@ else fi sqlite3_LIBS= if test "x$enable_sqlite" != xno; then - { $as_echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5 -$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; } + { echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5 +echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6; } if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" @@ -6272,37 +6102,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_sqlite3_sqlite3_open=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_sqlite3_sqlite3_open=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5 -$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; } -if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5 +echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_open" >&6; } +if test $ac_cv_lib_sqlite3_sqlite3_open = yes; then sqlite3_LIBS=-lsqlite3 @@ -6312,13 +6138,11 @@ _ACEOF else if test "x$enable_sqlite" != xcheck; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --enable-sqlite was given, but test for sqlite failed + { { echo "$as_me:$LINENO: error: --enable-sqlite was given, but test for sqlite failed See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --enable-sqlite was given, but test for sqlite failed +echo "$as_me: error: --enable-sqlite was given, but test for sqlite failed See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi fi @@ -6337,11 +6161,11 @@ if test "${enable_crash+set}" = set; then for ac_header in crash/defs.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6361,21 +6185,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -6383,20 +6206,17 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: cannot find required crash header (crash-devel may need to be installed)" >&5 -$as_echo "$as_me: error: cannot find required crash header (crash-devel may need to be installed)" >&2;} + { { echo "$as_me:$LINENO: error: cannot find required crash header (crash-devel may need to be installed)" >&5 +echo "$as_me: error: cannot find required crash header (crash-devel may need to be installed)" >&2;} { (exit 1); exit 1; }; } fi @@ -6427,10 +6247,10 @@ fi # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_have_latex+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$have_latex"; then ac_cv_prog_have_latex="$have_latex" # Let the user override the test. @@ -6443,7 +6263,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_latex="yes" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6455,20 +6275,20 @@ fi fi have_latex=$ac_cv_prog_have_latex if test -n "$have_latex"; then - { $as_echo "$as_me:$LINENO: result: $have_latex" >&5 -$as_echo "$have_latex" >&6; } + { echo "$as_me:$LINENO: result: $have_latex" >&5 +echo "${ECHO_T}$have_latex" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_have_dvips+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$have_dvips"; then ac_cv_prog_have_dvips="$have_dvips" # Let the user override the test. @@ -6481,7 +6301,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_dvips="yes" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6493,20 +6313,20 @@ fi fi have_dvips=$ac_cv_prog_have_dvips if test -n "$have_dvips"; then - { $as_echo "$as_me:$LINENO: result: $have_dvips" >&5 -$as_echo "$have_dvips" >&6; } + { echo "$as_me:$LINENO: result: $have_dvips" >&5 +echo "${ECHO_T}$have_dvips" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ps2pdf", so it can be a program name with args. set dummy ps2pdf; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_have_ps2pdf+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$have_ps2pdf"; then ac_cv_prog_have_ps2pdf="$have_ps2pdf" # Let the user override the test. @@ -6519,7 +6339,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_ps2pdf="yes" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6531,20 +6351,20 @@ fi fi have_ps2pdf=$ac_cv_prog_have_ps2pdf if test -n "$have_ps2pdf"; then - { $as_echo "$as_me:$LINENO: result: $have_ps2pdf" >&5 -$as_echo "$have_ps2pdf" >&6; } + { echo "$as_me:$LINENO: result: $have_ps2pdf" >&5 +echo "${ECHO_T}$have_ps2pdf" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "latex2html", so it can be a program name with args. set dummy latex2html; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_have_latex2html+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$have_latex2html"; then ac_cv_prog_have_latex2html="$have_latex2html" # Let the user override the test. @@ -6557,7 +6377,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_latex2html="yes" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6569,23 +6389,23 @@ fi fi have_latex2html=$ac_cv_prog_have_latex2html if test -n "$have_latex2html"; then - { $as_echo "$as_me:$LINENO: result: $have_latex2html" >&5 -$as_echo "$have_latex2html" >&6; } + { echo "$as_me:$LINENO: result: $have_latex2html" >&5 +echo "${ECHO_T}$have_latex2html" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then if test "$enable_docs" == "yes"; then - { { $as_echo "$as_me:$LINENO: error: cannot find all tools for building documentation" >&5 -$as_echo "$as_me: error: cannot find all tools for building documentation" >&2;} + { { echo "$as_me:$LINENO: error: cannot find all tools for building documentation" >&5 +echo "$as_me: error: cannot find all tools for building documentation" >&2;} { (exit 1); exit 1; }; } fi if test "$enable_docs" == "check"; then - { $as_echo "$as_me:$LINENO: WARNING: will not build documentation, cannot find all tools" >&5 -$as_echo "$as_me: WARNING: will not build documentation, cannot find all tools" >&2;} + { echo "$as_me:$LINENO: WARNING: will not build documentation, cannot find all tools" >&5 +echo "$as_me: WARNING: will not build documentation, cannot find all tools" >&2;} fi fi if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then @@ -6609,16 +6429,16 @@ else fi if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then - { { $as_echo "$as_me:$LINENO: error: must use --enable-docs with --enable-refdocs" >&5 -$as_echo "$as_me: error: must use --enable-docs with --enable-refdocs" >&2;} + { { echo "$as_me:$LINENO: error: must use --enable-docs with --enable-refdocs" >&5 +echo "$as_me: error: must use --enable-docs with --enable-refdocs" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_have_xmlto+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$have_xmlto"; then ac_cv_prog_have_xmlto="$have_xmlto" # Let the user override the test. @@ -6631,7 +6451,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_xmlto="yes" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6643,17 +6463,17 @@ fi fi have_xmlto=$ac_cv_prog_have_xmlto if test -n "$have_xmlto"; then - { $as_echo "$as_me:$LINENO: result: $have_xmlto" >&5 -$as_echo "$have_xmlto" >&6; } + { echo "$as_me:$LINENO: result: $have_xmlto" >&5 +echo "${ECHO_T}$have_xmlto" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x${have_xmlto}" == "xyes"; then -{ $as_echo "$as_me:$LINENO: checking for xmlto pdf support" >&5 -$as_echo_n "checking for xmlto pdf support... " >&6; } +{ echo "$as_me:$LINENO: checking for xmlto pdf support" >&5 +echo $ECHO_N "checking for xmlto pdf support... $ECHO_C" >&6; } cat > conftest.$ac_ext << EOF <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" @@ -6664,17 +6484,17 @@ EOF xmlto pdf conftest.$ac_ext >& /dev/null if test $? == 0; then have_xmlto_pdf="yes" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi if test "$enable_refdocs" == "yes"; then if test "x${have_xmlto}${have_xmlto_pdf}" != "xyesyes"; then - { { $as_echo "$as_me:$LINENO: error: cannot find proper yxmlto for building reference documentation" >&5 -$as_echo "$as_me: error: cannot find proper yxmlto for building reference documentation" >&2;} + { { echo "$as_me:$LINENO: error: cannot find proper yxmlto for building reference documentation" >&5 +echo "$as_me: error: cannot find proper yxmlto for building reference documentation" >&2;} { (exit 1); exit 1; }; } fi fi @@ -6697,268 +6517,402 @@ else enable_server="check" fi - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for /usr/include/nss3" >&5 +echo $ECHO_N "checking for /usr/include/nss3... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_include_nss3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/include/nss3"; then + ac_cv_file__usr_include_nss3=yes +else + ac_cv_file__usr_include_nss3=no fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } +fi +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nss3" >&5 +echo "${ECHO_T}$ac_cv_file__usr_include_nss3" >&6; } +if test $ac_cv_file__usr_include_nss3 = yes; then + nssdir=nss3 +else + + { echo "$as_me:$LINENO: checking for /usr/include/nss" >&5 +echo $ECHO_N "checking for /usr/include/nss... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_include_nss+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/include/nss"; then + ac_cv_file__usr_include_nss=yes else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_file__usr_include_nss=no +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nss" >&5 +echo "${ECHO_T}$ac_cv_file__usr_include_nss" >&6; } +if test $ac_cv_file__usr_include_nss = yes; then + nssdir=nss fi fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } +{ echo "$as_me:$LINENO: checking for /usr/include/nspr4" >&5 +echo $ECHO_N "checking for /usr/include/nspr4... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_include_nspr4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/include/nspr4"; then + ac_cv_file__usr_include_nspr4=yes else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_file__usr_include_nspr4=no +fi fi +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nspr4" >&5 +echo "${ECHO_T}$ac_cv_file__usr_include_nspr4" >&6; } +if test $ac_cv_file__usr_include_nspr4 = yes; then + nsprdir=nspr4 +else - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi + { echo "$as_me:$LINENO: checking for /usr/include/nspr" >&5 +echo $ECHO_N "checking for /usr/include/nspr... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_include_nspr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/include/nspr"; then + ac_cv_file__usr_include_nspr=yes else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + ac_cv_file__usr_include_nspr=no fi - fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nspr" >&5 +echo "${ECHO_T}$ac_cv_file__usr_include_nspr" >&6; } +if test $ac_cv_file__usr_include_nspr = yes; then + nsprdir=nspr fi -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for nss" >&5 -$as_echo_n "checking for nss... " >&6; } -if test -n "$nss_CFLAGS"; then - pkg_cv_nss_CFLAGS="$nss_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss >= 3\"") >&5 - ($PKG_CONFIG --exists --print-errors "nss >= 3") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_nss_CFLAGS=`$PKG_CONFIG --cflags "nss >= 3" 2>/dev/null` -else - pkg_failed=yes fi - else - pkg_failed=untried + +if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then +nss_CFLAGS="-I/usr/include/$nssdir" +nspr_CFLAGS="-I/usr/include/$nsprdir" + + +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS" + + + + + + + +for ac_header in "$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h" +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -if test -n "$nss_LIBS"; then - pkg_cv_nss_LIBS="$nss_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss >= 3\"") >&5 - ($PKG_CONFIG --exists --print-errors "nss >= 3") 2>&5 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_nss_LIBS=`$PKG_CONFIG --libs "nss >= 3" 2>/dev/null` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - pkg_failed=yes -fi - else - pkg_failed=untried + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $pkg_failed = yes; then + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------- ## +## Report this to systemtap@sources.redhat.com ## +## ------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - _pkg_short_errors_supported=no + eval "$as_ac_Header=\$ac_header_preproc" fi - if test $_pkg_short_errors_supported = yes; then - nss_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nss >= 3" 2>&1` - else - nss_PKG_ERRORS=`$PKG_CONFIG --print-errors "nss >= 3" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$nss_PKG_ERRORS" >&5 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - have_nss=no -elif test $pkg_failed = untried; then - have_nss=no +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + have_nss_includes=yes else - nss_CFLAGS=$pkg_cv_nss_CFLAGS - nss_LIBS=$pkg_cv_nss_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - have_nss=yes + have_nss_includes=no fi -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for nspr" >&5 -$as_echo_n "checking for nspr... " >&6; } +done -if test -n "$nspr_CFLAGS"; then - pkg_cv_nspr_CFLAGS="$nspr_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr >= 4\"") >&5 - ($PKG_CONFIG --exists --print-errors "nspr >= 4") 2>&5 +CPPFLAGS="$save_CPPFLAGS" +have_nss_libs=no +{ echo "$as_me:$LINENO: checking for PR_Connect in -lnspr4" >&5 +echo $ECHO_N "checking for PR_Connect in -lnspr4... $ECHO_C" >&6; } +if test "${ac_cv_lib_nspr4_PR_Connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnspr4 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char PR_Connect (); +int +main () +{ +return PR_Connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_nspr_CFLAGS=`$PKG_CONFIG --cflags "nspr >= 4" 2>/dev/null` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nspr4_PR_Connect=yes else - pkg_failed=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nspr4_PR_Connect=no fi - else - pkg_failed=untried + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if test -n "$nspr_LIBS"; then - pkg_cv_nspr_LIBS="$nspr_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nspr >= 4\"") >&5 - ($PKG_CONFIG --exists --print-errors "nspr >= 4") 2>&5 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nspr4_PR_Connect" >&5 +echo "${ECHO_T}$ac_cv_lib_nspr4_PR_Connect" >&6; } +if test $ac_cv_lib_nspr4_PR_Connect = yes; then + + { echo "$as_me:$LINENO: checking for SSL_ReHandshake in -lssl3" >&5 +echo $ECHO_N "checking for SSL_ReHandshake in -lssl3... $ECHO_C" >&6; } +if test "${ac_cv_lib_ssl3_SSL_ReHandshake+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl3 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SSL_ReHandshake (); +int +main () +{ +return SSL_ReHandshake (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_nspr_LIBS=`$PKG_CONFIG --libs "nspr >= 4" 2>/dev/null` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ssl3_SSL_ReHandshake=yes else - pkg_failed=yes -fi - else - pkg_failed=untried -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_ssl3_SSL_ReHandshake=no +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ssl3_SSL_ReHandshake" >&5 +echo "${ECHO_T}$ac_cv_lib_ssl3_SSL_ReHandshake" >&6; } +if test $ac_cv_lib_ssl3_SSL_ReHandshake = yes; then + have_nss_libs=yes +fi -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - nspr_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nspr >= 4" 2>&1` - else - nspr_PKG_ERRORS=`$PKG_CONFIG --print-errors "nspr >= 4" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$nspr_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - have_nspr=no -elif test $pkg_failed = untried; then - have_nspr=no -else - nspr_CFLAGS=$pkg_cv_nspr_CFLAGS - nspr_LIBS=$pkg_cv_nspr_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - have_nspr=yes fi -if test "x${have_nss}${have_nspr}" != "xyesyes"; then +if test "x${have_nss_includes}${have_nss_libs}" != "xyesyes"; then if test "$enable_server" == "yes"; then - { { $as_echo "$as_me:$LINENO: error: cannot find all libraries for stap-server" >&5 -$as_echo "$as_me: error: cannot find all libraries for stap-server" >&2;} + { { echo "$as_me:$LINENO: error: cannot find all libraries for stap-server" >&5 +echo "$as_me: error: cannot find all libraries for stap-server" >&2;} { (exit 1); exit 1; }; } fi if test "$enable_server" == "check"; then - { $as_echo "$as_me:$LINENO: WARNING: will not build stap-server, cannot find all libraries" >&5 -$as_echo "$as_me: WARNING: will not build stap-server, cannot find all libraries" >&2;} + { echo "$as_me:$LINENO: WARNING: will not build stap-server, cannot find all libraries" >&5 +echo "$as_me: WARNING: will not build stap-server, cannot find all libraries" >&2;} fi fi - if test "x${have_nss}${have_nspr}" == "xyesyes" -a "$enable_server" != "no"; then + if test "x${have_nss_includes}${have_nss_libs}" == "xyesyes" -a "$enable_server" != "no"; then BUILD_SERVER_TRUE= BUILD_SERVER_FALSE='#' else @@ -6973,8 +6927,8 @@ build_elfutils=no if test "${with_elfutils+set}" = set; then withval=$with_elfutils; case "$with_elfutils" in -yes) { { $as_echo "$as_me:$LINENO: error: --with-elfutils requires an argument" >&5 -$as_echo "$as_me: error: --with-elfutils requires an argument" >&2;} +yes) { { echo "$as_me:$LINENO: error: --with-elfutils requires an argument" >&5 +echo "$as_me: error: --with-elfutils requires an argument" >&2;} { (exit 1); exit 1; }; } ;; ''|no) ;; *) build_elfutils=yes ;; @@ -6999,10 +6953,10 @@ if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils http://elfutils.fedorahosted.org/ save_LIBS="$LIBS" -{ $as_echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5 -$as_echo_n "checking for dwfl_module_getsym in -ldw... " >&6; } +{ echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5 +echo $ECHO_N "checking for dwfl_module_getsym in -ldw... $ECHO_C" >&6; } if test "${ac_cv_lib_dw_dwfl_module_getsym+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldw -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf $LIBS" @@ -7034,37 +6988,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dw_dwfl_module_getsym=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dw_dwfl_module_getsym=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwfl_module_getsym" >&5 -$as_echo "$ac_cv_lib_dw_dwfl_module_getsym" >&6; } -if test "x$ac_cv_lib_dw_dwfl_module_getsym" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwfl_module_getsym" >&5 +echo "${ECHO_T}$ac_cv_lib_dw_dwfl_module_getsym" >&6; } +if test $ac_cv_lib_dw_dwfl_module_getsym = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDW 1 _ACEOF @@ -7073,16 +7023,16 @@ _ACEOF else - { { $as_echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&5 -$as_echo "$as_me: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&2;} + { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&5 +echo "$as_me: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&2;} { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: checking for dwarf_getelf in -ldw" >&5 -$as_echo_n "checking for dwarf_getelf in -ldw... " >&6; } +{ echo "$as_me:$LINENO: checking for dwarf_getelf in -ldw" >&5 +echo $ECHO_N "checking for dwarf_getelf in -ldw... $ECHO_C" >&6; } if test "${ac_cv_lib_dw_dwarf_getelf+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldw -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf $LIBS" @@ -7114,37 +7064,33 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dw_dwarf_getelf=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dw_dwarf_getelf=no fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwarf_getelf" >&5 -$as_echo "$ac_cv_lib_dw_dwarf_getelf" >&6; } -if test "x$ac_cv_lib_dw_dwarf_getelf" = x""yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwarf_getelf" >&5 +echo "${ECHO_T}$ac_cv_lib_dw_dwarf_getelf" >&6; } +if test $ac_cv_lib_dw_dwarf_getelf = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDW 1 _ACEOF @@ -7153,8 +7099,8 @@ _ACEOF else - { { $as_echo "$as_me:$LINENO: error: elfutils, libdw too old, need 0.126+" >&5 -$as_echo "$as_me: error: elfutils, libdw too old, need 0.126+" >&2;} + { { echo "$as_me:$LINENO: error: elfutils, libdw too old, need 0.126+" >&5 +echo "$as_me: error: elfutils, libdw too old, need 0.126+" >&2;} { (exit 1); exit 1; }; } fi @@ -7166,8 +7112,8 @@ else fi -{ $as_echo "$as_me:$LINENO: stap will link $stap_LIBS" >&5 -$as_echo "$as_me: stap will link $stap_LIBS" >&6;} +{ echo "$as_me:$LINENO: stap will link $stap_LIBS" >&5 +echo "$as_me: stap will link $stap_LIBS" >&6;} date=`date +%Y-%m-%d` @@ -7205,11 +7151,11 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" @@ -7241,21 +7187,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -7279,14 +7224,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err @@ -7294,7 +7238,7 @@ $as_echo "$ac_try_echo") >&5 # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -7319,8 +7263,8 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do @@ -7348,21 +7292,20 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -7386,14 +7329,13 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err @@ -7401,7 +7343,7 @@ $as_echo "$ac_try_echo") >&5 # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -7417,13 +7359,11 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } fi ac_ext=cpp @@ -7436,21 +7376,20 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_header in tr1/unordered_map do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7466,33 +7405,32 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7506,52 +7444,51 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -7560,24 +7497,21 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7597,8 +7531,8 @@ if test $build_elfutils = yes; then /*) elfutils_srcdir="$with_elfutils" ;; *) elfutils_srcdir="../$with_elfutils" ;; esac - { $as_echo "$as_me:$LINENO: running ${elfutils_srcdir}/configure" >&5 -$as_echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} + { echo "$as_me:$LINENO: running ${elfutils_srcdir}/configure" >&5 +echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} # Our libdw.so's libebl will look in $ORIGIN/../lib/... but that # $ORIGIN is where libdw.so resides, which is not where there is a ../lib. # Note that $libdir might be using a quoted use of $exec_prefix or $prefix. @@ -7613,31 +7547,33 @@ $as_echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} --prefix="$prefix" \ CFLAGS="${CFLAGS/-Wall/}" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && - make -k install-data # so that elfutils/version.h - if any - may be found. - # Note, we need -k because parts (like to po files) might fail, - # since those fo to $prefix to which we might not be able to write. - # We are only really interested in the include-elfutils files anyway here. + if test -f ${elfutils_srcdir}/config/version.h.in; then + echo Trying to install elfutils version header... + make install-pkgincludeHEADERS + fi + # so that elfutils/version.h - available from 0.138 - may be found. + # Don't use install-data because that will fail (installing in $prefix). ) + if test $? != 0; then exit; fi save_CPPFLAGS=${CPPFLAGS} CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils for ac_header in elfutils/version.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7653,33 +7589,32 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7693,52 +7628,51 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -7747,24 +7681,21 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7776,21 +7707,20 @@ else for ac_header in elfutils/version.h do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7806,33 +7736,32 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7846,52 +7775,51 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -7900,24 +7828,21 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7934,9 +7859,7 @@ _ACEOF ac_config_headers="$ac_config_headers config.h:config.in" -ac_config_files="$ac_config_files Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5" - - +ac_config_files="$ac_config_files Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 initscript/systemtap" subdirs="$subdirs testsuite" @@ -7969,12 +7892,11 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -8007,12 +7929,12 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -8028,7 +7950,7 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -8040,83 +7962,82 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. +echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_CRASHMOD_TRUE}" && test -z "${BUILD_CRASHMOD_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_CRASHMOD\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"BUILD_CRASHMOD\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_CRASHMOD\" was never defined. +echo "$as_me: error: conditional \"BUILD_CRASHMOD\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_DOCS\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_DOCS\" was never defined. +echo "$as_me: error: conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_REFDOCS_TRUE}" && test -z "${BUILD_REFDOCS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_REFDOCS\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"BUILD_REFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_REFDOCS\" was never defined. +echo "$as_me: error: conditional \"BUILD_REFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_SERVER_TRUE}" && test -z "${BUILD_SERVER_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_SERVER\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"BUILD_SERVER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_SERVER\" was never defined. +echo "$as_me: error: conditional \"BUILD_SERVER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_ELFUTILS_TRUE}" && test -z "${BUILD_ELFUTILS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_ELFUTILS\" was never defined. + { { echo "$as_me:$LINENO: error: conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_ELFUTILS\" was never defined. +echo "$as_me: error: conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -8129,7 +8050,7 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -8139,7 +8060,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -8161,45 +8082,17 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi # Support unset when possible. @@ -8215,6 +8108,8 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) +as_nl=' +' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -8237,7 +8132,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -8250,10 +8145,17 @@ PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -8275,7 +8177,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -8326,7 +8228,7 @@ $as_unset CDPATH s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -8354,6 +8256,7 @@ case `echo -n x` in *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -8366,22 +8269,19 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -8406,10 +8306,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -8431,8 +8331,8 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by systemtap $as_me 0.8, which was -generated by GNU Autoconf 2.63. Invocation command line was +This file was extended by systemtap $as_me 0.9, which was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8445,16 +8345,7 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" @@ -8462,23 +8353,22 @@ config_commands="$ac_config_commands" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -8492,13 +8382,13 @@ $config_commands Report bugs to <bug-autoconf@gnu.org>." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -systemtap config.status 0.8 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +systemtap config.status 0.9 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -8506,12 +8396,11 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do @@ -8533,36 +8422,30 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 + { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 + -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -8581,29 +8464,27 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL export CONFIG_SHELL - exec "\$@" + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # @@ -8611,7 +8492,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets @@ -8641,10 +8522,11 @@ do "man/stapprobes.socket.5") CONFIG_FILES="$CONFIG_FILES man/stapprobes.socket.5" ;; "man/stapprobes.tcp.5") CONFIG_FILES="$CONFIG_FILES man/stapprobes.tcp.5" ;; "man/stapprobes.udp.5") CONFIG_FILES="$CONFIG_FILES man/stapprobes.udp.5" ;; + "initscript/systemtap") CONFIG_FILES="$CONFIG_FILES initscript/systemtap" ;; "run-stap") CONFIG_FILES="$CONFIG_FILES run-stap" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -8685,144 +8567,228 @@ $debug || (umask 077 && mkdir "$tmp") } || { - $as_echo "$as_me: cannot create a temporary directory in ." >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then +_ACEOF -ac_cr='
' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim +MAINT!$MAINT$ac_delim +MKDIR_P!$MKDIR_P$ac_delim +LN_S!$LN_S$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +U!$U$ac_delim +ANSI2KNR!$ANSI2KNR$ac_delim +RANLIB!$RANLIB$ac_delim +PIELDFLAGS!$PIELDFLAGS$ac_delim +PIECFLAGS!$PIECFLAGS$ac_delim +PIECXXFLAGS!$PIECXXFLAGS$ac_delim +sqlite3_LIBS!$sqlite3_LIBS$ac_delim +staplog_CPPFLAGS!$staplog_CPPFLAGS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof _ACEOF -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then + cat >conf$$subs.sed <<_ACEOF +BUILD_CRASHMOD_TRUE!$BUILD_CRASHMOD_TRUE$ac_delim +BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim +have_latex!$have_latex$ac_delim +have_dvips!$have_dvips$ac_delim +have_ps2pdf!$have_ps2pdf$ac_delim +have_latex2html!$have_latex2html$ac_delim +BUILD_DOCS_TRUE!$BUILD_DOCS_TRUE$ac_delim +BUILD_DOCS_FALSE!$BUILD_DOCS_FALSE$ac_delim +have_xmlto!$have_xmlto$ac_delim +BUILD_REFDOCS_TRUE!$BUILD_REFDOCS_TRUE$ac_delim +BUILD_REFDOCS_FALSE!$BUILD_REFDOCS_FALSE$ac_delim +nss_CFLAGS!$nss_CFLAGS$ac_delim +nspr_CFLAGS!$nspr_CFLAGS$ac_delim +BUILD_SERVER_TRUE!$BUILD_SERVER_TRUE$ac_delim +BUILD_SERVER_FALSE!$BUILD_SERVER_FALSE$ac_delim +BUILD_ELFUTILS_TRUE!$BUILD_ELFUTILS_TRUE$ac_delim +BUILD_ELFUTILS_FALSE!$BUILD_ELFUTILS_FALSE$ac_delim +elfutils_abs_srcdir!$elfutils_abs_srcdir$ac_delim +stap_LIBS!$stap_LIBS$ac_delim +DATE!$DATE$ac_delim +PROCFLAGS!$PROCFLAGS$ac_delim +CXXCPP!$CXXCPP$ac_delim +subdirs!$subdirs$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi -_ACAWK +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -8838,133 +8804,19 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' <confdefs.h | sed ' -s/'"$ac_delim"'/"\\\ -"/g' >>$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -8993,38 +8845,26 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac @@ -9034,7 +8874,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9060,7 +8900,7 @@ $as_echo X"$ac_file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -9069,7 +8909,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9090,17 +8930,17 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -9145,13 +8985,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { +case `sed -n '/datarootdir/ { p q } @@ -9160,14 +8999,13 @@ ac_sed_dataroot=' /@infodir@/p /@localedir@/p /@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -9181,16 +9019,15 @@ _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t +s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -9201,60 +9038,121 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac ;; :H) # # CONFIG_HEADER # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + rm -f $ac_file + mv "$tmp/config.h" $ac_file fi else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + echo "/* $configure_input */" + cat "$ac_result" fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_arg=$ac_file _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in @@ -9269,7 +9167,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | +echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9289,8 +9187,8 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -9312,7 +9210,7 @@ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | +echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9356,7 +9254,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | +echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9382,7 +9280,7 @@ $as_echo X"$file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -9391,7 +9289,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9412,8 +9310,8 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" @@ -9431,11 +9329,6 @@ _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -9463,8 +9356,7 @@ fi # if test "$no_recursion" != yes; then - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. + # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" @@ -9493,11 +9385,9 @@ if test "$no_recursion" != yes; then ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; - --disable-option-checking) - ;; *) case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; esac @@ -9507,7 +9397,7 @@ if test "$no_recursion" != yes; then # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" @@ -9516,10 +9406,6 @@ if test "$no_recursion" != yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" - ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue @@ -9528,8 +9414,8 @@ if test "$no_recursion" != yes; then test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:$LINENO: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 + echo "$as_me:$LINENO: $ac_msg" >&5 + echo "$ac_msg" >&6 { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; @@ -9538,7 +9424,7 @@ if test "$no_recursion" != yes; then as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -9547,7 +9433,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9568,17 +9454,17 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -9617,8 +9503,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else - { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 +echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi @@ -9631,36 +9517,32 @@ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac - { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 -$as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 +echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd "$ac_popdir" done fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi if test "${prefix}" = "/usr/local"; then - { $as_echo "$as_me:$LINENO: " >&5 -$as_echo "$as_me: " >&6;} - { $as_echo "$as_me:$LINENO: For a private or temporary build of systemtap, we recommend" >&5 -$as_echo "$as_me: For a private or temporary build of systemtap, we recommend" >&6;} - { $as_echo "$as_me:$LINENO: configuring with a prefix. For example, try" >&5 -$as_echo "$as_me: configuring with a prefix. For example, try" >&6;} - { $as_echo "$as_me:$LINENO: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&5 -$as_echo "$as_me: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&6;} - { $as_echo "$as_me:$LINENO: Running systemtap uninstalled, entirely out of the build tree," >&5 -$as_echo "$as_me: Running systemtap uninstalled, entirely out of the build tree," >&6;} - { $as_echo "$as_me:$LINENO: is not supported." >&5 -$as_echo "$as_me: is not supported." >&6;} + { echo "$as_me:$LINENO: " >&5 +echo "$as_me: " >&6;} + { echo "$as_me:$LINENO: For a private or temporary build of systemtap, we recommend" >&5 +echo "$as_me: For a private or temporary build of systemtap, we recommend" >&6;} + { echo "$as_me:$LINENO: configuring with a prefix. For example, try" >&5 +echo "$as_me: configuring with a prefix. For example, try" >&6;} + { echo "$as_me:$LINENO: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&5 +echo "$as_me: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&6;} + { echo "$as_me:$LINENO: Running systemtap uninstalled, entirely out of the build tree," >&5 +echo "$as_me: Running systemtap uninstalled, entirely out of the build tree," >&6;} + { echo "$as_me:$LINENO: is not supported." >&5 +echo "$as_me: is not supported." >&6;} fi diff --git a/configure.ac b/configure.ac index 3e0efc95..f74d8d99 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl configure.ac --- autoconf input file for systemtap dnl Process this file with autoconf to produce a configure script. -AC_INIT([systemtap], 0.8, systemtap@sources.redhat.com, systemtap) +AC_INIT([systemtap], 0.9, systemtap@sources.redhat.com, systemtap) dnl ^^^^^ see also NEWS, systemtap.spec, testsuite/configure.ac AC_PREREQ(2.59) @@ -9,6 +9,7 @@ AM_INIT_AUTOMAKE AM_MAINTAINER_MODE AM_PROG_MKDIR_P +AC_SUBST(MKDIR_P) AC_PROG_LN_S AC_PROG_CC AC_PROG_CXX @@ -220,9 +221,28 @@ AC_ARG_ENABLE([server], [enable building of stap-server/client (default on if nss etc. found).]), [enable_server=$enableval], [enable_server="check"]) -PKG_CHECK_MODULES([nss],[nss >= 3], have_nss=yes, have_nss=no) -PKG_CHECK_MODULES([nspr],[nspr >= 4], have_nspr=yes, have_nspr=no) -if test "x${have_nss}${have_nspr}" != "xyesyes"; then +dnl Find the location of nss and nspr headers +AC_CHECK_FILE([/usr/include/nss3], nssdir=nss3, [ + AC_CHECK_FILE([/usr/include/nss], nssdir=nss) +]) +AC_CHECK_FILE([/usr/include/nspr4], nsprdir=nspr4, [ + AC_CHECK_FILE([/usr/include/nspr], nsprdir=nspr) +]) +if test "x$nssdir" != "x" -a "x$nsprdir" != "x"; then +nss_CFLAGS="-I/usr/include/$nssdir" +nspr_CFLAGS="-I/usr/include/$nsprdir" +AC_SUBST(nss_CFLAGS) +AC_SUBST(nspr_CFLAGS) +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS" +AC_CHECK_HEADERS(["$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h"], have_nss_includes=yes, have_nss_includes=no) +CPPFLAGS="$save_CPPFLAGS" +have_nss_libs=no +AC_CHECK_LIB(nspr4, PR_Connect, [ + AC_CHECK_LIB(ssl3, SSL_ReHandshake, have_nss_libs=yes) +]) +fi +if test "x${have_nss_includes}${have_nss_libs}" != "xyesyes"; then if test "$enable_server" == "yes"; then AC_MSG_ERROR([cannot find all libraries for stap-server]) fi @@ -230,7 +250,7 @@ if test "x${have_nss}${have_nspr}" != "xyesyes"; then AC_MSG_WARN([will not build stap-server, cannot find all libraries]) fi fi -AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss}${have_nspr}" == "xyesyes" -a "$enable_server" != "no"]) +AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss_includes}${have_nss_libs}" == "xyesyes" -a "$enable_server" != "no"]) dnl Handle elfutils. If '--with-elfutils=DIR' wasn't specified, used dnl the system's elfutils. @@ -312,11 +332,14 @@ if test $build_elfutils = yes; then --prefix="$prefix" \ CFLAGS="${CFLAGS/-Wall/}" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && - make -k install-data # so that elfutils/version.h - if any - may be found. - # Note, we need -k because parts (like to po files) might fail, - # since those fo to $prefix to which we might not be able to write. - # We are only really interested in the include-elfutils files anyway here. + if test -f ${elfutils_srcdir}/config/version.h.in; then + echo Trying to install elfutils version header... + make install-pkgincludeHEADERS + fi + # so that elfutils/version.h - available from 0.138 - may be found. + # Don't use install-data because that will fail (installing in $prefix). ) + if test $? != 0; then exit; fi save_CPPFLAGS=${CPPFLAGS} CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils AC_CHECK_HEADERS([elfutils/version.h]) @@ -332,7 +355,7 @@ dnl Don't use this directly (when not given it is set to NONE). AC_DEFINE_UNQUOTED(STAP_PREFIX, "$prefix", [configure prefix location]) AC_CONFIG_HEADERS([config.h:config.in]) -AC_CONFIG_FILES(Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5) +AC_CONFIG_FILES(Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5 initscript/systemtap) AC_CONFIG_SUBDIRS(testsuite) AC_CONFIG_FILES([run-stap], [chmod +x run-stap]) AC_OUTPUT diff --git a/coveragedb.cxx b/coveragedb.cxx index aafcd545..452041fc 100644 --- a/coveragedb.cxx +++ b/coveragedb.cxx @@ -369,3 +369,5 @@ void update_coverage_db(systemtap_session &s) } #endif /* HAVE_LIBSQLITE3 */ + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/coveragedb.h b/coveragedb.h index df5782ca..3675e3b4 100644 --- a/coveragedb.h +++ b/coveragedb.h @@ -77,3 +77,4 @@ void update_coverage_db(systemtap_session &s); #endif +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2006-10-15.18 +scriptversion=2007-03-29.01 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -215,34 +215,39 @@ aix) # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile diff --git a/doc/ChangeLog b/doc/ChangeLog deleted file mode 100644 index b3fd1d78..00000000 --- a/doc/ChangeLog +++ /dev/null @@ -1,127 +0,0 @@ -2009-01-21 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Use context-symbols.stp and context-unwind.stp. - -2009-01-21 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Update copyright date and correct paragraph. - -2009-01-12 William Cohen <wcohen@redhat.com> - - * S_T_R/tapsets.tmpl: Correct author's name. - -2009-01-07 William Cohen <wcohen@redhat.com> - - * S_T_R/Makefile.am: Use BUILD_REFDOCS. - * S_T_R/Makefile.in: Regenerated. - -2009-01-06 Frank Ch. Eigler <fche@elastic.org> - - * S_T_R/Makefile.am: Regenerate docs only as necessary, via - stamp-* files for html/man, and cmp for tapsets.xml. - * S_T_R/Makefile.in: Regenerated. - -2008-12-30 Dave Brolley <brolley@redhat.com> - - PR9692 - * Makefile.in: Regenerated. - * SystemTap_Tapset_Reference/Makefile.in: Regenerated. - -2008-12-24 Dave Brolley <brolley@redhat.com> - - * Makefile.in: Regenerated. - * SystemTap_Tapset_Reference/Makefile.in: Regenerated. - -2008-12-21 Will Cohen <wcohen@redhat.com> - - * Makefile.am: Add generations of tapset reference manual material. - * SystemTap_Tapset_Reference/Makefile.am: Install tapset reference man. - * Makfile.am, SystemTap_Tapset_Reference/Makefile.in: Regenerated. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add scsi. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.am: Correct location for html/man. - * SystemTap_Tapset_Reference/tapsets.in: Regenerate. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add process. - -2008-11-25 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add ioscheduler, socket, tcp, - and upd. - -2008-11-24 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference/tapsets.tmpl: Add context, timestamp, - memory, and networking tapsets. - -2008-11-24 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference: Add kernel-doc based version. - -2008-11-24 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference: Remove. - -2008-10-23 Will Cohen <wcohen@redhat.com> - - * SystemTap_Tapset_Reference: New. - -2008-08-28 Stan Cox <scox@redhat.com> - - * langref.tex: Document written but unread global variable display. - -2008-08-25 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am: Removed dist-related targets and macros. - * Makefile.in: Regenerated. - -2008-07-14 Dave Brolley <brolley@redhat.com> - - * Makefile.in: Regenerated. - -2008-07-07 Mark Wielaard <mwielaard@redhat.com> - - * Makefile.am (install-data-hook): New, install pdf files. - (uninstall-local): New, uninstall them again. - * Makefile.in: Regenerated. - -2008-04-24 Will Cohen <wcohen@redhat.com> - - * Makefile.in: Regenerated. - -2008-04-09 David Smith <dsmith@redhat.com> - - * .gitignore: New file. - -2008-03-25 Frank Ch. Eigler <fche@elastic.org> - - * langref.tex: Clarify utility of epilogue-type probe aliases. - -2008-03-04 David Smith <dsmith@redhat.com> - - * tutorial.tex: Made minor changes to remove warnings. - -2008-03-03 Frank Ch. Eigler <fche@elastic.org> - - From Masami Hiramatsu <mhiramat@redhat.com> - * Makefile.am (EXTRA_DIST): Add nomencl.sty. - * Makefile.in: Hand-regenerated. - -2008-02-27 Frank Ch. Eigler <fche@elastic.org> - - * nomencl.sty: Bundle F8 version of package, for use on older distros. - -2008-02-27 Frank Ch. Eigler <fche@redhat.com> - - * langref.tex, tutorial.tex: Copied over & aggregated - from former comfy digs under /cvs/doc. - * tutorial/*: Samples scripts from tutorial. - * Makefile.am: New build instructions. - * Makefile.in: New generated file. diff --git a/doc/Makefile.in b/doc/Makefile.in index 776381d8..e23a6699 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -32,7 +32,7 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -101,8 +101,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIECFLAGS = @PIECFLAGS@ +PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ -PKG_CONFIG = @PKG_CONFIG@ PROCFLAGS = @PROCFLAGS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ @@ -147,9 +148,7 @@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ nspr_CFLAGS = @nspr_CFLAGS@ -nspr_LIBS = @nspr_LIBS@ nss_CFLAGS = @nss_CFLAGS@ -nss_LIBS = @nss_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -164,6 +163,7 @@ 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 @@ -279,8 +279,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -305,8 +305,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -316,13 +316,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/doc/SystemTap_Beginners_Guide/Makefile b/doc/SystemTap_Beginners_Guide/Makefile index 7cbd8b2e..32dc0d50 100644 --- a/doc/SystemTap_Beginners_Guide/Makefile +++ b/doc/SystemTap_Beginners_Guide/Makefile @@ -2,7 +2,8 @@ XML_LANG = en-US -BRAND = RedHat +BRAND = RedHat +# please define the BRAND in the pre:: section below #SHOW_REMARKS = 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 @@ -12,3 +13,10 @@ CONDITION=$(BRAND) COMMON_CONFIG = /usr/share/publican include $(COMMON_CONFIG)/make/Makefile.common +pre:: + cp -a ../../testsuite en-US/extras/; + +post:: + rm -rf en-US/extras/testsuite + sed -i -e 's/<productname>Fedora/<productname>Red Hat Enterprise Linux/g' en-US/Book_Info.xml; + sed -i -e 's/<productnumber>10/<productnumber>5/g' en-US/Book_Info.xml; diff --git a/doc/SystemTap_Beginners_Guide/en-US/Author_Group.xml b/doc/SystemTap_Beginners_Guide/en-US/Author_Group.xml index 676af712..0c55a7ee 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Author_Group.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Author_Group.xml @@ -3,7 +3,7 @@ ]> <authorgroup> - <corpauthor>Red Hat Enterprise Linux Documentation</corpauthor> + <corpauthor>Red Hat, Inc.</corpauthor> <author> <firstname>Don</firstname> <surname>Domingo </surname> @@ -13,4 +13,14 @@ </affiliation> <email>ddomingo@redhat.com</email> </author> + + <author> + <firstname>William</firstname> + <surname>Cohen</surname> + <affiliation> + <orgname>Engineering Services and Operations</orgname> + <orgdiv>Performance Tools</orgdiv> + </affiliation> + <email>wcohen@redhat.com</email> + </author> </authorgroup> diff --git a/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml b/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml index 1599dc53..07c3f74d 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml @@ -7,10 +7,14 @@ <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> <edition>2.0</edition> + <productname>Red Hat Enterprise Linux</productname> <productnumber>5</productnumber> + <pubsnumber>2</pubsnumber> - <abstract><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="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> <corpauthor> <inlinemediaobject> <imageobject> @@ -23,7 +27,7 @@ <year>&YEAR;</year> <holder>&HOLDER;</holder> </copyright> - <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <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/SystemTap_Beginners_Guide/en-US/Installation.xml b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml index 1ff2ff29..d0ce1f26 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml @@ -70,7 +70,7 @@ <listitem><para><filename>systemtap-runtime</filename></para></listitem> </itemizedlist> - <para>Assuming that your system is configured to use Red Hat Network (RHN) or <command>yum</command> is available, these two rpms can be installed with <command>yum install systemtap systemtap-runtime</command>. Note that before you can use SystemTap, you will still need to install the required kernel information RPMs. + <para>Assuming that <command>yum</command> is installed in the system, these two rpms can be installed with <command>yum install systemtap systemtap-runtime</command>. Note that before you can use SystemTap, you will still need to install the required kernel information RPMs. </para> </section> @@ -99,9 +99,12 @@ <indexterm> <primary>kernel information packages</primary> </indexterm> - <para> SystemTap needs information about the kernel in order to place instrumentation in it (i.e. probe it). This information also allows SystemTap to generate the code for the instrumentation. This information is contained in the matching <filename>-devel</filename> and <filename>-debuginfo</filename> packages for your kernel. The necessary <filename>-devel</filename> and - <filename>-debuginfo</filename> packages for the ordinary "vanilla" kernel - are as follows: + <para> + SystemTap needs information about the kernel in order to place instrumentation in it (i.e. probe it). This + information also allows SystemTap to generate the code for the instrumentation. This information is contained + in the matching <filename>-devel</filename>, <filename>-debuginfo</filename>, and <filename>-debuginfo-common</filename> + packages for your kernel. The necessary <filename>-devel</filename> and <filename>-debuginfo</filename> packages for the ordinary + "vanilla" kernel are as follows: </para> <itemizedlist> @@ -137,7 +140,9 @@ uname -r </screen> - <para>For example, if you wish to use SystemTap on kernel version <filename>2.6.18-53.el5</filename> on an i686 machine, then you would need to download and install the following RPMs: + <para> + For example, if you wish to use SystemTap on kernel version <filename>2.6.18-53.el5</filename> on an i686 machine, then you would + need to download and install the following RPMs: </para> <itemizedlist> @@ -146,78 +151,75 @@ uname -r <listitem><para><filename>kernel-devel-2.6.18-53.1.13.el5.i686.rpm</filename></para></listitem> </itemizedlist> - <important> + <important> <title>Important</title> <para> - The version, variant, and architecture of the <filename>-devel</filename>, <filename>-debuginfo</filename> and <filename>-debuginfo-common</filename> packages must match the kernel you wish to probe with SystemTap <emphasis>exactly</emphasis>. + The version, variant, and architecture of the <filename>-devel</filename>, <filename>-debuginfo</filename> and + <filename>-debuginfo-common</filename> packages must match the kernel you wish to probe with SystemTap <emphasis>exactly</emphasis>. </para> </important> + + + <para> + The easiest way to install the required kernel information packages is through <command>yum install</command> + and <command>debuginfo-install</command>. <command>debuginfo-install</command> is included with later versions of the + <filename>yum-utils</filename> package (for example, version 1.1.10), and also requires an appropriate <command>yum</command> + repository from which to download and install <command>-debuginfo</command>/<filename>-debuginfo-common</filename> packages. + </para> + + <para condition="fedora"> + Most of the required kernel packages can be found at + <ulink url="http://download.fedoraproject.org/pub/fedora/linux/releases/"/>. Configure + <command>yum</command> accordingly by adding a new "debug" <command>yum</command> repository file + under <filename>/etc/yum.repos.d</filename> containing the following lines: + </para> + +<programlisting condition="fedora"> +[fedora-debuginfo] +name=Fedora $releasever - $basearch - Debug +failovermethod=priority +baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/ +enabled=1 +</programlisting> + + + <para condition="RedHat"> + Most required kernel packages can be found at + <ulink url="ftp://ftp.redhat.com/pub/redhat/linux/enterprise/"/>; navigate there until you find the + appropriate <filename>Debuginfo</filename> directory for your system. Configure + <command>yum</command> accordingly by adding a new "debug" <command>yum</command> repository file under + <filename>/etc/yum.repos.d</filename> containing the following lines: + </para> +<programlisting condition="RedHat"> +[rhel-debuginfo] +name=Red Hat Enterprise Linux $releasever - $basearch - Debug +baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/ +enabled=1 +</programlisting> <para> - To help ease your deployment of SystemTap, you can use <xref linkend="stapprep"/>. - <xref linkend="stapprep"/> determines the kernel information packages you need to install in order - to run SystemTap. If you run <xref linkend="stapprep"/> (as an ordinary, non-root user) without - any arguments, it will display the kernel information packages required for the - <emphasis>loaded</emphasis> kernel. You can also pass a specific kernel version to - <xref linkend="stapprep"/> (e.g. <computeroutput>2.6.18-92.el5</computeroutput>) if you wish - to probe a kernel that is not currently loaded. + After configuring <command>yum</command> with the appropriate repository, you can now install + the required <filename>-devel</filename>, <filename>-debuginfo</filename>, and <filename>-debuginfo-common</filename> + packages for your kernel. To install the corresponding packages for a specific kernel, run the following commands: </para> -<indexterm> - <primary>Installation</primary> - <secondary>stapprep.sh</secondary> -</indexterm> - -<indexterm> - <primary>stapprep.sh</primary> -</indexterm> - - -<!-- next 2 indexterms for installation script --> -<indexterm> - <primary>Installation</primary> - <secondary>installation script</secondary> -</indexterm> +<itemizedlist> +<listitem><para><command>yum install <replaceable>kernelname</replaceable>-devel-<replaceable>version</replaceable></command></para></listitem> +<listitem><para><command>debuginfo-install <replaceable>kernelname</replaceable>-<replaceable>version</replaceable></command></para></listitem> +</itemizedlist> -<indexterm> - <primary>installation script</primary> -</indexterm> -<note> - <title>Note</title> - <para>Running <xref linkend="stapprep"/> as root will display the required kernel packages <emphasis>and</emphasis> install them as well, provided that <command>yum</command> and <command>yum-utils</command> are configured properly.</para> -</note> - -<!-- Running <xref linkend="stapprep"/> without any arguments will display and install the required kernel information packages for the currently loaded kernel. If you wish to probe a kernel other than the one currently loaded, you can pass a specific kernel version as an argument to <xref linkend="stapprep"/>; the script will then install that kernel's corresponding kernel information packages. -</para> --> - -<!-- -<para> - To determine what kernel information RPMs you need to install in order to run SystemTap, run the <xref linkend="stapprep"/>. Running <xref linkend="stapprep"/> without any arguments will display what packages you - - - - <para> The script <xref linkend="stapprep"/> can be used by normal users to determine what supporting kernel RPMs need to be installed on the machine to use SystemTap with a particular kernel. The script run without any arguments detemines the RPMs needed for the currently running kernel. The script can also accept one argument, the output <command>uname -r</command>, to determine the related RPMs required for a kernel that may not be currently running on the machine. - </para>--> -<indexterm> -<primary>script for installing kernel information packages</primary> -</indexterm> -<formalpara id="stapprep"> -<title>stapprep.sh</title> <para> -<programlisting> -<xi:include parse="text" href="extras/stapprep.sh" xmlns:xi="http://www.w3.org/2001/XInclude" /> -</programlisting> + Replace <command><replaceable>kernelname</replaceable></command> with the appropriate kernel variant name + (for example, <filename>kernel-PAE</filename>), and <command><replaceable>version</replaceable></command> + with the target kernel's version. For example, to install the required kernel information packages for + the <command>kernel-PAE--2.6.18-53.1.13.el5</command> kernel, run: </para> -</formalpara> -<!-- - <para> - If the <filename>yum-utils</filename> package is installed and the <command>yum</command> repositories are set up properly, you can run the <xref linkend="stapprep"/> script as root. <xref linkend="stapprep"/> will automatically download and install the required packages via <command>yum</command> and <command>rpm</command> commands (assuming that the kernel you wish to probe is currently loaded). - </para>--> -<!-- The script assumes the Red Hat Enterprise Linux debuginfo repository, -<filename>rhel-debuginfo</filename>, but this could be changed. One could -search the /etc/yum.repo.d/ directory for debuginfo repositories --> +<itemizedlist> + <listitem><para><command>yum install kernel-PAE-devel-2.6.18-53.1.13.el5</command></para></listitem> + <listitem><para><command>debuginfo-install kernel-PAE-2.6.18-53.1.13.el5</command></para></listitem> +</itemizedlist> <para> If you do not have <command>yum</command> and <command>yum-utils</command> installed (and you are unable to install them), you will have to manually download and install the required kernel information packages. To generate the URL from which to download the required packages, use the following script: @@ -266,6 +268,7 @@ Once you have manually downloaded the required packages to the machine, install </section> + <section id="testing"> <title>Initial Testing</title> <indexterm> diff --git a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml index 005bfba0..afb9e738 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml @@ -101,7 +101,9 @@ <primary>capabilities of SystemTap</primary> <secondary>Introduction</secondary> </indexterm> - <para>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="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>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_Beginners_Guide/en-US/Legal_Notice.xml b/doc/SystemTap_Beginners_Guide/en-US/Legal_Notice.xml new file mode 100644 index 00000000..1fcb7b99 --- /dev/null +++ b/doc/SystemTap_Beginners_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/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml new file mode 100644 index 00000000..d8fe4b39 --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-syscallsbyprocpid.xml @@ -0,0 +1,132 @@ +<?xml version='1.0'?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + + +<section id="syscallsbyprocpidsect"> +<title>Tracking System Call Volume Per Process</title> +<indexterm> +<primary>script examples</primary> +<secondary>monitoring system calls (volume per process)</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>monitoring system calls (volume per process)</secondary> +</indexterm> + +<indexterm> +<primary>monitoring system calls (volume per process)</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<!-- +<indexterm> +<primary>counting function calls</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +--> + +<indexterm> +<primary>system calls volume (per process), monitoring</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<remark> +uses systemtap/testsuite/systemtap.examples/process/syscalls_by_p*.stp +</remark> + + <para> + This section illustrates how to determine which processes + are performing the highest volume of system calls. In + previous sections, we've described how to monitor the top system + calls used by the system over time (<xref linkend="topsyssect"/>). + We've also described how to identify which applications use a + specific set of "polling suspect" system calls the most + (<xref linkend="timeoutssect"/>). Monitoring the volume of + system calls made by each process provides more data in + investigating your system for polling processes and other resource + hogs. + </para> + +<formalpara id="syscallsbyprocpid"> + <title>syscalls_by_proc.stp</title> +<para> +<programlisting> +<xi:include parse="text" href="extras/testsuite/systemtap.examples/process/syscalls_by_proc.stp" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</programlisting> +</para> +</formalpara> + +<para> + <xref linkend="syscallsbyprocpid"/> lists the top 20 processes performing the + highest number of system calls. It also lists how many system calls each process + performed during the time period. Refer to + <xref linkend="syscallsbyprocpidoutput"/> for a sample output. + +</para> + +<example id="syscallsbyprocpidoutput"> + <title><xref linkend="topsys"/> Sample Output</title> +<screen> +Collecting data... Type Ctrl-C to exit and display results
+#SysCalls Process Name
+1577 multiload-apple
+692 synergyc
+408 pcscd
+376 mixer_applet2
+299 gnome-terminal
+293 Xorg
+206 scim-panel-gtk
+95 gnome-power-man
+90 artsd
+85 dhcdbd
+84 scim-bridge
+78 gnome-screensav
+66 scim-launcher
+[...] +</screen> +</example> + +<para> + If you prefer the output to display the process IDs instead of the process names, + use the following script instead. +</para> + +<formalpara id="syscallsbypid"> + <title>syscalls_by_pid.stp</title> +<para> +<programlisting> +<xi:include parse="text" href="extras/testsuite/systemtap.examples/process/syscalls_by_pid.stp" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</programlisting> +</para> +</formalpara> + + +<para> + As indicated in the output, you need to manually exit the script in order to display the + results. You can add a timed expiration to either script by simply adding + a <command>timer.s()</command> probe; for example, to instruct the script to expire after + 5 seconds, add the following probe to the script: +</para> + +<screen> +probe timer.s(5) +{ + exit() +} +</screen> + +<!--probe kernel.function(@1) { # probe function passed as argument from stdin +called[probefunc()] <<< 1 # add a count efficiently +} +global called +probe end,timer.ms(30000) { +foreach (fn+ in called) # Sort by function name +# (fn in called-) # Sort by call count (in decreasing order) +printf("%s %d\n", fn, @count(called[fn])) +exit() +}--> + + </section> + diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-timeout.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-timeout.xml new file mode 100644 index 00000000..719f5c6d --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-timeout.xml @@ -0,0 +1,136 @@ +<?xml version='1.0'?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + + +<section id="timeoutssect"> +<title>Monitoring Polling Applications</title> +<indexterm> +<primary>script examples</primary> +<secondary>monitoring polling applications</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>monitoring polling applications</secondary> +</indexterm> + +<indexterm> +<primary>monitoring polling applications</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<!-- +<indexterm> +<primary>counting function calls</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +--> + +<indexterm> +<primary>polling applications, monitoring</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<remark> +uses systemtap/testsuite/systemtap.examples/profiling/timeout.stp +</remark> + + + <para> + This section how to identify and monitor which applications are polling. Doing so allows you to track + unnecessary or excessive polling, which can help you pinpoint areas for improvement in terms of CPU usage + and power savings. + </para> + +<formalpara id="timeouts"> + <title>timeout.stp</title> +<para> +<programlisting> +<xi:include parse="text" href="extras/testsuite/systemtap.examples/profiling/timeout.stp" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</programlisting> +</para> +</formalpara> + + <para> + <xref linkend="timeouts"/> tracks how many times each application used the following system calls over time: + </para> + + <itemizedlist> + <listitem><para><command>poll</command></para></listitem> + <listitem><para><command>select</command></para></listitem> + <listitem><para><command>epoll</command></para></listitem> + <listitem><para><command>itimer</command></para></listitem> + <listitem><para><command>futex</command></para></listitem> + <listitem><para><command>nanosleep</command></para></listitem> + <listitem><para><command>signal</command></para></listitem> + </itemizedlist> + + <para> + In some applications, these system calls are used excessively. As such, they are normally identified as "likely + culprits" for polling applications. Note, however, that an application may be using a different system + call to poll excessively; sometimes, it is useful to find out the top system calls used by the system (refer to + <xref linkend="topsyssect"/> for instructions). Doing so can help you identify any additional suspects, which you + can add to <xref linkend="timeouts"/> for tracking. + </para> + + +<indexterm> +<primary>script examples</primary> +<secondary>timer.s(), sample usage</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>timer.s(), sample usage</secondary> +</indexterm> + +<indexterm> +<primary>timer.s(), sample usage</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<example id="timeoutsoutput"> + <title><xref linkend="timeouts"/> Sample Output</title> +<screen> + uid | poll select epoll itimer futex nanosle signal| process
+28937 | 148793 0 0 4727 37288 0 0| firefox
+22945 | 0 56949 0 1 0 0 0| scim-bridge
+ 0 | 0 0 0 36414 0 0 0| swapper
+ 4275 | 23140 0 0 1 0 0 0| mixer_applet2
+ 4191 | 0 14405 0 0 0 0 0| scim-launcher
+22941 | 7908 1 0 62 0 0 0| gnome-terminal
+ 4261 | 0 0 0 2 0 7622 0| escd
+ 3695 | 0 0 0 0 0 7622 0| gdm-binary
+ 3483 | 0 7206 0 0 0 0 0| dhcdbd
+ 4189 | 6916 0 0 2 0 0 0| scim-panel-gtk
+ 1863 | 5767 0 0 0 0 0 0| iscsid
+ 2562 | 0 2881 0 1 0 1438 0| pcscd
+ 4257 | 4255 0 0 1 0 0 0| gnome-power-man
+ 4278 | 3876 0 0 60 0 0 0| multiload-apple
+ 4083 | 0 1331 0 1728 0 0 0| Xorg
+ 3921 | 1603 0 0 0 0 0 0| gam_server
+ 4248 | 1591 0 0 0 0 0 0| nm-applet
+ 3165 | 0 1441 0 0 0 0 0| xterm
+29548 | 0 1440 0 0 0 0 0| httpd
+ 1862 | 0 0 0 0 0 1438 0| iscsid
+</screen> +</example> +<!--probe kernel.function(@1) { # probe function passed as argument from stdin +called[probefunc()] <<< 1 # add a count efficiently +} +global called +probe end,timer.ms(30000) { +foreach (fn+ in called) # Sort by function name +# (fn in called-) # Sort by call count (in decreasing order) +printf("%s %d\n", fn, @count(called[fn])) +exit() +}--> +<para> + You can increase the sample time by editing the timer in the second probe (<command>timer.s()</command>). + The output of <xref linkend="countcalls"/> contains the name and UID of the top 20 polling applications, + along with how many times each application performed each polling system call (over time). + <xref linkend="timeoutsoutput"/> contains an excerpt of the script: +</para> + </section> + diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-topsys.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-topsys.xml new file mode 100644 index 00000000..700ef4ed --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-topsys.xml @@ -0,0 +1,131 @@ +<?xml version='1.0'?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + + +<section id="topsyssect"> +<title>Tracking Most Frequently Used System Calls</title> +<indexterm> +<primary>script examples</primary> +<secondary>monitoring system calls</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>monitoring system calls</secondary> +</indexterm> + +<indexterm> +<primary>monitoring system calls</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<!-- +<indexterm> +<primary>counting function calls</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +--> + +<indexterm> +<primary>system calls, monitoring</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<remark> +uses systemtap/testsuite/systemtap.examples/profiling/topsys.stp +</remark> + + + <para> + <xref linkend="timeouts"/> from <xref linkend="timeoutssect"/> helps you identify which applications + are polling by pointing out which ones used the following system calls most frequently: + </para> + + <itemizedlist> + <listitem><para><command>poll</command></para></listitem> + <listitem><para><command>select</command></para></listitem> + <listitem><para><command>epoll</command></para></listitem> + <listitem><para><command>itimer</command></para></listitem> + <listitem><para><command>futex</command></para></listitem> + <listitem><para><command>nanosleep</command></para></listitem> + <listitem><para><command>signal</command></para></listitem> + </itemizedlist> + + <para> + However, in some systems, a different system call might be responsible for excessive polling. If you suspect + that a polling application might is using a different system call to poll, you need to identify first the top + system calls used by the system. To do this, use <xref linkend="topsys"/>. + </para> + +<formalpara id="topsys"> + <title>topsys.stp</title> +<para> +<programlisting> +<xi:include parse="text" href="extras/testsuite/systemtap.examples/profiling/topsys.stp" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</programlisting> +</para> +</formalpara> + +<para> + <xref linkend="topsys"/> lists the top 20 system calls used by the system per 5-second interval. It also lists + how many times each system call was used during that period. Refer to <xref linkend="topsysoutput"/> for a sample output. +</para> + +<indexterm> +<primary>script examples</primary> +<secondary>timer.s(), sample usage</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>timer.s(), sample usage</secondary> +</indexterm> + +<indexterm> +<primary>timer.s(), sample usage</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + + +<example id="topsysoutput"> + <title><xref linkend="topsys"/> Sample Output</title> +<screen> +--------------------------------------------------------------
+ SYSCALL COUNT
+ gettimeofday 1857
+ read 1821
+ ioctl 1568
+ poll 1033
+ close 638
+ open 503
+ select 455
+ write 391
+ writev 335
+ futex 303
+ recvmsg 251
+ socket 137
+ clock_gettime 124
+ rt_sigprocmask 121
+ sendto 120
+ setitimer 106
+ stat 90
+ time 81
+ sigreturn 72
+ fstat 66
+--------------------------------------------------------------
+</screen> +</example> +<!--probe kernel.function(@1) { # probe function passed as argument from stdin +called[probefunc()] <<< 1 # add a count efficiently +} +global called +probe end,timer.ms(30000) { +foreach (fn+ in called) # Sort by function name +# (fn in called-) # Sort by call count (in decreasing order) +printf("%s %d\n", fn, @count(called[fn])) +exit() +}--> + + </section> + diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml index 8b7fc741..b18062f3 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml @@ -62,6 +62,9 @@ <xi:include href="Useful_Scripts-functioncalls.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> <xi:include href="Useful_Scripts-paracallgraph.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> <xi:include href="Useful_Scripts-threadtimes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="Useful_Scripts-timeout.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="Useful_Scripts-topsys.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="Useful_Scripts-syscallsbyprocpid.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> </section> <!-- removed; handler function no longer working as expected <xi:include href="Useful_Scripts-kernelprofiling.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> --> diff --git a/doc/SystemTap_Beginners_Guide/syncandbuild.sh b/doc/SystemTap_Beginners_Guide/syncandbuild.sh index 75e8bd0d..e6a6c1f4 100755 --- a/doc/SystemTap_Beginners_Guide/syncandbuild.sh +++ b/doc/SystemTap_Beginners_Guide/syncandbuild.sh @@ -1,14 +1,25 @@ #!/bin/bash # Instead of running the original makefile to build the document, run this script instead -echo -n "Please specify your build target (e.g. html-en-US, pdf-en-US, etc) " +echo -n "Please specify your build target (e.g. html, pdf, or html-single) " read TARG -echo -n "Thank you. Now specify any build parameters you'd like to use (skip this step for none). " +echo -n "Please specify the product you are building for (enter 1 for Fedora, 2 for RHEL) " +read PROD +echo -n "Please specify any build parameters you'd like to use (skip this step for none). " read PARM -cp -a ../../testsuite en-US/extras/. +if [ $PROD = 1 ]; +then + sed -i -e 's/<productname>Red Hat Enterprise Linux/<productname>Fedora/g' en-US/Book_Info.xml; + sed -i -e 's/<productnumber>5/<productnumber>10/g' en-US/Book_Info.xml; + sed -i -e 's/BRAND = RedHat/BRAND = fedora/g' Makefile; + make $PARM $TARG-en-US post -make $PARM $TARG +else +sed -i -e 's/BRAND = fedora/BRAND = RedHat/g' Makefile; +make post $PARM $TARG-en-US +fi +echo "done." echo "Cleaning sync'd files..." -rm -rf en-US/extras/testsuite -echo "...done." +make post +echo "...done."
\ No newline at end of file diff --git a/doc/SystemTap_Tapset_Reference/.gitignore b/doc/SystemTap_Tapset_Reference/.gitignore new file mode 100644 index 00000000..af43f913 --- /dev/null +++ b/doc/SystemTap_Tapset_Reference/.gitignore @@ -0,0 +1 @@ +/docproc diff --git a/doc/SystemTap_Tapset_Reference/Makefile.in b/doc/SystemTap_Tapset_Reference/Makefile.in index f840d8c5..84d2114c 100644 --- a/doc/SystemTap_Tapset_Reference/Makefile.in +++ b/doc/SystemTap_Tapset_Reference/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -46,7 +46,7 @@ PROGRAMS = $(noinst_PROGRAMS) docproc_SOURCES = docproc.c docproc_OBJECTS = docproc.$(OBJEXT) docproc_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -104,8 +104,9 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIECFLAGS = @PIECFLAGS@ +PIECXXFLAGS = @PIECXXFLAGS@ PIELDFLAGS = @PIELDFLAGS@ -PKG_CONFIG = @PKG_CONFIG@ PROCFLAGS = @PROCFLAGS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ @@ -150,9 +151,7 @@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ nspr_CFLAGS = @nspr_CFLAGS@ -nspr_LIBS = @nspr_LIBS@ nss_CFLAGS = @nss_CFLAGS@ -nss_LIBS = @nss_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -241,8 +240,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -254,8 +253,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -265,13 +264,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/doc/SystemTap_Tapset_Reference/tapsets.tmpl b/doc/SystemTap_Tapset_Reference/tapsets.tmpl index f1750d45..d6b3b309 100644 --- a/doc/SystemTap_Tapset_Reference/tapsets.tmpl +++ b/doc/SystemTap_Tapset_Reference/tapsets.tmpl @@ -10,6 +10,7 @@ <author> <firstname>William</firstname> <surname>Cohen</surname> + <contrib></contrib> <affiliation> <address> <email>wcohen@redhat.com</email> @@ -204,5 +205,13 @@ </para> !Itapset/process.stp </chapter> + <chapter id="signal.stp"> + <title>Signal Tapset</title> + <para> + This family of probe points is used to probe signal activities. + It contains the following probe points: + </para> +!Itapset/signal.stp + </chapter> </book> diff --git a/doc/Tapset_Reference_Guide/en-US/Author_Group.xml b/doc/Tapset_Reference_Guide/en-US/Author_Group.xml new file mode 100644 index 00000000..67ea97dc --- /dev/null +++ b/doc/Tapset_Reference_Guide/en-US/Author_Group.xml @@ -0,0 +1,25 @@ +<?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> + <corpauthor>Red Hat Enterprise Linux Documentation</corpauthor> + <author> + <firstname>Don</firstname> + <surname>Domingo</surname> + <affiliation> + <orgname>Engineering Services and Operations</orgname> + <orgdiv>Content Services</orgdiv> + </affiliation> + <email>ddomingo@redhat.com</email> + </author> + <author> + <firstname>William</firstname> + <surname>Cohen</surname> + <affiliation> + <orgname>Engineering Services and Operations</orgname> + <orgdiv>Performance Tools</orgdiv> + </affiliation> + <email>wcohen@redhat.com</email> + </author> +</authorgroup> diff --git a/doc/Tapset_Reference_Guide/publicanize.sh b/doc/Tapset_Reference_Guide/publicanize.sh new file mode 100755 index 00000000..96c20a11 --- /dev/null +++ b/doc/Tapset_Reference_Guide/publicanize.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +#copy the automated tapsets.xml +cp ../SystemTap_Tapset_Reference/tapsets.xml en-US/Tapset_Reference_Guide.xml ; + +#remove all excess whitespace +sed -i -e 's/^\s*//g' en-US/Tapset_Reference_Guide.xml ; + +#re-convert programlisting tags +sed -i -e 's/<programlisting>/<programlisting>/g' en-US/Tapset_Reference_Guide.xml; +sed -i -e 's/<\/programlisting>/<\/programlisting>/g' en-US/Tapset_Reference_Guide.xml; + +#replace header + +cat en-US/Tapset_Reference_Guide.xml | +perl -p -e 'undef $/;s|<bookinfo>\n<title>SystemTap Tapset Reference Manual</title>|<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />\n<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />|msg' | +perl -p -e 'undef $/;s|<authorgroup>\n<author>\n<firstname>William</firstname>\n<surname>Cohen</surname>\n<contrib></contrib>\n<affiliation>\n<address>\n<email>wcohen\@redhat.com</email>\n</address>\n</affiliation>\n</author>\n</authorgroup>||msg' | +perl -p -e 'undef $/;s|<copyright>\n<year>2008, 2009</year>\n<holder>Red Hat, Inc.</holder>\n</copyright>||msg' | +perl -p -e 'undef $/;s|<legalnotice>\n<para>\nThis documentation is free software\; you can redistribute\nit and/or modify it under the terms of the GNU General Public\nLicense version 2 as published by the Free Software Foundation.\n</para>||msg' | +perl -p -e 'undef $/;s|<para>\nThis program is distributed in the hope that it will be\nuseful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\n</para>||msg' | +perl -p -e 'undef $/;s|<para>\nYou should have received a copy of the GNU General Public\nLicense along with this program; if not, write to the Free\nSoftware Foundation, Inc., 59 Temple Place, Suite 330, Boston,\nMA 02111-1307 USA\n</para>||msg' | +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|<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 + +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; +sed -i -e 's/synopsis>/programlisting>\n/g' en-US/Tapset_Reference_Guide.xml; + +# re-convert tags + +sed -i -e 's/<emphasis>/<emphasis>/g' en-US/Tapset_Reference_Guide.xml; +sed -i -e 's/<\/emphasis>/<\/emphasis>/g' en-US/Tapset_Reference_Guide.xml; + +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 diff --git a/doc/langref.tex b/doc/langref.tex index 3af2bd15..5aefa278 100644 --- a/doc/langref.tex +++ b/doc/langref.tex @@ -706,6 +706,7 @@ kernel.function(PATTERN).call kernel.function(PATTERN).return kernel.function(PATTERN).return.maxactive(VALUE) kernel.function(PATTERN).inline +kernel.function(PATTERN).label(LPATTERN) module(MPATTERN).function(PATTERN) module(MPATTERN).function(PATTERN).call module(MPATTERN).function(PATTERN).return.maxactive(VALUE) @@ -737,8 +738,11 @@ The \textbf{.statement} variant places a probe at the exact spot, exposing those variables that are visible there. In the above probe descriptions, MPATTERN stands for a string literal -that identifies the loaded kernel module of interest. It may include asterisk -({*}), square brackets \char`\"{}{[}]\char`\"{}, and question mark (?) wildcards. +that identifies the loaded kernel module of interest and LPATTERN +stands for a source program label. Both MPATTERN and LPATTERN may +include asterisk ({*}), square brackets \char`\"{}{[}]\char`\"{}, and +question mark (?) wildcards. + PATTERN stands for a string literal that identifies a point in the program. It is composed of three parts: @@ -13,7 +13,8 @@ # later version. import os,posix,sys -from subprocess import * +from subprocess import call +from tempfile import mkstemp class provider: arglist = dict() @@ -21,7 +22,7 @@ class provider: have_provider = False self.f = open(provider) self.h = open(header,mode='w') - self.h.write("// Generated by /usr/bin/dtrace\n") + self.h.write("// Generated by the Systemtap dtrace wrapper\n") self.h.write("\n#include <sys/sdt.h>\n\n") in_comment = False while (True): @@ -59,7 +60,7 @@ class provider: if (len(new_args) > 0): self.arglist[this_probe] = ('%s arg%d' % (new_args, c)) if (len(new_args) == 0): - self.h.write ('#define %s STAP_PROBE(provider,%s)\n' % (this_probe_canon, this_probe)) + self.h.write ('#define %s() STAP_PROBE(provider,%s)\n' % (this_probe_canon, this_probe)) elif (c == 0): self.h.write ('#define %s(arg1) STAP_PROBE%d(provider,%s,arg1)\n' % (this_probe_canon, c+1, this_probe)) elif (c == 1): @@ -117,29 +118,31 @@ while (i < len (sys.argv)): elif (sys.argv[i] == "-G"): build_source = True i += 1 -# print build_header == False and build_source == False if (build_header == False and build_source == False): usage() sys.exit(1) if (filename == ""): if (s_filename != ""): - filename = s_filename.replace(".d","") + (filename,ext) = os.path.splitext(s_filename) + filename = os.path.basename(filename) + if (build_header): + filename = filename + ".h" + elif (build_source): + filename = filename + ".o" else: usage sys.exit(1) if (build_header): providers = provider() - providers.open(s_filename, filename + ".h") + providers.open(s_filename, filename) elif (build_source): - fn = "/tmp/" + os.path.basename(s_filename).replace(".d", ".c") + (basename,ext) = os.path.splitext(s_filename) + basename = os.path.basename(basename) + (d,fn) = mkstemp(suffix=".c",prefix=basename) f = open(fn,mode='w') f.write("static __dtrace () {}\n") f.close() - call("gcc -fPIC -c " + fn + " -o " + filename + ".o", shell=True) - f.close() + call(["gcc", "-fPIC", "-c", fn, "-o", filename], shell=False) os.remove(fn) - - - diff --git a/dwarf_wrappers.cxx b/dwarf_wrappers.cxx index f83c4665..3627b989 100644 --- a/dwarf_wrappers.cxx +++ b/dwarf_wrappers.cxx @@ -44,3 +44,5 @@ void dwfl_assert(const std::string& desc, bool condition) if (!condition) dwfl_assert(desc, -1); } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/dwarf_wrappers.h b/dwarf_wrappers.h index abf2c1e5..959ece92 100644 --- a/dwarf_wrappers.h +++ b/dwarf_wrappers.h @@ -91,3 +91,5 @@ public: #endif + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/elaborate.cxx b/elaborate.cxx index db1a4d78..0a00ebf2 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1,5 +1,5 @@ // elaboration functions -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-2009 Red Hat Inc. // Copyright (C) 2008 Intel Corporation // // This file is part of systemtap, and is free software. You can @@ -395,7 +395,8 @@ match_node::find_and_build (systemtap_session& s, throw semantic_error(string("probe point mismatch at position ") + lex_cast<string> (pos) + - " (alternatives:" + alternatives + ")", + " (alternatives:" + alternatives + ")" + + " didn't find any wildcard matches", loc->tok); } } @@ -700,6 +701,11 @@ struct symbol_fetcher e->base->visit_indexable (this); } + void visit_cast_op (cast_op* e) + { + sym = e; + } + void throwone (const token* t) { throw semantic_error ("Expecting symbol or array index expression", t); @@ -1086,6 +1092,9 @@ semantic_pass_symbols (systemtap_session& s) try { + for (unsigned j=0; j<s.code_filters.size(); j++) + fd->body = s.code_filters[j]->require (fd->body); + sym.current_function = fd; sym.current_probe = 0; fd->body->visit (& sym); @@ -1118,6 +1127,9 @@ semantic_pass_symbols (systemtap_session& s) try { + for (unsigned k=0; k<s.code_filters.size(); k++) + dp->body = s.code_filters[k]->require (dp->body); + sym.current_function = 0; sym.current_probe = dp; dp->body->visit (& sym); @@ -2090,59 +2102,30 @@ void semantic_pass_opt2 (systemtap_session& s, bool& relaxed_p, unsigned iterati // ------------------------------------------------------------------------ -struct dead_assignment_remover: public traversing_visitor +struct dead_assignment_remover: public update_visitor { systemtap_session& session; bool& relaxed_p; const varuse_collecting_visitor& vut; - expression** current_expr; dead_assignment_remover(systemtap_session& s, bool& r, const varuse_collecting_visitor& v): - session(s), relaxed_p(r), vut(v), current_expr(0) {} - - void visit_expr_statement (expr_statement* s); - // XXX: other places where an assignment may be nested should be - // handled too (e.g., loop/if conditionals, array indexes, function - // parameters). Until then, they result in visit_assignment() being - // called with null current_expr. + session(s), relaxed_p(r), vut(v) {} void visit_assignment (assignment* e); - void visit_binary_expression (binary_expression* e); - void visit_arrayindex (arrayindex* e); - void visit_functioncall (functioncall* e); - void visit_if_statement (if_statement* e); - void visit_for_loop (for_loop* e); }; void -dead_assignment_remover::visit_expr_statement (expr_statement* s) -{ - expression** last_expr = current_expr; - current_expr = & s->value; - s->value->visit (this); - s->tok = s->value->tok; // in case it was replaced - current_expr = last_expr; -} - - -void dead_assignment_remover::visit_assignment (assignment* e) { + e->left = require (e->left); + e->right = require (e->right); + symbol* left = get_symbol_within_expression (e->left); vardecl* leftvar = left->referent; // NB: may be 0 for unresolved $target - if (current_expr && // see XXX above: this case represents a missed - // optimization opportunity - *current_expr == e && // we're not nested any deeper than expected - leftvar) // not unresolved $target; intended sideeffect cannot be elided + if (leftvar) // not unresolved $target, so intended sideeffect may be elided { - expression** last_expr = current_expr; - e->left->visit (this); - current_expr = &e->right; - e->right->visit (this); - current_expr = last_expr; - if (vut.read.find(leftvar) == vut.read.end()) // var never read? { // NB: Not so fast! The left side could be an array whose @@ -2162,9 +2145,9 @@ dead_assignment_remover::visit_assignment (assignment* e) break; } - varuse_collecting_visitor vut; - e->left->visit (& vut); - if (vut.side_effect_free () && !is_global) // XXX: use _wrt() once we track focal_vars + varuse_collecting_visitor lvut; + e->left->visit (& lvut); + if (lvut.side_effect_free () && !is_global) // XXX: use _wrt() once we track focal_vars { /* PR 1119: NB: This is not necessary here. A write-only variable will also be elided soon at the next _opt2 iteration. @@ -2177,77 +2160,13 @@ dead_assignment_remover::visit_assignment (assignment* e) clog << "Eliding assignment to " << leftvar->name << " at " << *e->tok << endl; - *current_expr = e->right; // goodbye assignment* + provide (e->right); // goodbye assignment* relaxed_p = false; + return; } } } -} - -void -dead_assignment_remover::visit_binary_expression (binary_expression* e) -{ - expression** last_expr = current_expr; - current_expr = &e->left; - e->left->visit (this); - current_expr = &e->right; - e->right->visit (this); - current_expr = last_expr; -} - -void -dead_assignment_remover::visit_arrayindex (arrayindex *e) -{ - symbol *array = NULL; - hist_op *hist = NULL; - classify_indexable(e->base, array, hist); - - if (array) - { - expression** last_expr = current_expr; - for (unsigned i=0; i < e->indexes.size(); i++) - { - current_expr = & e->indexes[i]; - e->indexes[i]->visit (this); - } - current_expr = last_expr; - } -} - -void -dead_assignment_remover::visit_functioncall (functioncall* e) -{ - expression** last_expr = current_expr; - for (unsigned i=0; i<e->args.size(); i++) - { - current_expr = & e->args[i]; - e->args[i]->visit (this); - } - current_expr = last_expr; -} - -void -dead_assignment_remover::visit_if_statement (if_statement* s) -{ - expression** last_expr = current_expr; - current_expr = & s->condition; - s->condition->visit (this); - s->thenblock->visit (this); - if (s->elseblock) - s->elseblock->visit (this); - current_expr = last_expr; -} - -void -dead_assignment_remover::visit_for_loop (for_loop* s) -{ - expression** last_expr = current_expr; - if (s->init) s->init->visit (this); - current_expr = & s->cond; - s->cond->visit (this); - if (s->incr) s->incr->visit (this); - s->block->visit (this); - current_expr = last_expr; + provide (e); } // Let's remove assignments to variables that are never read. We @@ -2267,9 +2186,10 @@ void semantic_pass_opt3 (systemtap_session& s, bool& relaxed_p) // This instance may be reused for multiple probe/function body trims. for (unsigned i=0; i<s.probes.size(); i++) - s.probes[i]->body->visit (& dar); - for (map<string,functiondecl*>::iterator it = s.functions.begin(); it != s.functions.end(); it++) - it->second->body->visit (& dar); + s.probes[i]->body = dar.require (s.probes[i]->body); + for (map<string,functiondecl*>::iterator it = s.functions.begin(); + it != s.functions.end(); it++) + it->second->body = dar.require (it->second->body); // The rewrite operation is performed within the visitor. // XXX: we could also zap write-only globals here @@ -2278,15 +2198,14 @@ void semantic_pass_opt3 (systemtap_session& s, bool& relaxed_p) // ------------------------------------------------------------------------ -struct dead_stmtexpr_remover: public traversing_visitor +struct dead_stmtexpr_remover: public update_visitor { systemtap_session& session; bool& relaxed_p; - statement** current_stmt; // pointer to current stmt* being iterated set<vardecl*> focal_vars; // vars considered subject to side-effects dead_stmtexpr_remover(systemtap_session& s, bool& r): - session(s), relaxed_p(r), current_stmt(0) {} + session(s), relaxed_p(r) {} void visit_block (block *s); void visit_null_statement (null_statement *s); @@ -2305,7 +2224,8 @@ dead_stmtexpr_remover::visit_null_statement (null_statement *s) // easy! if (session.verbose>2) clog << "Eliding side-effect-free null statement " << *s->tok << endl; - *current_stmt = 0; + s = 0; + provide (s); } @@ -2315,13 +2235,11 @@ dead_stmtexpr_remover::visit_block (block *s) vector<statement*> new_stmts; for (unsigned i=0; i<s->statements.size(); i++ ) { - statement** last_stmt = current_stmt; - current_stmt = & s->statements[i]; - s->statements[i]->visit (this); - if (*current_stmt != 0) + statement* new_stmt = require (s->statements[i], true); + if (new_stmt != 0) { // flatten nested blocks into this one - block *b = dynamic_cast<block *>(*current_stmt); + block *b = dynamic_cast<block *>(new_stmt); if (b) { if (session.verbose>2) @@ -2331,42 +2249,32 @@ dead_stmtexpr_remover::visit_block (block *s) relaxed_p = false; } else - new_stmts.push_back (*current_stmt); + new_stmts.push_back (new_stmt); } - current_stmt = last_stmt; } if (new_stmts.size() == 0) { if (session.verbose>2) clog << "Eliding side-effect-free empty block " << *s->tok << endl; - *current_stmt = 0; + s = 0; } else if (new_stmts.size() == 1) { if (session.verbose>2) clog << "Eliding side-effect-free singleton block " << *s->tok << endl; - *current_stmt = new_stmts[0]; + provide (new_stmts[0]); + return; } else - { - s->statements = new_stmts; - } + s->statements = new_stmts; + provide (s); } void dead_stmtexpr_remover::visit_if_statement (if_statement *s) { - statement** last_stmt = current_stmt; - current_stmt = & s->thenblock; - s->thenblock->visit (this); - - if (s->elseblock) - { - current_stmt = & s->elseblock; - s->elseblock->visit (this); - // null *current_stmt is OK here. - } - current_stmt = last_stmt; + s->thenblock = require (s->thenblock, true); + s->elseblock = require (s->elseblock, true); if (s->thenblock == 0) { @@ -2381,7 +2289,7 @@ dead_stmtexpr_remover::visit_if_statement (if_statement *s) if (session.verbose>2) clog << "Eliding side-effect-free if statement " << *s->tok << endl; - *current_stmt = 0; // yeah, baby + s = 0; // yeah, baby } else { @@ -2392,7 +2300,8 @@ dead_stmtexpr_remover::visit_if_statement (if_statement *s) expr_statement *es = new expr_statement; es->value = s->condition; es->tok = es->value->tok; - *current_stmt = es; + provide (es); + return; } } else @@ -2411,31 +2320,27 @@ dead_stmtexpr_remover::visit_if_statement (if_statement *s) s->elseblock = 0; } } + provide (s); } void dead_stmtexpr_remover::visit_foreach_loop (foreach_loop *s) { - statement** last_stmt = current_stmt; - current_stmt = & s->block; - s->block->visit (this); - current_stmt = last_stmt; + s->block = require(s->block, true); if (s->block == 0) { if (session.verbose>2) clog << "Eliding side-effect-free foreach statement " << *s->tok << endl; - *current_stmt = 0; // yeah, baby + s = 0; // yeah, baby } + provide (s); } void dead_stmtexpr_remover::visit_for_loop (for_loop *s) { - statement** last_stmt = current_stmt; - current_stmt = & s->block; - s->block->visit (this); - current_stmt = last_stmt; + s->block = require(s->block, true); if (s->block == 0) { @@ -2449,14 +2354,16 @@ dead_stmtexpr_remover::visit_for_loop (for_loop *s) { if (session.verbose>2) clog << "Eliding side-effect-free for statement " << *s->tok << endl; - *current_stmt = 0; // yeah, baby - return; + s = 0; // yeah, baby + } + else + { + // Can't elide this whole statement; put a null in there. + s->block = new null_statement(); + s->block->tok = s->tok; } - - // Can't elide this whole statement; put a null in there. - s->block = new null_statement(); - s->block->tok = s->tok; } + provide (s); } @@ -2466,8 +2373,7 @@ dead_stmtexpr_remover::visit_expr_statement (expr_statement *s) { // Run a varuse query against the operand expression. If it has no // side-effects, replace the entire statement expression by a null - // statement. This replacement is done by overwriting the - // current_stmt pointer. + // statement with the provide() call. // // Unlike many other visitors, we do *not* traverse this outermost // one into the expression subtrees. There is no need - no @@ -2480,8 +2386,7 @@ dead_stmtexpr_remover::visit_expr_statement (expr_statement *s) varuse_collecting_visitor vut; s->value->visit (& vut); - if (vut.side_effect_free_wrt (focal_vars) && - *current_stmt == s) // we're not nested any deeper than expected + if (vut.side_effect_free_wrt (focal_vars)) { /* PR 1119: NB: this message is not a good idea here. It can name some arbitrary RHS expression of an assignment. @@ -2496,10 +2401,10 @@ dead_stmtexpr_remover::visit_expr_statement (expr_statement *s) // NB: this 0 pointer is invalid to leave around for any length of // time, but the parent parse tree objects above handle it. - * current_stmt = 0; - + s = 0; relaxed_p = false; } + provide (s); } @@ -2524,8 +2429,7 @@ void semantic_pass_opt4 (systemtap_session& s, bool& relaxed_p) duv.focal_vars.insert (p->locals.begin(), p->locals.end()); - duv.current_stmt = & p->body; - p->body->visit (& duv); + p->body = duv.require(p->body, true); if (p->body == 0) { if (! s.suppress_warnings) @@ -2550,8 +2454,7 @@ void semantic_pass_opt4 (systemtap_session& s, bool& relaxed_p) duv.focal_vars.insert (s.globals.begin(), s.globals.end()); - duv.current_stmt = & fn->body; - fn->body->visit (& duv); + fn->body = duv.require(fn->body, true); if (fn->body == 0) { if (! s.suppress_warnings) @@ -2576,21 +2479,27 @@ void semantic_pass_opt4 (systemtap_session& s, bool& relaxed_p) // into separate statements that evaluate each subcomponent of the expression. // The dead-statement-remover can later remove some parts if they have no side // effects. -struct void_statement_reducer: public traversing_visitor +// +// All expressions must be overridden here so we never visit their subexpressions +// accidentally. Thus, the only visited expressions should be value of an +// expr_statement. +// +// For an expression to replace its expr_statement with something else, it will +// let the new statement provide(), and then provide(0) for itself. The +// expr_statement will take this as a sign that it's been replaced. +struct void_statement_reducer: public update_visitor { systemtap_session& session; bool& relaxed_p; - statement** current_stmt; // pointer to current stmt* being iterated - expr_statement* current_expr; // pointer to current expr being iterated set<vardecl*> focal_vars; // vars considered subject to side-effects void_statement_reducer(systemtap_session& s, bool& r): - session(s), relaxed_p(r), current_stmt(0), current_expr(0) {} + session(s), relaxed_p(r) {} - // these just maintain current_stmt while recursing, but don't visit - // expressions in the conditional / loop controls. void visit_expr_statement (expr_statement* s); - void visit_block (block *s); + + // expressions in conditional / loop controls are definitely a side effect, + // but still recurse into the child statements void visit_if_statement (if_statement* s); void visit_for_loop (for_loop* s); void visit_foreach_loop (foreach_loop* s); @@ -2607,75 +2516,58 @@ struct void_statement_reducer: public traversing_visitor void visit_concatenation (concatenation* e); void visit_functioncall (functioncall* e); void visit_print_format (print_format* e); + void visit_cast_op (cast_op* e); // these are a bit hairy to grok due to the intricacies of indexables and // stats, so I'm chickening out and skipping them... - void visit_array_in (array_in* e) {} - void visit_arrayindex (arrayindex* e) {} - void visit_stat_op (stat_op* e) {} - void visit_hist_op (hist_op* e) {} + void visit_array_in (array_in* e) { provide (e); } + void visit_arrayindex (arrayindex* e) { provide (e); } + void visit_stat_op (stat_op* e) { provide (e); } + void visit_hist_op (hist_op* e) { provide (e); } // these can't be reduced because they always have an effect - void visit_return_statement (return_statement* s) {} - void visit_delete_statement (delete_statement* s) {} - void visit_pre_crement (pre_crement* e) {} - void visit_post_crement (post_crement* e) {} - void visit_assignment (assignment* e) {} + void visit_return_statement (return_statement* s) { provide (s); } + void visit_delete_statement (delete_statement* s) { provide (s); } + void visit_pre_crement (pre_crement* e) { provide (e); } + void visit_post_crement (post_crement* e) { provide (e); } + void visit_assignment (assignment* e) { provide (e); } }; void void_statement_reducer::visit_expr_statement (expr_statement* s) { - assert(!current_expr); // it shouldn't be possible to have nested expr's - current_expr = s; - s->value->visit (this); - current_expr = NULL; -} + s->value = require (s->value, true); -void -void_statement_reducer::visit_block (block *s) -{ - statement** last_stmt = current_stmt; - for (unsigned i=0; i<s->statements.size(); i++ ) - { - current_stmt = & s->statements[i]; - s->statements[i]->visit (this); - } - current_stmt = last_stmt; + // if the expression provides 0, that's our signal that a new + // statement has been provided, so we shouldn't provide this one. + if (s->value != 0) + provide(s); } void void_statement_reducer::visit_if_statement (if_statement* s) { - statement** last_stmt = current_stmt; - current_stmt = & s->thenblock; - s->thenblock->visit (this); - - if (s->elseblock) - { - current_stmt = & s->elseblock; - s->elseblock->visit (this); - } - current_stmt = last_stmt; + // s->condition is never void + s->thenblock = require (s->thenblock); + s->elseblock = require (s->elseblock); + provide (s); } void void_statement_reducer::visit_for_loop (for_loop* s) { - statement** last_stmt = current_stmt; - current_stmt = & s->block; - s->block->visit (this); - current_stmt = last_stmt; + // s->init/cond/incr are never void + s->block = require (s->block); + provide (s); } void void_statement_reducer::visit_foreach_loop (foreach_loop* s) { - statement** last_stmt = current_stmt; - current_stmt = & s->block; - s->block->visit (this); - current_stmt = last_stmt; + // s->indexes/base/limit are never void + s->block = require (s->block); + provide (s); } void @@ -2684,8 +2576,6 @@ void_statement_reducer::visit_logical_or_expr (logical_or_expr* e) // In void context, the evaluation of "a || b" is exactly like // "if (!a) b", so let's do that instead. - assert(current_expr && current_expr->value == e); - if (session.verbose>2) clog << "Creating if statement from unused logical-or " << *e->tok << endl; @@ -2693,8 +2583,6 @@ void_statement_reducer::visit_logical_or_expr (logical_or_expr* e) if_statement *is = new if_statement; is->tok = e->tok; is->elseblock = 0; - *current_stmt = is; - current_expr = NULL; unary_expression *ue = new unary_expression; ue->operand = e->left; @@ -2709,6 +2597,8 @@ void_statement_reducer::visit_logical_or_expr (logical_or_expr* e) is->visit(this); relaxed_p = false; + e = 0; + provide (e); } void @@ -2717,8 +2607,6 @@ void_statement_reducer::visit_logical_and_expr (logical_and_expr* e) // In void context, the evaluation of "a && b" is exactly like // "if (a) b", so let's do that instead. - assert(current_expr && current_expr->value == e); - if (session.verbose>2) clog << "Creating if statement from unused logical-and " << *e->tok << endl; @@ -2727,8 +2615,6 @@ void_statement_reducer::visit_logical_and_expr (logical_and_expr* e) is->tok = e->tok; is->elseblock = 0; is->condition = e->left; - *current_stmt = is; - current_expr = NULL; expr_statement *es = new expr_statement; es->value = e->right; @@ -2737,6 +2623,8 @@ void_statement_reducer::visit_logical_and_expr (logical_and_expr* e) is->visit(this); relaxed_p = false; + e = 0; + provide (e); } void @@ -2745,8 +2633,6 @@ void_statement_reducer::visit_ternary_expression (ternary_expression* e) // In void context, the evaluation of "a ? b : c" is exactly like // "if (a) b else c", so let's do that instead. - assert(current_expr && current_expr->value == e); - if (session.verbose>2) clog << "Creating if statement from unused ternary expression " << *e->tok << endl; @@ -2754,8 +2640,6 @@ void_statement_reducer::visit_ternary_expression (ternary_expression* e) if_statement *is = new if_statement; is->tok = e->tok; is->condition = e->cond; - *current_stmt = is; - current_expr = NULL; expr_statement *es = new expr_statement; es->value = e->truevalue; @@ -2769,6 +2653,8 @@ void_statement_reducer::visit_ternary_expression (ternary_expression* e) is->visit(this); relaxed_p = false; + e = 0; + provide (e); } void @@ -2777,15 +2663,11 @@ void_statement_reducer::visit_binary_expression (binary_expression* e) // When the result of a binary operation isn't needed, it's just as good to // evaluate the operands as sequential statements in a block. - assert(current_expr && current_expr->value == e); - if (session.verbose>2) clog << "Eliding unused binary " << *e->tok << endl; block *b = new block; - b->tok = current_expr->tok; - *current_stmt = b; - current_expr = NULL; + b->tok = e->tok; expr_statement *es = new expr_statement; es->value = e->left; @@ -2799,6 +2681,8 @@ void_statement_reducer::visit_binary_expression (binary_expression* e) b->visit(this); relaxed_p = false; + e = 0; + provide (e); } void @@ -2807,16 +2691,11 @@ void_statement_reducer::visit_unary_expression (unary_expression* e) // When the result of a unary operation isn't needed, it's just as good to // evaluate the operand directly - assert(current_expr && current_expr->value == e); - if (session.verbose>2) clog << "Eliding unused unary " << *e->tok << endl; - current_expr->value = e->operand; - current_expr->tok = current_expr->value->tok; - current_expr->value->visit(this); - relaxed_p = false; + e->operand->visit(this); } void @@ -2838,24 +2717,26 @@ void_statement_reducer::visit_functioncall (functioncall* e) // and just evaluate the arguments in sequence if (!e->args.size()) - return; + { + provide (e); + return; + } varuse_collecting_visitor vut; vut.traversed.insert (e->referent); vut.current_function = e->referent; e->referent->body->visit (& vut); if (!vut.side_effect_free_wrt (focal_vars)) - return; - - assert(current_expr && current_expr->value == e); + { + provide (e); + return; + } if (session.verbose>2) clog << "Eliding side-effect-free function call " << *e->tok << endl; block *b = new block; b->tok = e->tok; - *current_stmt = b; - current_expr = NULL; for (unsigned i=0; i<e->args.size(); i++ ) { @@ -2867,6 +2748,8 @@ void_statement_reducer::visit_functioncall (functioncall* e) b->visit(this); relaxed_p = false; + e = 0; + provide (e); } void @@ -2876,17 +2759,16 @@ void_statement_reducer::visit_print_format (print_format* e) // arguments in sequence if (e->print_to_stream || !e->args.size()) - return; - - assert(current_expr && current_expr->value == e); + { + provide (e); + return; + } if (session.verbose>2) clog << "Eliding unused print " << *e->tok << endl; block *b = new block; b->tok = e->tok; - *current_stmt = b; - current_expr = NULL; for (unsigned i=0; i<e->args.size(); i++ ) { @@ -2898,6 +2780,21 @@ void_statement_reducer::visit_print_format (print_format* e) b->visit(this); relaxed_p = false; + e = 0; + provide (e); +} + +void +void_statement_reducer::visit_cast_op (cast_op* e) +{ + // When the result of a cast operation isn't needed, it's just as good to + // evaluate the operand directly + + if (session.verbose>2) + clog << "Eliding unused typecast " << *e->tok << endl; + + relaxed_p = false; + e->operand->visit(this); } @@ -2911,17 +2808,10 @@ void semantic_pass_opt5 (systemtap_session& s, bool& relaxed_p) vuv.focal_vars.insert (s.globals.begin(), s.globals.end()); for (unsigned i=0; i<s.probes.size(); i++) - { - derived_probe* p = s.probes[i]; - vuv.current_stmt = & p->body; - p->body->visit (& vuv); - } - for (map<string,functiondecl*>::iterator it = s.functions.begin(); it != s.functions.end(); it++) - { - functiondecl* fn = it->second; - vuv.current_stmt = & fn->body; - fn->body->visit (& vuv); - } + s.probes[i]->body = vuv.require (s.probes[i]->body); + for (map<string,functiondecl*>::iterator it = s.functions.begin(); + it != s.functions.end(); it++) + it->second->body = vuv.require (it->second->body); } @@ -3534,6 +3424,18 @@ typeresolution_info::visit_target_symbol (target_symbol* e) void +typeresolution_info::visit_cast_op (cast_op* e) +{ + // Like target_symbol, a cast_op shouldn't survive this far + // unless it was not resolved and its value is really needed. + if (e->saved_conversion_error) + throw (* (e->saved_conversion_error)); + else + throw semantic_error("unresolved cast expression", e->tok); +} + + +void typeresolution_info::visit_arrayindex (arrayindex* e) { @@ -4085,23 +3987,71 @@ typeresolution_info::invalid (const token* tok, exp_type pe) void typeresolution_info::mismatch (const token* tok, exp_type t1, exp_type t2) { + bool tok_resolved = false; + size_t i; + semantic_error* err1 = 0; num_still_unresolved ++; + //BZ 9719: for improving type mismatch messages, a semantic error is + //generated with the token where type was first resolved. All such + //resolved tokens, stored in a vector, are matched against their + //content. If an error for the matching token hasn't been printed out + //already, it is and the token pushed in another printed_toks vector + if (assert_resolvability) { stringstream msg; - string nm = (current_function ? current_function->name : - current_probe ? current_probe->name : - "probe condition"); - msg << nm + " with type mismatch (" << t1 << " vs. " << t2 << ")"; - session.print_error (semantic_error (msg.str(), tok)); + for (i=0; i<resolved_toks.size(); i++) + { + if (resolved_toks[i]->content == tok->content) + { + tok_resolved = true; + break; + } + } + if (!tok_resolved) + { + string nm = (current_function ? current_function->name : + current_probe ? current_probe->name : + "probe condition"); + msg << nm + " with type mismatch (" << t1 << " vs. " << t2 << ")"; + } + else + { + bool tok_printed = false; + for (size_t j=0; j<printed_toks.size(); j++) + { + if (printed_toks[j] == resolved_toks[i]) + { + tok_printed = true; + break; + } + } + string nm = (current_function ? current_function->name : + current_probe ? current_probe->name : + "probe condition"); + msg << nm + " with type mismatch (" << t1 << " vs. " << t2 << ")"; + if (!tok_printed) + { + //error for possible mismatch in the earlier resolved token + printed_toks.push_back (resolved_toks[i]); + stringstream type_msg; + type_msg << nm + " type first inferred here (" << t2 << ")"; + err1 = new semantic_error (type_msg.str(), resolved_toks[i]); + } + } + semantic_error err (msg.str(), tok); + err.chain = err1; + session.print_error (err); } } void -typeresolution_info::resolved (const token*, exp_type) +typeresolution_info::resolved (const token* tok, exp_type) { + resolved_toks.push_back (tok); num_newly_resolved ++; } +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/elaborate.h b/elaborate.h index df888360..1e05444f 100644 --- a/elaborate.h +++ b/elaborate.h @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-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 @@ -54,6 +54,8 @@ struct typeresolution_info: public visitor bool assert_resolvability; functiondecl* current_function; derived_probe* current_probe; + std::vector <const token*> resolved_toks; // account for type mis- + std::vector <const token*> printed_toks; // matches (BZ 9719) void check_arg_type (exp_type wanted, expression* arg); void mismatch (const token* tok, exp_type t1, exp_type t2); @@ -95,6 +97,7 @@ struct typeresolution_info: public visitor void visit_print_format (print_format* e); void visit_stat_op (stat_op* e); void visit_hist_op (hist_op* e); + void visit_cast_op (cast_op* e); }; @@ -260,3 +263,5 @@ struct unparser; #endif // ELABORATE_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/git_version.sh b/git_version.sh index 50658970..d39d96c9 100755 --- a/git_version.sh +++ b/git_version.sh @@ -307,7 +307,6 @@ cat<<EOF # else /* !GIT_NOT_FOUND */ # define GIT_MESSAGE \\ GIT_DIST_MSG \\ - "git branch " GIT_BRANCH ", " \\ "commit " GIT_SHAID GIT_DIRTY_MSG \\ GIT_ERROR_MSG # endif /* GIT_NOT_FOUND */ @@ -65,22 +65,83 @@ hash::result(string& r) } -void -find_hash (systemtap_session& s, const string& script) +static void +get_base_hash (systemtap_session& s, hash& h) { - hash h; - int nlevels = 1; struct stat st; - // We use a N level subdir for the cache path. Let N be adjustable. - const char *s_n; - if ((s_n = getenv("SYSTEMTAP_NLEVELS"))) + // Hash kernel release and arch. + h.add(s.kernel_release); + h.add(s.kernel_build_tree); + h.add(s.architecture); + + // Hash runtime path (that gets added in as "-R path"). + h.add(s.runtime_path); + + // Hash compiler path, size, and mtime. We're just going to assume + // we'll be using gcc. XXX: getting kbuild to spit out out would be + // better. + string gcc_path = find_executable ("gcc"); + if (stat(gcc_path.c_str(), &st) == 0) + { + h.add(gcc_path); + h.add(st.st_size); + h.add(st.st_mtime); + } + + // Hash the systemtap size and mtime. We could use VERSION/DATE, + // but when developing systemtap that doesn't work well (since you + // can compile systemtap multiple times in 1 day). Since we don't + // know exactly where we're getting run from, we'll use + // /proc/self/exe. + if (stat("/proc/self/exe", &st) == 0) + { + h.add(st.st_size); + h.add(st.st_mtime); + } +} + + +static bool +create_hashdir (systemtap_session& s, const string& result, string& hashdir) +{ + int nlevels = 1; + + // Use a N level subdir for the cache path to reduce the impact on + // filesystems which are slow for large directories. Let N be adjustable. + const char *s_n = getenv("SYSTEMTAP_NLEVELS"); + if (s_n) { nlevels = atoi(s_n); if (nlevels < 1) nlevels = 1; if (nlevels > 8) nlevels = 8; } + hashdir = s.cache_path; + + for (int i = 0; i < nlevels; i++) + { + hashdir += string("/") + result[i*2] + result[i*2 + 1]; + if (create_dir(hashdir.c_str()) != 0) + { + if (! s.suppress_warnings) + cerr << "Warning: failed to create cache directory (\"" + << hashdir + "\"): " << strerror(errno) + << ", disabling cache support." << endl; + s.use_cache = false; + return false; + } + } + return true; +} + + +static void +find_script_hash (systemtap_session& s, const string& script, const hash &base) +{ + hash h(base); + struct stat st; + // Hash getuid. This really shouldn't be necessary (since who you // are doesn't change the generated output), but the hash gets used // as the module name. If two different users try to run the same @@ -88,11 +149,6 @@ find_hash (systemtap_session& s, const string& script) // module name. h.add(getuid()); - // Hash kernel release and arch. - h.add(s.kernel_release); - h.add(s.kernel_build_tree); - h.add(s.architecture); - // Hash user-specified arguments (that change the generated module). h.add(s.bulk_mode); // '-b' h.add(s.merge); // '-M' @@ -123,53 +179,14 @@ find_hash (systemtap_session& s, const string& script) h.add(*it); // XXX: a build-id of each module might be even better - // Hash runtime path (that gets added in as "-R path"). - h.add(s.runtime_path); - - // Hash compiler path, size, and mtime. We're just going to assume - // we'll be using gcc. XXX: getting kbuild to spit out out would be - // better. - string gcc_path = find_executable ("gcc"); - if (stat(gcc_path.c_str(), &st) == 0) - { - h.add(gcc_path); - h.add(st.st_size); - h.add(st.st_mtime); - } - - // Hash the systemtap size and mtime. We could use VERSION/DATE, - // but when developing systemtap that doesn't work well (since you - // can compile systemtap multiple times in 1 day). Since we don't - // know exactly where we're getting run from, we'll use - // /proc/self/exe. - if (stat("/proc/self/exe", &st) == 0) - { - h.add(st.st_size); - h.add(st.st_mtime); - } - // Add in pass 2 script output. h.add(script); - // Use a N level subdir for the cache path to reduce the impact on - // filesystems which are slow for large directories. - string hashdir = s.cache_path; - string result; + // Get the directory path to store our cached script + string result, hashdir; h.result(result); - - for (int i = 0; i < nlevels; i++) - { - hashdir += string("/") + result[i*2] + result[i*2 + 1]; - if (create_dir(hashdir.c_str()) != 0) - { - if (! s.suppress_warnings) - cerr << "Warning: failed to create cache directory (\"" - << hashdir + "\"): " << strerror(errno) - << ", disabling cache support." << endl; - s.use_cache = false; - return; - } - } + if (!create_hashdir(s, result, hashdir)) + return; // Update module name to be 'stap_{hash start}'. '{hash start}' // must not be too long. This shouldn't happen, since the maximum @@ -191,3 +208,33 @@ find_hash (systemtap_session& s, const string& script) // Update C source name with new module_name. s.translated_source = string(s.tmpdir) + "/" + s.module_name + ".c"; } + + +static void +find_stapconf_hash (systemtap_session& s, const hash& base) +{ + hash h(base); + + // The basic hash should be good enough for STAPCONF variables + + // Get the directory path to store our cached stapconf parameters + string result, hashdir; + h.result(result); + if (!create_hashdir(s, result, hashdir)) + return; + + s.stapconf_name = "stapconf_" + result + ".h"; + s.stapconf_path = hashdir + "/" + s.stapconf_name; +} + + +void +find_hash (systemtap_session& s, const string& script) +{ + hash base; + get_base_hash(s, base); + find_stapconf_hash(s, base); + find_script_hash(s, script, base); +} + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -35,3 +35,5 @@ public: }; void find_hash (systemtap_session& s, const std::string& script); + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h new file mode 100644 index 00000000..d68fed6c --- /dev/null +++ b/includes/sys/sdt.h @@ -0,0 +1,173 @@ +// 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> + +#if _LP64 +#define STAP_PROBE_STRUCT_ARG(arg) \ + __uint64_t arg; +#else +#define STAP_PROBE_STRUCT_ARG(arg) \ + long arg __attribute__ ((aligned(8))); +#endif + +#define STAP_SENTINEL 0x31425250 + +#define STAP_PROBE_STRUCT(probe,argc) \ +struct _probe_ ## probe \ +{ \ + int probe_type; \ + STAP_PROBE_STRUCT_ARG (probe_name); \ + STAP_PROBE_STRUCT_ARG (probe_arg); \ +}; \ +static char probe ## _ ## probe_name [strlen(#probe)+1] \ + __attribute__ ((section (".probes"))) \ + = #probe; \ +static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {STAP_SENTINEL,(size_t)& probe ## _ ## probe_name[0],argc}; + +#define STAP_LABEL_REF(probe) \ + if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ + goto STAP_LABEL(probe,__LINE__); + +#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_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);} + +#define DTRACE_PROBE(provider,probe) \ +STAP_PROBE(provider,probe) +#define DTRACE_PROBE1(provider,probe,parm1) \ +STAP_PROBE1(provider,probe,parm1) +#define DTRACE_PROBE2(provider,probe,parm1,parm2) \ +STAP_PROBE2(provider,probe,parm1,parm2) +#define DTRACE_PROBE3(provider,probe,parm1,parm2,parm3) \ +STAP_PROBE3(provider,probe,parm1,parm2,parm3) +#define DTRACE_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ +STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) +#define DTRACE_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \ +STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) +#define DTRACE_PROBE6(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) \ +STAP_PROBE6(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) +#define DTRACE_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) \ +STAP_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) +#define DTRACE_PROBE8(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) \ +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 */ diff --git a/initscript/README.initscript b/initscript/README.initscript new file mode 100644 index 00000000..f566cf71 --- /dev/null +++ b/initscript/README.initscript @@ -0,0 +1,355 @@ +Systemtap initscript +Version 0.2 +Author: Masami Hiramatsu <mhiramat@redhat.com> + +INDEX +===== +1. Introduction +2. Usage +3. Files +4. Configuration Format +5. How to use + +1. Introduction +=============== +Systemtap initscript aims to provide +- running systemtap script as a service with dependency. +- easy way to control(start/stop) those scripts individually. +The dependency means that which user-defined systemtap script is required by +other script (Here the scripts don't include tapsets). This dependency +will be useful for users who use -DRELAY_HOST and -DRELAY_GUEST. + +2. Usage +======== +2.1 Synopsis + +/sbin/service systemtap {start|stop|restart|status|compile|cleanup} \ + [-r kernelrelease] [-c config] [-R] [-y] [script(s)] + +2.2 Commands + You have to specify one of the below commands. + +2.2.1 start + Run script(s). If the script(s) is already started, the command will be + ignored. If it fails to start, return FAIL. If AUTOCOMPILE option is 'yes' + (see 4.1.9), this will try to compile or update the specified script when + one of the below condition is true. + - compiled cache file does not exist. + - mtime (modified time stamp) of original script file is newer than compiled + script cache. + - script options which is used when compiling(see 4.2.1) has been changed. + - result of `uname -a` has been changed. + If no scripts specified from command line, it starts all scripts in the script + directory or the scripts specified by DEFAULT_START in config (see 4.1.10). + +2.2.2 stop + Stop script(s). If the script(s) is already stopped, this will be ignored. + If it fails to stop, return FAIL. + If no scripts specified from command line, it stops all running scripts. + +2.2.3 restart + Stop and start script(s) again. + +2.2.4 status + Show running script(s) status and dependency. + +2.2.5 compile + Compile script(s) on the specified kernel. This command takes '-r' option + which specifies the release of the kernel(see 2.3.4) on which you would + like to compile script(s). This command asks user whether it can overwrite +existing caches. + +2.2.6 cleanup + Cleanup compiled script(s) from cache directory(see 3.4). This command also + takes '-r' option. If '-r' option is omitted, cleanup all caches for running + kernel. This command asks user whether it can remove caches. + +2.3 Options + Systemtap initscript can have some options. However, since user can't pass + these options on boot, these options are only for testing or managing scripts + after booting. + +2.3.1 -c config_path + You can specify configuration path of this initscript. + +2.3.2 script(s) + You can specify individual scripts to the commands. If you omit to specify + any script, systemtap initscript will execute the command with all scripts + in the script directory(except 'start' and 'stop' command, see 2.2.1 and + 2.2.2). + +2.3.3 -R + If this option is specified, systemtap initscript will try to solve + dependency of specified script(s). This option is always set if you don't + specify any script(s) from command line. + +2.3.4 -r kernelrelease + You can specify release version of the kernel(e.g. 2.6.26.1). This option + is valid only with compile and cleanup commands. + +2.3.5 -y + Answer yes for all questions. + +2.4 Misc +2.4.1 Service Priority + Each initscript has execution priority. Since user would like to trace + other services by using systemtap, systemtap initscript should have the + highest priority. + +3. Files +======== +3.1 initscript + /etc/init.d/systemtap + + This file is an executable bash script. + +3.2 Configurations + Configuration files are written in bash script. + +3.2.1 Global config file + /etc/systemtap/config + + This config file is for global parameters(see 4.1). + +3.2.2 Script config files + /etc/systemtap/conf.d/*.conf + + The config files under this directory are for each scripts or script groups + (see 4.2). + +3.3 Script directory + /etc/systemtap/script.d/ + + Systemtap initscript finds systemtap scripts from this directory. + +3.3.1 Scripts in the directory + /etc/systemtap/script.d/<script-name>.stp + + Systemtap scripts stored in the script directory must have ".stp" suffix. + +3.4 Cache directory + /var/cache/systemtap/<kernel-version>/ + + Systemtap initscript stores compiled scripts in this directory. + +3.4.1 Compiled scripts (or script caches) + /var/cache/systemtap/<kernel-version>/<script-name>.ko + /var/cache/systemtap/<kernel-version>/<script-name>.opts + + *.ko file is the compiled script, and *.opts is the file which stores + stap options and uname -a. + +3.5 Message Log + /var/log/systemtap.log + + All messages including compilation errors and detailed messages are sent + to this file. + Some error and warning messages are also sent to console and syslogd (syslog + output is optional, because this service will start before syslog). + +3.7 Status files + /var/run/systemtap/<script-name> + + +4. Configuration Format +======================= +Configuration file allows us +- specifying options for each script +- supporting flight recorder mode (on file or memory) + +4.1 Global Parameters + +4.1.1 SCRIPT_PATH + Specify the absolute path of the script directory. + (default: /etc/systemtap/script.d) + +4.1.2 CONFIG_PATH + Specify the absolute path of the script config directory. + (default: /etc/systemtap/conf.d) + +4.1.3 CACHE_PATH + Specify the absolute path of the parent directory of the cache directory. + (default: /var/cache/systemtap) + +4.1.4 TEMP_PATH + Specify the absolute path of the temporary directory on which systemtap + initscript make temporary directories to compile scripts. + (default: /tmp) + +4.1.5 STAT_PATH + Specify the absolute path of the running status directory. + (default: /var/run/systemtap) + +4.1.6 LOG_FILE + Specify the absolute path of the log file + (default: /var/log/systemtap.log) + +4.1.7 PASSALL + If this is set 'yes', systemtap initscript will fail when it fails + to run one of the scripts. If not, systemtap initscript will not + fail(just warn). + (default: yes) + +4.1.8 RECURSIVE + If this is set 'yes', systemtap initscript will always follow script + dependencies. This means, you don't need to specify '-R' option. This flag is + effective only if you specify script(s) from command line. + (default: no) + +4.1.9 AUTOCOMPILE + If this is set 'yes', systemtap initscript automatically tries to compile + specified script if there is no valid cache. Otherwides, it just fails to + run script(s). + (default: yes) + +4.1.10 DEFAULT_START + Specify scripts which will be started by default. If omitted (or empty), + all scripts in the script directory will be started. + (default: "") + +4.1.11 ALLOW_CACHEONLY + If this is set 'yes', systemtap initscript list up cache-only scripts too. + *NOTE*: systemtap initscript will load unexpected obsolate caches with this + option. You should check cache directory before enabling this option. + (default: no) + +4.2 Script Parameters + +4.2.1 <script-name>_OPT + Specify options passed to stap command for each script. "script-name" is the + name of the script file without the suffix extension(.stp). + Some options are just ignored. And even if you don't specify -F option, + systemtap initscript always add it for flight recorder mode. + - Below options are ignored when compiling script. + -p,-m,-r,-c,-x,-e,-s,-o,-h,-V,-k + - Below options are ignored when starting script. + -h,-V,-M,-v,-t,-p,-I,-e,-R,-r,-m,-k,-g,-P,-D,-b,-u,-q,-w,-l,-d,-L,-F, and + other long options. + +4.2.2 <script-name>_REQ + Specify script dependency(which script this script requires). + For example, "foo.stp" script requires(or run after) "bar.stp" script, set + + foo_REQ="bar" + + If the script requires many scripts, set all scripts separated by spaces. + + foo_REQ="bar baz" + +4.3 Configuration Example + +4.3.1 Global Config Example +--- +SCRIPT_PATH=/var/systemtap/script.d/ +PASSALL=yes +RECURSIVE=no +--- + +4.3.2 Script Config Example +--- +script1_OPT="-o /var/log/script1.out -DRELAYHOST=group1" +script2_OPT="-DRELAYGUEST=group1" +script2_REQ=script1 +--- + +5. How to use +============= + +5.1 Package Installation + After installing systemtap package, install systemtap-initscript package. + # yum install systemtap-initscript + This package will include initscript and default configuration file and + other files. + +5.2 Script installation +5.2.1 Installing script files + Copy a systemtap script ("script1.stp") into script directory. + # cp script1.stp /etc/systemtap/script.d/ + +5.2.2 Configuration script options + Add configuration file to specify options. + # vi /etc/systemtap/conf.d/group1 + script1_OPT="-o /var/log/group1.log -DRELAYHOST=group1" + +5.2.3 Installing script file with dependency + For example, a script("script2.stp") which shares buffer with another + script("script1.stp"), there is a dependency. In this case, you just do + as following. + + # cp script2.stp /etc/systemtap/script.d/ + # vi /etc/systemtap/conf.d/group1 + script2_OPT="-DRELAYGUEST=group1" + script2_REQ=script1 + + In this case, if stap fails to run script1.stp, systemtap initscript will + not run script2.stp. + +5.3 Testing + After installing all scripts, please make sure to run service successfully. + # service systemtap start + # service systemtap stop + If there is no error, we are ready to use it. + +5.4 Service Enabling + After all test passed, enable systemtap initscript. + # chkconfig systemtap on + +5.5 Adding script +5.5.1 Installing and configuring new scripts + Copy new systemtap script("script3.stp") into script directory. + # cp script3.stp /etc/systemtap/script.d/ + and configure it. + # vi /etc/systemtap/conf.d/group1 + script3_OPT="-DRELAYGUEST=group1" + script3_REQ="script1" + +5.5.2 Start new script + If you've already started systemtap initscript, just start new script. + # service systemtap start script3 + +5.6 Deleting script +5.6.1 Deleting old script + Remove old script ("script2.stp") and remove configure lines + # rm /etc/systemtap/script.d/script2.stp + # vi /etc/systemtap/conf.d/group1 + (delete script2_OPT and script2_REQ) + +5.6.2 Stopping old script and cleanup + Stop old script. + # service systemtap stop script2 + And cleanup the script caches. + # service systemtap cleanup script2 + +5.7 Updating kernel + Usually, you don't need to do anything. Systemtap initscript checks the + kernel version when starting the service, and compile scripts. + (If you would like to use compiled scripts due to lack of compiler or + debuginfo on the system, see 5.8) + However, if you want to avoid compiling when booting system, you can prepare + script caches for new kernel. + # service systemtap compile -r <new kernel version> + +5.8 Using with compiled scripts + Sometimes, production systems don't have any compilation environment. Even + though, you can use systemtap initscript with compiled scripts as script + caches, which are compiled on other machine (but same software environment). + +5.8.1 Preparing compiled scripts + As described in 5.2, installing scripts and configure it on the compiling + machine (which has compilation environment). + After that, compile those scripts. + # service systemtap compile -r <kernel-version> + And package the compiled scripts and configuration file. + # tar czf stap-scripts-<kernel-version>.tar.gz \ + /var/cache/systemtap/<kernel-version> /etc/systemtap/conf.d/<config> + And copy this package to the target machine. + +5.8.2 Installing pre-compiled scripts + On the target machine, unpackage the compiled scripts into cache + directory. + # tar xzf stap-scripts-<kernel-version>.tar.gz -C /var/cache/systemtap/ + # mv /var/cache/systemtap/<config> /etc/systemtap/conf.d/ + At last, set AUTOCOMPILE=no and ALLOW_CACHEONLY=yes in config file. + # vi /etc/systemtap/config + AUTOCOMPILE=no + ALLOW_CACHEONLY=yes diff --git a/initscript/config b/initscript/config new file mode 100644 index 00000000..c49a34a5 --- /dev/null +++ b/initscript/config @@ -0,0 +1,20 @@ +# Path setup +# SCRIPT_PATH=/etc/systemtap/script.d +# CONFIG_PATH=/etc/systemtap/conf.d +# CACHE_PATH=/var/cache/systemtap +# STAT_PATH=/var/run/systemtap +# TEMP_PATH=/tmp +# LOG_FILE=/var/log/systemtap.log + +# Fail unless all scripts succeeded to run +# PASSALL=yes + +# Always follows script dependencies +# RECURSIVE=no + +# Automatically recompile scripts if caches are old or do not exist. +# AUTOCOMPILE=yes + +# Start these scripts by default. If omitted, all scripts are started. +# DEFAULT_START= + diff --git a/initscript/systemtap.in b/initscript/systemtap.in new file mode 100644 index 00000000..eaa1d969 --- /dev/null +++ b/initscript/systemtap.in @@ -0,0 +1,664 @@ +#!/bin/bash +# +# systemtap Startup script for systemtap scrips +# +# chkconfig: - 00 99 +# description: Systemtap is a programable kernel/application tracing tool. +# config: /etc/systemtap/config +# config: /etc/systemtap/conf.d +### BEGIN INIT INFO +# Provides: Systemtap scripts startup +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Short-Description: start and stop systemtap scripts +# Description: Systemtap is a programable kernel/application tracing tool. +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +prog=systemtap + +# Commands +STAP=@bindir@/stap +STAPRUN=@bindir@/staprun +UNAME=/bin/uname +LSMOD=/sbin/lsmod + +# Path setup +SCRIPT_PATH=/etc/systemtap/script.d +CONFIG_PATH=/etc/systemtap/conf.d +CACHE_PATH=/var/cache/systemtap +STAT_PATH=/var/run/systemtap +TEMP_PATH=/tmp +LOG_FILE=/var/log/systemtap.log + +# FAIL unless all scripts succeeded to run +PASSALL=yes + +# Always follows script dependencies +RECURSIVE=no + +# Automatically recompile scripts if caches are old or do not exist. +AUTOCOMPILE=yes + +# Start these scripts by default. If omitted, all scripts are started. +DEFAULT_START= + +# Allow cache only scripts +ALLOW_CACHEONLY=no + +# Optional settings +CONFIG=/etc/systemtap/config +SCRIPTS= +KRELEASE=`uname -r` +OPT_RECURSIVE= +OPT_SCRIPTS= +OPTS= +OPT_ASSUMEYES= + +echo_usage () { + echo $"Usage: $prog {start|stop|restart|status|compile|cleanup} [option]" + echo $"Options:" + echo $" -c configfile : specify config file" + echo $" -r kernelrelease: specify kernel release version" + echo $" -R : recursively dependency checking" + echo $" -y : answer yes for all questions." + echo $" script(s) : specify systemtap scripts" +} + +#----------------------------------------------------------------- +# Helper functions +#----------------------------------------------------------------- +log () { # message + echo `LC_ALL=en date +"%b %e %T"`": $1" >> "$LOG_FILE" +} +clog () { # message [-n] + echo $2 $1 + log "$1" +} +slog () { # message + logger "$1" # if syslogd is running, this message will be sent to syslog. + log "$1" +} +logex () { # command + eval log \"Exec: $@\" + "$@" >> "$LOG_FILE" 2>&1 + return $? +} +do_warning () { # message + slog "Warning: $1" + warning "$1" +} +do_failure () { # message + slog "Error: $1" + failure "$1" +} +do_success () { # message + log "Pass: $1" + success "$1" +} +# Normalize options +check_bool () { # value + case $1 in + n|N|no|No|NO|0) + return 0;; + y|Y|yes|Yes|YES|1) + return 1;; + *) + return 2;; + esac +} +ask_yesno () { # message + local yn ret=2 + [ "$OPT_ASSUMEYES" ] && return 1 + while [ $ret -eq 2 ]; do + echo -n "$1 [y/N]: " + read yn + [ -z "$yn" ] && return 0 + check_bool $yn + ret=$? + done + return $ret +} + +#------------------------------------------------------------------ +# Parameter parsing and setup options +#------------------------------------------------------------------ +parse_args () { # arguments + while [ -n "$1" ]; do + case "$1" in + -c) + CONFIG=$2 + shift 1 + ;; + -r) + KRELEASE=$2 + shift 1 + ;; + -R) + OPT_RECURSIVE=1 + ;; + -y) + OPT_ASSUMEYES=1 + ;; + --) + ;; + *) + OPT_SCRIPTS=$OPT_SCRIPTS\ $1 + ;; + esac + shift 1 + done +} + +CMD=$1 +shift 1 +OPTS=`getopt -s bash -u -o 'r:c:R' -- $@` +if [ $? -ne 0 ]; then + slog "Error: Argument parse error: $@" + failure $"parse error" + echo_usage + exit 3 +fi +parse_args $OPTS + +# Include configs +. "$CONFIG" + +for f in "$CONFIG_PATH"/*.conf; do + if [ -f "$f" ]; then + . "$f" + fi +done + +check_bool $PASSALL +PASSALL=$? +check_bool $RECURSIVE +RECURSIVE=$? +if [ "$OPT_RECURSIVE" ]; then # -r option overrides RECURSIVE. + RECURSIVE=1 +fi +check_bool $AUTOCOMPILE +AUTOCOMPILE=$? +CACHE_PATH="$CACHE_PATH/$KRELEASE" + +check_bool $ALLOW_CACHEONLY +ALLOW_CACHEONLY=$? + +__get_all_scripts () { + local s + if [ $ALLOW_CACHEONLY -eq 1 ]; then + for s in "$CACHE_PATH"/*.ko; do + if [ -f "$s" ]; then + basename "$s" | sed s/\.ko$//g + fi + done + fi + for s in "$SCRIPT_PATH"/*.stp; do + if [ -f "$s" ]; then + basename "$s" | sed s/\.stp$//g + fi + done +} + +get_all_scripts() { + __get_all_scripts | sort | uniq +} + +if [ -z "$OPT_SCRIPTS" ]; then + SCRIPTS=`get_all_scripts | xargs` + RECURSIVE=1 +else + SCRIPTS="$OPT_SCRIPTS" +fi + +#------------------------------------------------------------------ +# Main routine +#------------------------------------------------------------------ +NR_FAILS=0 +might_fail () { # message exitcode + if [ $PASSALL -eq 1 ]; then + do_failure "$1" + echo + [ -z "$2" ] && exit 1 + exit $2 + else + log "Warning: "$1 + NR_FAILS=$((NR_FAILS+1)) + return 0 + fi +} +might_success () { # message + if [ $NR_FAILS -ne 0 ]; then + log "Warning: $NR_FAILS failure occured." + do_warning "$1" + else + do_success "$1" + fi + return 0 +} + +get_all_runnings () { + local f + for f in "$STAT_PATH"/*; do + if [ -f "$f" ]; then + basename "$f" + fi + done +} + +get_daemon_pid () { # script + cat "$STAT_PATH/$1" +} + +check_running () { # script + local m f + f="$STAT_PATH/$1" + m=`$LSMOD | grep "^$1 "` + if [ "$m" ]; then + [ -f "$f" ] && return 0 # running + return 4 # another script is running + else + [ -f "$f" ] && return 1 # dead, but pidfile remains + return 3 # dead + fi +} + +# check whether a script cache need to be updated. +check_cache () { # script opts + local s tmp tmp2 + s=$1; shift 1 + [ ! -f "$CACHE_PATH/$s.ko" -o ! -f "$CACHE_PATH/$s.opts" ] && return 1 + if [ $ALLOW_CACHEONLY -ne 1 -o -f "$SCRIPT_PATH/$s.stp" ]; then + [ "$SCRIPT_PATH/$s.stp" -nt "$CACHE_PATH/$s.ko" ] && return 2 + fi + tmp=`head -n 1 "$CACHE_PATH/$s.opts"` + tmp2=`$UNAME -a` + [ "$tmp" != "$tmp2" ] && return 3 + tmp=`tail -n 1 "$CACHE_PATH/$s.opts"` + tmp2="$*" + [ "$tmp" != "$tmp2" ] && return 4 + return 0 +} + +stap_getopt () { # opts + local ret + # TODO: support quoted options + getopt -s bash -u \ + -l 'kelf,kmap::,ignore-vmlinux,ignore-dwarf,vp:' \ + -o 'hVMvtp:I:e:o:R:r:m:kgPc:x:D:bs:uqwl:d:L:F' -- $@ + ret=$? + [ $ret -ne 0 ] && slog "Failed to parse parameters. ($@)" + return $ret +} + +get_compile_opts () { # opts + local opts o skip + opts=`stap_getopt $*` + [ $? -ne 0 ] && return 1 + skip=0 + for o in $opts; do + if [ $skip -ne 0 ]; then skip=0; continue; fi + case $o in + -p|-m|-r|-c|-x|-e|-s|-o) + skip=1 ;; + -h|-V|-k) + ;; + *) + echo -n $o" " ;; + esac + done +} + +get_run_opts () { # normalized_opts + local opts o show + opts=`stap_getopt $*` + [ $? -ne 0 ] && return 1 + show=0 + for o in $opts; do + case $o in + -c|-x|-s|-o) + [ $o == '-s' ] && o='-b' + echo -n $o" " + show=1 + ;; + *) + if [ $show -ne 0 ]; then + echo -n $o" " + show=0 + fi + ;; + esac + done +} + +prepare_cache_dir () { + if [ ! -d "$CACHE_PATH" ]; then + logex mkdir -p "$CACHE_PATH" + [ $? -ne 0 ] && return 1 + fi + return 0 +} + +prepare_stat_dir () { + if [ ! -d "$STAT_PATH" ]; then + logex mkdir -p "$STAT_PATH" + [ $? -ne 0 ] && return 1 + fi + return 0 +} + +compile_script () { # script checkcache + local opts f tmpdir ret + eval f="$SCRIPT_PATH/$1.stp" + if [ ! -f "$f" ]; then + if [ $ALLOW_CACHEONLY -eq 1 ]; then + clog "Warning: no script file($f). Use compiled cache." + return 0 + else + clog "Error: no script file($f)." + return 1 + fi + fi + + eval opts=\$$1_OPT + opts=`get_compile_opts $opts` + [ $? -ne 0 ] && return 2 + + if [ "$2" = "check" ]; then + check_cache $1 $opts + [ $? -eq 0 ] && return 0 # already compiled + if [ $AUTOCOMPILE -eq 0 ]; then + slog "No valid cache for $1" + return 1 + fi + fi + + clog " Compiling $1 ... " -n + tmpdir=`mktemp -d -p "$TEMP_PATH" cache.XXXXXXXX` + if [ $? -ne 0 ]; then + clog "failed to create temporary directory." + return 1 + fi + pushd "$tmpdir" &> /dev/null + logex $STAP -m "$1" -p4 -r $KRELEASE $opts "$f" + ret=$? + if [ $ret -eq 0 ]; then + $UNAME -a > "$1.opts" + echo $opts >> "$1.opts" + logex mv "$1.ko" "$1.opts" "$CACHE_PATH/" + ret=$? + else + slog "Failed to compile script($1)." + fi + popd &> /dev/null + rm -rf $tmpdir + [ $ret -eq 0 ] && clog "done" || clog "error" + return $ret +} + +# dependency resolver +__SORTED= +__follow_dependency () { # script requesters + local opts r reqs s ret + s=$1 + shift 1 + r=`echo \ $*\ | grep \ $s\ ` + if [ -n "$r" ]; then + might_fail $"Dependency loop detected on $s" + return 1 + fi + r=`echo \ $__SORTED\ | grep \ $s\ ` + [ -n "$r" ] && return 0 # already listed up + eval reqs=\$${s}_REQ + if [ -n "$reqs" ]; then + for r in $reqs; do + __follow_dependency $r $s $* + ret=$? + if [ $ret -ne 0 ]; then + return $ret # if one of requires failed, we can't run this script. + fi + done + fi + echo -n "$s " + return 0 +} + +sort_dependency () { # scripts + local s r=0 + __SORTED= + for s in $*; do + __SORTED="$__SORTED "`__follow_dependency $s` + [ $? -ne 0 ] && return 1 + done + echo $__SORTED + return 0 +} + +start_script () { # script + local tmpdir s=$1 + check_running $s + ret=$? + [ $ret -eq 0 ] && return 0 # already running + if [ $ret -eq 4 ]; then + clog "$s is dead, but another script is running." + return 4 + fi + + compile_script $s check + ret=$? + [ $ret -ne 0 ] && return $ret + + eval opts=\$${s}_OPT + opts=`get_run_opts $opts` + [ $? -ne 0 ] && return 2 + + clog " Starting $1 ... " -n + tmpdir=`mktemp -d -p "$TEMP_PATH" cache.XXXXXXXX` # bz7097 + if [ $? -ne 0 ]; then + clog "failed to create temporary directory." + return 1 + fi + pushd "$tmpdir" &> /dev/null + logex $STAPRUN -L $opts "$CACHE_PATH/$s.ko" + ret=$? + if [ $ret -eq 0 ]; then + # TODO: store daemon pid after supporting on-file flight recorder + echo 0 > "$STAT_PATH/$s" + fi + popd &> /dev/null + rm -rf "$tmpdir" + [ $ret -eq 0 ] && clog "done" || clog "error" + return $ret +} + +start () { + local scripts s ret + clog $"Starting $prog: " -n + + if [ -n "$DEFAULT_START" -a -z "$OPT_SCRIPTS" ]; then + SCRIPTS="$DEFAULT_START" + fi + + if [ -z "$SCRIPTS" ]; then + do_warning $"no scripts exist." + return 5 # program is not installed + fi + + prepare_stat_dir + if [ $? -ne 0 ]; then + do_failure $"Failed to make stat directory ($STAT_PATH)" + return 1 + fi + prepare_cache_dir + if [ $? -ne 0 ]; then + do_failure $"Failed to make cache directory ($CACHE_PATH)" + return 1 + fi + + if [ $RECURSIVE -eq 1 ]; then + SCRIPTS=`sort_dependency $SCRIPTS` + if [ $? -ne 0 ]; then + do_failure $"Failed to sort dependency" + return 6 # program is not configured + fi + fi + for s in $SCRIPTS; do + start_script "$s" + ret=$? + if [ $ret -ne 0 ]; then + might_fail $"Failed to run \"$s\". ($ret)" + fi + done + might_success $"$prog startup" + return 0 +} + +stop_script () { # script + local p + check_running "$1" + ret=$? + [ $ret -eq 1 ] && rm -f "$STAT_PATH/$1" + [ $ret -ne 0 ] && return 0 + + p=`get_daemon_pid $1` + if [ $p -ne 0 ]; then + logex killall -TERM $p + else + logex $STAPRUN -d "$1" + fi + [ $? -ne 0 ] && return 1 + rm -f "$STAT_PATH/$1" + return $? +} + +stop () { + local s sl= + clog $"Stopping $prog: " -n + [ -z "$OPT_SCRIPTS" ] && SCRIPTS=`get_all_runnings` + if [ $RECURSIVE -eq 1 ]; then + SCRIPTS=`sort_dependency $SCRIPTS` + if [ $? -ne 0 ]; then + do_failure $"Failed to sort dependency" + return 6 # program is not configured + fi + fi + for s in $SCRIPTS; do + sl="$s $sl" + done + for s in $sl; do + stop_script $s + [ $? -ne 0 ] && might_fail $"Failed to run \"$s\". " + done + might_success $"$prog stopping " + return 0 +} + +status () { + local s pid ret r + [ -z "$SCRIPTS" ] && SCRIPTS=`get_all_runnings` + ret=3 + for s in $SCRIPTS; do + check_running $s + r=$? + [ $ret -ne 0 ] && ret=$r + case $r in + 0) + pid=`get_daemon_pid $s` + [ $pid -ne 0 ] && pid="($pid)" || pid= + echo $"$s$pid is running..." ;; + 1|3) echo $"$s is stopped" ;; + 4) echo $"$s is dead, but another script is running.";; + esac + done + return $ret +} + +compile () { + local s ss + clog $"Compiling $prog: " -n + prepare_cache_dir + if [ $? -ne 0 ]; then + do_failure $"Failed to make cache directory ($CACHE_PATH)" + return 1 + fi + for s in $SCRIPTS; do + ss="$ss "`ls "$CACHE_PATH/$s.ko" "$CACHE_PATH/$s.opts" 2> /dev/null` + done + ss=`echo -n $ss` + if [ "$ss" ]; then + clog "Updating caches: $ss" + ask_yesno "Do you really want to update above caches" + [ $? -eq 0 ] && return 0 + fi + for s in $SCRIPTS; do + compile_script $s nocheck + [ $? -ne 0 ] && might_fail $"$s compilation failed " + done + might_success $"$prog compiled " + return 0 +} + +# Cleanup caches +cleanup () { + local s ss ret + clog $"Cleaning up $prog: " -n + if [ ! -d "$CACHE_PATH" ]; then + do_success "no cache" + return 0 + fi + + for s in $SCRIPTS; do + ss="$ss "`ls "$CACHE_PATH/$s.ko" "$CACHE_PATH/$s.opts" 2> /dev/null` + done + ss=`echo -n $ss` + if [ "$ss" ]; then + echo "Removing caches: $ss" + ask_yesno "Do you really want to remove above caches" + [ $? -eq 0 ] && return 0 + for s in $SCRIPTS; do + logex rm -f "$CACHE_PATH/$s.ko" "$CACHE_PATH/$s.opts" + [ $? -ne 0 ] && might_fail $"failed to clean cache $s.ko" + done + might_success "done" + return 0 + fi +} + +RETVAL=0 + +case $CMD in + start) + start + RETVAL=$? + ;; + stop) + stop + RETVAL=$? + ;; + restart|force-reload) + stop + start + RETVAL=$? + ;; + status) + status + RETVAL=$? + ;; + compile) + compile + RETVAL=$? + ;; + cleanup) + cleanup + RETVAL=$? + ;; + *) + echo_usage + RETVAL=3 + ;; +esac + +echo +exit $RETVAL @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-10-14.15 +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -48,7 +48,7 @@ IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else @@ -58,34 +58,49 @@ fi # Put in absolute file names if you don't have them in your path; # or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 +chgrpcmd= chmodcmd=$chmodprog chowncmd= -chgrpcmd= -stripcmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -95,65 +110,55 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; + + -C) copy_on_change=true;; - -d) dir_arg=true - shift - continue;; + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - shift - shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac - continue;; + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) dst_arg=$2 + shift;; - -T) no_target_directory=true - shift - continue;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; @@ -165,21 +170,22 @@ while test $# -ne 0; do *) break;; esac + shift done -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do - if test -n "$dstarg"; then + if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" + set fnord "$@" "$dst_arg" shift # fnord fi shift # arg - dstarg=$arg + dst_arg=$arg done fi @@ -224,7 +230,7 @@ for src do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then @@ -242,22 +248,22 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst @@ -378,26 +384,19 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; esac - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac + eval "$initialize_posix_glob" oIFS=$IFS IFS=/ - $posix_glob && set -f + $posix_glob set -f set fnord $dstdir shift - $posix_glob && set +f + $posix_glob set +f IFS=$oIFS prefixes= @@ -459,41 +458,54 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 trap '' 0 fi diff --git a/loc2c-test.c b/loc2c-test.c index c39ab061..a584c024 100644 --- a/loc2c-test.c +++ b/loc2c-test.c @@ -502,3 +502,5 @@ main (int argc, char **argv) return 0; } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -1021,6 +1021,43 @@ c_translate_location (struct obstack *pool, return NULL; } +/* Translate a C fragment for a direct argument VALUE. On errors, call FAIL, + which should not return. Any later errors will use FAIL and FAIL_ARG from + this translate call. On success, return the fragment created. */ +struct location * +c_translate_argument (struct obstack *pool, + void (*fail) (void *arg, const char *fmt, ...) + __attribute__ ((noreturn, format (printf, 2, 3))), + void *fail_arg, + void (*emit_address) (void *fail_arg, + struct obstack *, Dwarf_Addr), + int indent, const char *value) +{ + indent += 2; + + obstack_printf(pool, "%*saddr = %s;\n", indent * 2, "", value); + obstack_1grow (pool, '\0'); + char *program = obstack_finish (pool); + + struct location *loc = obstack_alloc (pool, sizeof *loc); + loc->next = NULL; + loc->fail = fail; + loc->fail_arg = fail_arg; + loc->emit_address = emit_address; + loc->ops = NULL; + loc->nops = 0; + loc->byte_size = 0; + loc->type = loc_address; + loc->frame_base = NULL; + loc->address.declare = NULL; + loc->address.program = program; + loc->address.stack_depth = 0; + loc->address.used_deref = false; + + return loc; +} + + /* Emit "uintNN_t TARGET = ...;". */ static bool emit_base_fetch (struct obstack *pool, Dwarf_Word byte_size, @@ -1914,3 +1951,5 @@ c_emit_location (FILE *out, struct location *loc, int indent) } #undef emit + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -85,6 +85,21 @@ c_translate_pointer_store (struct obstack *pool, int indent, Dwarf_Die *typedie, struct location **input, const char *rvalue); +/* Translate a C fragment for a direct argument VALUE. On errors, call FAIL, + which should not return. Any later errors will use FAIL and FAIL_ARG from + this translate call. On success, return the fragment created. */ +struct location *c_translate_argument (struct obstack *, + void (*fail) (void *arg, + const char *fmt, ...) + __attribute__ ((noreturn, + format (printf, 2, 3))), + void *fail_arg, + void (*emit_address) (void *fail_arg, + struct obstack *, + Dwarf_Addr), + int indent, const char *value); + + /* Emit the C fragment built up at LOC (i.e., the return value from the first c_translate_location call made). INDENT should match that @@ -93,3 +108,5 @@ c_translate_pointer_store (struct obstack *pool, int indent, Writes complete lines of C99, code forming a complete C block, to STREAM. Return value is true iff that code uses the `deref' runtime macros. */ bool c_emit_location (FILE *stream, struct location *loc, int indent); + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -1,5 +1,5 @@ // systemtap translator/driver -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-2009 Red Hat Inc. // Copyright (C) 2005 IBM Corp. // Copyright (C) 2006 Intel Corporation. // @@ -51,7 +51,7 @@ version () << "SystemTap translator/driver " << "(version " << VERSION << "/" << dwfl_version (NULL) << " " << GIT_MESSAGE << ")" << endl - << "Copyright (C) 2005-2008 Red Hat, Inc. and others" << endl + << "Copyright (C) 2005-2009 Red Hat, Inc. and others" << endl << "This is free software; see the source for copying conditions." << endl; } @@ -355,6 +355,7 @@ main (int argc, char * const argv []) s.buffer_size = 0; s.last_pass = 5; s.module_name = "stap_" + stringify(getpid()); + s.stapconf_name = "stapconf_" + stringify(getpid()) + ".h"; s.output_file = ""; // -o FILE s.keep_tmpdir = false; s.cmd = ""; @@ -1175,3 +1176,5 @@ pass_5: return (rc||pending_interrupts) ? EXIT_FAILURE : EXIT_SUCCESS; } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/man/ChangeLog b/man/ChangeLog deleted file mode 100644 index 98c22b84..00000000 --- a/man/ChangeLog +++ /dev/null @@ -1,24 +0,0 @@ - -2007-09-04 Srinivasa DS <srinivasa@in.ibm.com> - - * stapprobes.task.5.in: New task tapset man page. - -2007-01-23 Mike Mason <mmlnx@us.ibm.com> - - * stapprobes.socket.5.in: New sockets tapset man page. - -2006-10-18 Li Guanglei <guanglei@cn.ibm.com> - * stapprobes.iosched.5.in: update - -2006-10-10 Li Guanglei <guanglei@cn.ibm.com> - - * stapprobes.signal.5.in: document signal syscall - -2006-09-29 Li Guanglei <guanglei@cn.ibm.com> - - * stapprobes.iosched.5.in, stapprobes.netdev.5.in, stapprobes.nfs.5.in, - stapprobes.nfsd.5.in, stapprobes.pagefault.5.in, stapprobes.process.5.in, - stapprobes.rpc.5.in, stapprobes.scsi.5.in, stapprobes.signal.5.in, - stapprobes.tcp.5.in, stapprobes.udp.5.in: Some of these man pages are from - the old stapprobes.5.in. Some are newly created(rpc, nfs, nfsd) - * man/.cvsignore: ignore the generated man page files @@ -216,3 +216,5 @@ mdfour(unsigned char *out, const unsigned char *in, int n) mdfour_update(&md, NULL, 0); mdfour_result(&md, out); } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -34,6 +34,4 @@ void mdfour_update(struct mdfour *md, const unsigned char *in, int n); void mdfour_result(struct mdfour *md, unsigned char *out); void mdfour(unsigned char *out, const unsigned char *in, int n); - - - +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -1,5 +1,5 @@ // recursive descent parser for systemtap scripts -// Copyright (C) 2005-2007 Red Hat Inc. +// Copyright (C) 2005-2009 Red Hat Inc. // Copyright (C) 2006 Intel Corporation. // Copyright (C) 2007 Bull S.A.S // @@ -2331,7 +2331,54 @@ parser::parse_symbol () bool pf_stream, pf_format, pf_delim, pf_newline, pf_char; - if (name.size() > 0 && name[0] == '@') + if (name == "@cast") + { + // type-punning time + cast_op *cop = new cast_op; + cop->tok = t; + cop->base_name = name; + expect_op("("); + cop->operand = parse_expression (); + expect_op(","); + expect_unknown(tok_string, cop->type); + if (peek_op (",")) + { + next(); + expect_unknown(tok_string, cop->module); + } + expect_op(")"); + while (true) + { + string c; + if (peek_op ("->")) + { + next(); + expect_ident_or_keyword (c); + cop->components.push_back + (make_pair (target_symbol::comp_struct_member, c)); + } + else if (peek_op ("[")) + { + next(); + expect_unknown (tok_number, c); + expect_op ("]"); + cop->components.push_back + (make_pair (target_symbol::comp_literal_array_index, c)); + } + else + break; + } + // if there aren't any dereferences, then the cast is pointless + if (cop->components.empty()) + { + expression *op = cop->operand; + delete cop; + return op; + } + return cop; + } + + else if (name.size() > 0 && name[0] == '@') { stat_op *sop = new stat_op; if (name == "@avg") @@ -2558,3 +2605,4 @@ parser::parse_symbol () return sym; } +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -209,3 +209,5 @@ private: // nonterminals #endif // PARSE_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/runtime/ChangeLog b/runtime/ChangeLog deleted file mode 100644 index ca299a8c..00000000 --- a/runtime/ChangeLog +++ /dev/null @@ -1,2432 +0,0 @@ -2008-12-15 Mark Wielaard <mjw@redhat.com> - - * runtime.h: Just include task_finder.c instead of defining parts - of it here. - * sym.c (_stp_mod_sec_lookup): Add dbug_sym statements. - * task_finder_vma.c: Define __stp_tf_vma_entry here. - -2008-12-10 Mark Wielaard <mjw@redhat.com> - - * runtime.h: Define __stp_tf_vma_entry here. - * sym.c (_stp_mod_sec_lookup): Try vma matching first if task given. - (_stp_kallsyms_lookup): Take an optional task. - (_stp_symbol_snprint): Likewise. - task_finder.c (__stp_tf_vm_cb): Use vm_path to match and attach - module to vma entry. - task_finder_vma.c (stap_add_vma_map_info): Take an optional module. - (__stp_tf_get_vma_entry_addr): New lookup function. - -2009-01-20 David Smith <dsmith@redhat.com> - - PR 9673. - * task_finder.c (struct stap_task_finder_target): Added - 'vm_events' field. - (stap_register_task_finder_target): Sets vm_events if a - vm_callback is present. - (__stp_task_finder_cleanup): Only detaches engines on the main - __stp_task_finder_list linked list. - (__stp_call_callbacks): New function. - (__stp_call_vm_callbacks): New function. - (__stp_utrace_attach_match_filename): Calls __stp_call_callbacks() - to call callbacks. - (__stp_utrace_task_finder_target_death): Ditto. - (__stp_utrace_task_finder_target_quiesce): Calls - __stp_call_callbacks() and __stp_call_vm_callbacks() to call - callbacks. - (__stp_call_vm_callbacks_with_vma): Renamed from - __stp_target_call_vm_callback. - (__stp_utrace_task_finder_target_syscall_exit): Calls - __stp_call_vm_callbacks() to call vm callbacks. - (stap_start_task_finder): Instead of a utrace engine for every - task_finder_target, there is now one utrace engine for all targets - with the same path or pid. - -2009-01-13 Jim Keniston <jkenisto@us.ibm.com> - - PR 7082. - * uprobes2/uprobes.c: On exec, free up outstanding - uretprobe_instances and tick down the uproc's ref-count - accordingly, so the (old image's) uproc goes away as - desired. - -2009-01-12 Wenji Huang <wenji.huang@oracle.com> - - * transport/symbols.c (_stp_sort): Adapt it to 2.6.29. - -2009-01-06 Frank Ch. Eigler <fche@elastic.org> - - PR9699. - * autoconf-task-uid.c: New test. - -2008-12-21 Stan Cox <scox@redhat.com> - - * sduprobes.h (STAP_PROBE): Put block around probe point. - -2008-12-16 Stan Cox <scox@redhat.com> - - * sduprobes.h (STAP_PROBE): Add synthetic reference to probe label. - -2008-12-09 Frank Ch. Eigler <fche@elastic.org> - - * time.c (_stp_gettimeofday_ns): Protect some more against freq=0. - -2008-12-08 Wenji Huang <wenji.huang@oracle.com> - - * uprobes2/uprobes_x86.c (handle_riprel_insn): Fix the warning. - -2008-12-04 Stan Cox <scox@redhat.com> - - * sduprobes.c (STAP_PROBE_START): Remove. - * sduprobes.h (STAP_PROBE_START): Remove. - (DTRACE_PROBE): New. - -2008-11-26 Stan Cox <scox@redhat.com> - - * sduprobes.h (STAP_PROBE1): Add USE_STAP_DEBUGINFO_PROBE. - -2008-11-26 Frank Ch. Eigler <fche@elastic.org> - - PR 4886. - * sym.c (_stp_module_check): Perform assertive - build-id checking for kernel versions >= 2.6.27. - -2008-11-26 Frank Ch. Eigler <fche@elastic.org> - - * autoconf-synchronize-sched.c: New file. - -2008-11-25 Frank Ch. Eigler <fche@elastic.org> - - PR 7046. - * task_finder.c (__stp_utrace_task_finder_target_quiesce): Only - issue vm_callbacks for process main threads. - -2008-11-24 Wenji Huang <wenji.huang@oracle.com> - - From Srikar Dronamraju: - * runtime.h: Use for_each_cpu_mask always. - -2008-11-11 Stan Cox <scox@redhat.com> - - * sduprobes.c: New file. - * sduprobes.h: New file. - -2008-11-17 Wenji Huang <wenji.huang@oracle.com> - - * runtime.h: Rename for_each_cpu to stp_for_each_cpu for 2.6.28. - * counter.c: Ditto. - * map-stat.c: Ditto. - * map.c: Ditto. - * pmap-gen.c: Ditto. - * stat.c: Ditto. - * transport/procfs.c: Ditto. - -2008-11-04 David Smith <dsmith@redhat.com> - - PR 5274. - * syscall.h: Added s390 task_finder support. - - From Jim Keniston, PR 5274. - * uprobes/uprobes_s390.h (arch_get_cur_sp): New function. - (arch_predict_sp_at_ret): Ditto. - -2008-11-04 Frank Ch. Eigler <fche@elastic.org> - - From Masami Hiramatsu <mhiramat@redhat.com>, PR 6028. - * regs-ia64.c (bspcache): Expand documentation. - -2008-10-28 Frank Ch. Eigler <fche@elastic.org> - - From Jim Keniston: - * autoconf-oneachcpu-retry.c: Tweak #include's for broader - compatibility. - -2008-10-24 Josh Stone <joshua.i.stone@intel.com> - - * autoconf-hrtimer-getset-expires.c: New file. - -2008-10-17 Wenji Huang <wenji.huang@oracle.com> - - * task_finder_vma.c (__stp_tf_vma_get_free_entry): Initialize entry. - -2008-10-07 Frank Ch. Eigler <fche@elastic.org> - - PR 4886. - * sym.c (_stp_module_check): Tweak & simplify build-id checking. - Weaken consequences of mismatch temporarily due to fedora bug. - * sym.h: Eliminate special cased values of module->notes_sect. - -2008-10-06 Mark Wielaard <mjw@redhat.com> - - * utrace_compatibility.h: Add workaround for fedora 9 2.6.26 kernels. - -2008-10-06 Wenji Huang <wenji.huang@oracle.com> - - PR 4886 - * sym.h (_stp_module): Add several fields to store build-id. - * sym.c (_stp_module_check): New function to check build-id. - * staprun/staprun.c (send_relocation_kernel): Send build-id of runtime - kernel if there. - * transport/symbols.c (_stp_do_relocation): Update note section. - (_stp_section_is_interesting): No filter to .note.gnu.build-id. - -2008-10-03 Mark Wielaard <mjw@redhat.com> - - * procfs.c (_stp_rmdir_proc_module): Remove debug output from warning. - -2008-10-03 Mark Wielaard <mjw@redhat.com> - - * procfs.c (_stp_rmdir_proc_module): Usage count warning - depends on kernel version. - -2008-10-02 Tim Moore <timoore@redhat.com> - - * addr-map.c (add_bad_addr_entry): Fix bugs in allocating a new - table and copying old entries into the new table. - -2008-09-30 Tim Moore <timoore@redhat.com> - - * addr-map.c (add_bad_addr_entry): Rewrite allocation of address - table to simplify locking and eliminate a race condition. - -2008-09-26 David Smith <dsmith@redhat.com> - - * task_finder.c (__STP_ATTACHED_TASK_EVENTS): Removed UTRACE_STOP, - which isn't needed anymore. - -2008-09-25 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_utrace_attach): Added action flag to know - to request the thread to be stopped or not. - (stap_utrace_attach): Now just calls __stp_utrace_attach(). - (__stp_utrace_task_finder_target_quiesce): Handles - utrace_set_events() errors properly. - - * utrace_compatibility.h (enum utrace_resume_action): Added - utrace_resume_action enum. - (utrace_control): Added UTRACE_STOP support. - (utrace_engine_put): New. - (utrace_barrier): New. - -2008-09-17 Frank Ch. Eigler <fche@elastic.org> - - PR 6487, 6504. - From Masami Hiramatsu <mhiramat@redhat.com> - * print_new.c (stp_print_flush): Use new utt_reserve(). - -2008-09-12 Masami Hiramatsu <mhiramat@redhat.com> - - BZ 6028 - * regs-ia64.c (bspcache): Use REG_IP instead of pp to check probe - address. - -2008-09-12 David Smith <dsmith@redhat.com> - - BZ 6755 - * task_finder.c: Added 'inuse' count to know when handlers are still - running. - (__stp_utrace_task_finder_report_clone): If state isn't correct, - detach. Increase 'inuse' count when starting, decrement when - exiting. - (__stp_utrace_task_finder_report_exec): Ditto. - (__stp_utrace_task_finder_target_death): Ditto. - (__stp_utrace_task_finder_target_quiesce): Increase 'inuse' count - when starting, decrement when exiting. - (__stp_utrace_task_finder_target_syscall_entry): Ditto. - (__stp_utrace_task_finder_target_syscall_exit): Ditto. - (stap_stop_task_finder): Wait until all callbacks are finished. - -2008-09-10 Frank Ch. Eigler <fche@elastic.org> - - * runtime.h (STP_USE_FRAME_POINTER): Remove architecture #if's. - All will activate it if CONFIG_FRAME_POINTER unless - STP_USE_DWARF_UNWINDER. - * stack-i386.c: (__stp_stack_print): Handle !DWARF and !FRAME - configuration. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * sym.h (_stp_module): Rename module_base to dwarf_module_base. - * unwind.c (adjustStartLoc): Document and use dwarf_module_base. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * runtime.h (CONFIG_FRAME_POINTER): Don't enable when - STP_USE_DWARF_UNWINDER is already defined. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * sym.h (_stp_module): Add module_base field. - * unwind.c (adjustStartLoc): New function. - (_stp_search_unwind_hdr): Use adjustStartLoc. - (unwind): Likewise. - -2008-09-10 Mark Wielaard <mjw@redhat.com> - - * unwind.c (unwind): Use _stp_mod_sec_lookup to get module and - unwind tables. - * runtime.h (STP_USE_FRAME_BUFFER): Disable by default for now. - * stack-x86_64.c (__stp_stack_print): Add levels to - _stp_stack_print_fallback call. - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * regs-ia64.c (__ia64_fetch_register): Return the address of the - register. - (ia64_fetch_register): Use __ia64_fetch_register. - * syscall.h (____stp_user_syscall_arg): Use __ia64_fetch_register. - (__stp_user_syscall_arg): Wrapping ____stp_user_syscall_arg to pass the - unwind address cache. - * task_finder.c (__stp_utrace_task_finder_target_syscall_): Added dummy - unwind address cache. - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * syscall.h: Added ia64 support. - -2008-09-09 Mark Wielaard <mwielaard@redhat.com> - - * sym.c (_stp_mod_sec_lookup): New function, extracted from - _stp_kallsyms_lookup. - -2008-09-09 Mark Wielaard <mwielaard@redhat.com> - - * sym.c (_stp_kallsyms_lookup): Correct this_section_offset - calculation. - -2008-09-08 Tim Moore <timoore@redhat.com> - - PR 1288 - * addr-map.c: New file with functions for looking up addresses - * loc2c-runtime.h (deref, store_deref): Use lookup_bad_addr to - avoid dereferencing known dangerous addresses. - * runtime.h: Include addr-map.c. - -2008-09-06 Frank Ch. Eigler <fche@elastic.org> - - PR 6445 - * task_finder.c (stap_start_task_finder): When _stp_target - is set (stap -c or -x mode), restrict initial utrace attach - iteration to target process only. - -2008-09-01 Frank Ch. Eigler <fche@elastic.org> - - * task_finder.c: Move CONFIG_UTRACE assertion here. - * task_finder_vma.c (__stp_tf_add_vma): Make printk conditional. - -2008-08-29 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_utrace_attach_match_filename): Don't call - the callback when the interesting thread is found, call it when - the tread is quiesced. - (stap_start_task_finder): Ditto. - (__stp_utrace_task_finder_target_quiesce): Call the callback. - -2008-08-26 David Smith <dsmith@redhat.com> - - * autoconf-d_path-path.c: New file. - - * task_finder.c (__stp_get_mm_path): Uses STAPCONF_DPATH_PATH - instead of a kernel version check to determine how to call - d_path(). - (__stp_utrace_task_finder_target_quiesce): Ditto. - (__stp_target_call_vm_callback): Ditto. - -2008-08-21 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_tf_vm_cb): Added task finder target - parameter. - (__stp_utrace_attach_match_filename): Updated task finder callback - call. - (__stp_utrace_task_finder_target_death): Ditto. - (__stp_utrace_task_finder_target_quiesce): Ditto. - (__stp_target_call_vm_callback): Ditto. - (__stp_utrace_task_finder_target_syscall_exit): Ditto. - (stap_start_task_finder): Ditto. - -2008-08-20 David Smith <dsmith@redhat.com> - - * task_finder.c: Supports original and new utrace interfaces. - * utrace_compatibility.h (utrace_attach_task): Compatibility layer - for original utrace interface. - - * task_finder.c (__stp_utrace_task_finder_target_syscall_entry): - Handles mmap2 (as well as mmap). - (__stp_utrace_task_finder_target_syscall_exit): Ditto. - * syscall.h: Added defines for mmap and mmap2. - -2008-08-19 David Smith <dsmith@redhat.com> - - PR 6841 - * task_finder.c (__stp_utrace_task_finder_target_quiesce): - Quiesces thread before turning on syscall tracing. - -2008-08-14 Frank Ch. Eigler <fche@elastic.org> - - PR 6842. - * task_finder.c (__stp_utrace_task_finder_target_death): Tolerate - null tsk->signal. - -2008-08-12 David Smith <dsmith@redhat.com> - - PR 6445 (partial) - * task_finder.c (stap_register_task_finder_target): Handles - probing all threads. - (__stp_utrace_attach_match_filename): Ditto. - (stap_start_task_finder): Ditto. - -2008-08-08 David Smith <dsmith@redhat.com> - - * task_finder.c (stap_utrace_detach): New function. - (stap_utrace_detach_ops): Calls stap_utrace_detach(). - (__stp_utrace_attach_match_filename): Ditto. - - * task_finder.c (__stp_tf_vm_cb): Added calls to save/delete vma - information. - * task_finder_vma.c (__stp_tf_vma_map_hash): New function. - (__stp_tf_get_vma_map_entry_internal): Ditto. - (stap_add_vma_map_info): Ditto. - (stap_remove_vma_map_info): Ditto. - (stap_find_vma_map_info): Ditto. - -2008-07-24 Josh Stone <joshua.i.stone@intel.com> - - * runtime/autoconf-module-nsections.c: removed - * runtime/autoconf-oneachcpu-retry.c: added - -2008-07-21 David Smith <dsmith@redhat.com> - - * task_finder_vma.c (__stp_tf_vma_initialize): New function to - initialize the free list. - (__stp_tf_vma_put_free_entry): Puts a vma entry back on the free - list. - (__stp_tf_add_vma): Instead of allocating a vma entry, grab one - from the free list by calling __stp_tf_vma_put_free_entry(). - (__stp_tf_remove_vma_entry): Instead of freeing a vma entry, call - __stp_tf_vma_put_free_entry() to put it on the free list instead. - * task_finder.c (stap_start_task_finder): Calls - __stp_tf_vma_initialize(). - -2008-07-18 Frank Ch. Eigler <fche@elastic.org> - - BZ 442528, From Masami Hiramatsu <mhiramat@redhat.com> - * regs-ia64.c (ia64_stap_get_arbsp): New function. - -2008-07-17 Frank Ch. Eigler <fche@elastic.org> - - * sym.c (_stp_kallsyms_lookup, _stp_module_relocate): Add - multiple-section-per-module support. - * sym.h (_stp_section): New type for separately relocatable - _stp_module pieces. - -2008-07-12 Frank Ch. Eigler <fche@elastic.org> - - PR 6738. - * loc2c-runtime.h: #include {asm,linux}/uaccess.h as autoconf'd. - * unwind/i386.h (user_mode_vm, FIX_VDSO): #ifdef for older kernels. - * unwind/x86_64.h (VSYSCALL_START): speculative #ifdef for same. - * unwind/unwind.h (BUILD_BUG_ON_ZER): Ditto. - -2008-07-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6736. - * sym.c (_stp_module_relocate): Generalized to search all - _stp_module[]s. - (_stp_kallsyms_lookup_name): Gone. - (_stp_find_module_by_addr): Rewritten. - (_stp_get_unwind_info): Temporarily gone. - * sym.h (_stp_module): Simplify structure. - * unwind.c: Adapt just enough to compile with eliminated elements. - - * probes.stp: Removed unused file. - -2008-07-09 Mark Wielaard <mwielaard@redhat.com> - - PR 6732 - * autoconf-real-parent.c: New file. - * task_finder.c (__stp_utrace_task_finder_report_exec): Define - real_parent using STAPCONF_REAL_PARENT. Undefine when no longer - needed. - -2008-07-01 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_get_mm_path): Corrected error return code. - (__stp_utrace_attach_match_tsk): Ignores ENOENT error from - __stp_get_mm_path(). - (stap_start_task_finder): Ditto. - -2008-06-30 David Smith <dsmith@redhat.com> - - * task_finder.c (stap_utrace_detach_ops): Removed check to see if - thread has a mm (in the case where a thread isn't quite dead - yet). - (stap_utrace_attach): Minor error handling improvement. - (__stp_utrace_attach_match_tsk): Ditto. - -2008-06-24 David Smith <dsmith@redhat.com> - - From: Srinivasa DS <srinivasa@in.ibm.com> - * syscall.h: Added powerpc support. - -2008-06-23 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_utrace_task_finder_target_quiesce): Fixed - vm_callback offset by shifting it left PAGE_SHIFT bits. - (__stp_target_call_vm_callback): Ditto. - (__stp_utrace_task_finder_target_syscall_exit): Ditto. - - * task_finder.c (__stp_utrace_task_finder_report_exec): Handles - relative exec paths correctly. - - * task_finder_vma.c (__stp_tf_vma_hash): Improved determination of - whether this is a 64-bit platform. - * syscall.h: Handles kernels with older style register - definitions. - - * task_finder.c (__stp_tf_vm_cb): New function. - (stap_register_task_finder_target): Sets up syscall entry and - syscall exit handlers. - (__stp_find_file_based_vma): New function. - (__stp_utrace_task_finder_target_syscall_entry): New function. - Saves vma information off at syscall entry. - (__stp_target_call_vm_callback): New function. - (__stp_utrace_task_finder_target_syscall_exit): New function. - Handles changes to memory maps based on information saved at - syscall entry. - * syscall.h: New file containing syscall function. - * task_finder_vma.c: New file containing saved vma information - handling functions. - - * regs.h: Removed trailing semicolons from macro definitions. - -2008-06-17 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_utrace_attach_match_filename): Uses new - __STP_ATTACHED_TASK_EVENTS macro to determine which events to set - on a newly found process based on whether the - stap_task_finder_target structure has a vm_callback defined. - (stap_start_task_finder): Ditto. - -2008-06-16 David Smith <dsmith@redhat.com> - - * task_finder.c (stap_start_task_finder): Improved callback - handling. - -2008-06-10 David Smith <dsmith@redhat.com> - - * task_finder.c (struct stap_task_finder_target): Added - vm_callback public field. - (stap_register_task_finder_target): Sets up .report_quiesce - handler. - (__stp_utrace_task_finder_target_quiesce): New function. - -2008-06-09 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_utrace_task_finder_report_exec): Handles - 2.6.25 kernels. - -2008-06-06 David Smith <dsmith@redhat.com> - - * task_finder.c: Added some debug logic. Use - '-DDEBUG_TASK_FINDER' to enable. - (stap_utrace_attach): Renamed from '__stp_utrace_attach'. - (__stp_utrace_attach_match_filename): Calls callback with - notification that this is a process or thread event. - (__stp_utrace_attach_match_tsk): Ditto. - (__stp_utrace_task_finder_report_clone): Ditto. - (__stp_utrace_task_finder_report_exec): Ditto. - (stap_utrace_task_finder_report_death): Ditto. - (stap_start_task_finder): Ditto. - (stap_stop_task_finder): Added debug logic. - -2008-05-29 Stan Cox <scox@redhat.com> - - * map.c (print_keytype): Remove. - (print_valtype): Remove. - (_stp_map_printn): Remove. - (_stp_map_print): Remove. - (_stp_pmap_printn): Remove. - * stat-common.c (_stp_stat_print_valtype): Remove. - * stat.c (__stp_stat_print): Remove. - (_stp_stat_print_cpu): Remove. - (_stp_stat_print): Remove. - * Makefile: Delete. - * tests: Delete. - * probes: Delete. - -2008-05-28 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_utrace_attach_match_filename): Added - register_p parameter, which is passed on to the callback. Only - adds death notification if register_p is 1. If register_p is 0, - removes death notification. - (__stp_utrace_attach_match_tsk): Moved code from - __stp_utrace_task_finder_report_clone that handles the details of - grabbing a task's path. - (__stp_utrace_task_finder_report_clone): Calls new - __stp_utrace_attach_match_tsk(). - (__stp_utrace_task_finder_report_exec): Notifies upper layer that - it might need to detach from newly exec'ed process.` - -2008-05-27 Josh Stone <joshua.i.stone@intel.com> - - PR 6432 - * loc2c-runtime.h (kread, kwrite, deref, store_deref): Add - architecture-neutral implementations, using probe_kernel_* - facilites (controlled by autoconf). - * autoconf-probe-kernel.c: test for above. - -2008-05-21 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_utrace_attach_match_filename): Added - event_flag parameter of event to pass to callback. - (__stp_utrace_task_finder_target_death): Ditto. - (__stp_utrace_task_finder_report_clone): Calls - __stp_utrace_attach_match_filename() with new argument. - (__stp_utrace_task_finder_report_exec): Ditto. - (stap_start_task_finder): Calls callback with an invalid - event_flag since this callback call isn't related to an event. - -2008-05-16 David Smith <dsmith@redhat.com> - - PR 6499. - * task_finder.c (stap_register_task_finder_target): Added error - check. - (__stp_utrace_task_finder_report_clone): Ditto. - (stap_utrace_detach_ops): Uses do_each_thread/while_each_thread - instead of for_each_process (which only iterated among process - group leaders instead of all threads). - (stap_start_task_finder): Ditto. - -2008-05-08 David Smith <dsmith@redhat.com> - - PR 6500. - * task_finder.c (__stp_utrace_task_finder_report_exec): Moved - attach logic to __stp_utrace_attach_match_filename(). - (__stp_utrace_attach_match_filename): New function. - (__stp_utrace_task_finder_report_clone): Calls - __stp_utrace_attach_match_filename() to attach to newly cloned - threads. - -2008-05-06 Masami Hiramatsu <mhiramat@redhat.com> - - PR 5648 - * print_old.c (stp_print_flush): Fix unaligned access warning on - ia64. - * print_new.c (stp_print_flush): Ditto. - -2008-05-06 Masami Hiramatsu <mhiramat@redhat.com> - - PR 5648 - * vsprintf.c (_stp_vsnprintf): Fix memcpy's endianess issue. - -2008-05-05 Frank Ch. Eigler <fche@elastic.org> - - PR 6481. - * time.c (__stp_time_timer_callback): Reenable irq's before - mod_timer. - -2008-05-05 David Smith <dsmith@redhat.com> - - * task_finder.c (stap_utrace_detach_ops): Make sure we ignore - /sbin/init. - (__stp_utrace_attach): Added function to handle details of - attaching a utrace engine. - (__stp_utrace_task_finder_report_clone): Calls - __stp_utrace_attach. - (__stp_utrace_task_finder_report_exec): Ditto. - (stap_start_task_finder): Ditto. - -2008-04-30 Masami Hiramatsu <mhiramat@redhat.com> - - PR 5648 - From Shaohua Li <shaohua.li@intel.com> - * vsprintf.c (_stp_vsnprintf): Fix unaligned access warning on ia64. - -2008-04-29 David Smith <dsmith@redhat.com> - - * task_finder.c: Made more robust by ensuring that all utrace - attaches have a corresponding utrace detach. - -2008-04-28 Frank Ch. Eigler <fche@elastic.org> - - * runtime.h (TEST_MODE): Remove. - -2008-04-25 David Smith <dsmith@redhat.com> - - From Srinivasa <srinivasa@in.ibm.com> - * task_finder.c (__stp_get_mm_path): Fixed kernel 2.6.25 change. - -2008-04-24 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_get_mm_path): Made kernel 2.6.25 changes. - -2008-04-16 David Smith <dsmith@redhat.com> - - * task_finder.c (__stp_get_mm_path): Made kernel 2.6.18 changes. - -2008-04-15 David Smith <dsmith@redhat.com> - - PR 5961 (partial) - * task_finder.c (stap_start_task_finder): When an interesting - thread is found that is already running, make sure to set up - thread death notification. - -2008-04-15 hunt <hunt@redhat.com> - * print.c (_stp_pbuf_full): Delete. - -2008-04-15 hunt <hunt@redhat.com> - * stack-x86_64.c (_stp_stack_print_fallback): Add levels. - (__stp_stack_print): Count levels properly. - -2008-04-15 Martin Hunt <hunt@redhat.com> - - Finish support for limits on backtrace depth. - * runtime.h (MAXTRACE): Default to 20. - * stack.c (_stp_stack_print): Call __stp_stack_print - with levels set properly. - * sym.c (_stp_func_print): Return a value indicating - if something was printed. - - Support for i386 and x86_64 on 2.6.25 kernel - * unwind/i386.h: Support unified registers on 2.6.25. - Remove unused frame stuff, including STACK_*. - * stack-i386.c (__stp_stack_print): Support unified - registers on 2.6.25. - * regs.h (REG_FP): Define for i386. - -2008-04-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6410. - * unwind.c, unwind.h: Make body conditional in STP_USE_DWARF_UNWINDER. - * stack-x86_64.c (__stp_stack_print): Tolerate !unwinder. - -2008-04-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6405 - * autoconf-module-nsections.c: New file. - -2008-04-15 Frank Ch. Eigler <fche@elastic.org> - - * unwind/i386.h (STACK_BOTTOM, STACK_TOP): Comment out these - unused definitions, for they collide with some kernels - (2.6.25-0.121.rc5.git4 rawhide). - -2008-04-13 Frank Ch. Eigler <fche@elastic.org> - - * print.c (_stp_pbuf_full): New function to note full print buffer. - * stack-{i386,x86_64}.c: Use it in all stack-searching loops, to - impose another limit against unbounded iteration. - -2008-03-31 Martin Hunt <hunt@redhat.com> - - * runtime.h (STP_USE_DWARF_UNWINDER): Define. - -2008-04-04 Masami Hiramatsu <mhiramat@redhat.com> - - PR 6028 - * loc2c-runtime.h (fetch_register): Call ia64_fetch_register with - the address of c->unwaddr. - * regs-ia64.c (ia64_fetch_register): Don't unwind stack if it has - already unwound stack in same probe. - -2008-03-30 Martin Hunt <hunt@redhat.com> - - * runtime.h (STP_USE_FRAME_POINTER): Define when frame pointers - are available in the kernel and can be used. - * stack-arm.c: Use STP_USE_FRAME_POINTER. - * stack-i386.c: Ditto. - * unwind/i386.h: Ditto. - * unwind/x86_64.h: Ditto. - -2008-04-04 David Smith <dsmith@redhat.com> - - PR 5961 (partial) - * task_finder.c: New file. - -2008-03-28 Martin Hunt <hunt@redhat.com> - - * copy.c (_stp_read_address): New function. Safely read - kernel or userspace. - -2008-03-26 Martin Hunt <hunt@redhat.com> - Fixes to get i386 working. - * unwind.c (unwind): Fix types in debug print. - * stack-i386.c (_stp_stack_print_fallback): New function. - (__stp_stack_print): Call _stp_stack_print_fallback() if unwinder - appears to fail. - -2008-03-25 Martin Hunt <hunt@redhat.com> - - * unwind.c (unwind): Return a positive number to indicate - that unwinding is done. - -2008-04-01 Frank Ch. Eigler <fche@elastic.org> - - * lket/*: Belatedly remove retired LKET code. - -2008-03-17 Eugene Teo <eteo@redhat.com> - - PR 5947 - * autoconf-tsc-khz.c: Remove "&& defined(__i386__)" to make the test - more pessimistic. - -2008-03-14 Masami Hiramatsu <mhiramat@redhat.com> - - PR 3542 - * autoconf-unregister-kprobes.c : New file. - -2008-03-10 Dave Brolley <brolley@redhat.com> - - PR5189 - * vsprintf.c (_stp_vsnprintf): Arguments for dynamic width and precision - are of type 'int' again. - * loc2c-runtime.h (deref_string): Copy the data only if dst is not NULL. - (deref_buffer): New macro. - -2008-02-27 Martin Hunt <hunt@redhat.com> - - * sym.h (_stp_module): Add text_size, lock, and unwind data - pointer. - * sym.c (_stp_find_module_by_addr): New function. - (_stp_kallsyms_lookup): Call _stp_find_module_by_addr(). - (_stp_get_unwind_info): New. - - * runtime.h: Move debug macros to debug.h. Include it. - * debug.h: New file. - * map.c: Update debug calls. - * map-gen.c: Update debug calls. - * pmap-gen.c: Update debug calls. - - * mempool.c: New file. - -2008-02-27 Dave Brolley <brolley@redhat.com> - - PR5189 - * vsprintf.c (_stp_vsnprintf): Extract arguments of type int64_t for - dynamic width and precision. Implement width and precision correctly for - the %b format specifier. Implement the %m specifier. - -2008-02-06 Masami Hiramatsu <mhiramat@redhat.com> - - * stack-ia64.c (__stp_show_stack_sym): Skip printing symbol if (ip == - REG_IP(regs)). - -2008-01-29 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_vlog): Use get_cpu() instead - of smp_processor_id() because this function can get - called with interrupts enabled. - -2008-01-29 Martin Hunt <hunt@redhat.com> - - * alloc.c (struct _stp_malloc_type): Remove - redundant field. - -2008-01-28 Martin Hunt <hunt@redhat.com> - - * alloc.c: Use DEFINE_SPINLOCK. - * counter.c: Ditto. - * pmap-gen.c: Ditto. - * print_new.c: Ditto. - * stat.c: Ditto. - -2008-01-27 Frank Ch. Eigler <fche@elastic.org> - - * stack-i386.c (__stp_stack_print): Correct #elif->#else typo. - -2008-01-14 Martin Hunt <hunt@redhat.com> - - * print.c (_stp_print_kernel_info): New function. - (all): Call stp memory functions. - - * alloc.c: Rewrite to track allocated memory if - DEBUG_MEM is defined. - * counter.c, map.c, stat.c, time.c: Call stp - memory functions. - -2007-11-14 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * regs-ia64.c (ia64_fetch_register): Fix the bug of fetching - register 12 on IA64. - -2007-11-12 Martin Hunt <hunt@redhat.com> - - * print.c (_stp_print): Rewrite to eliminate the strlen() - call and save a bit of time. - -2007-11-09 Masami Hiramatsu <mhiramat@redhat.com> - - PR3858 - * print.c: Add -DRELAY_HOST=<hostname> and -DRELAY_GUEST=<hostname> - options support. - (_stp_print_flush): Disable irqs if -DRELAY_* option is specified. - * print_old.c: Export stp_print_flush to other modules if the - -DRELAY_HOST option is specified. - * print_new.c: Ditto. - -2007-10-25 Mike Mason <mmlnx@us.ibm.com> - - * stat-common.c: Allow histogram bucket elision to be turned off - with -DHIST_ELISION=<negative #>. Also cleaned up looping code - to prevent unnecessary interation over non-existent buckets. - -2007-10-17 Masami Hiramatsu <mhiramat@redhat.com> - - * autoconf-tsc-khz.c: Not to be compiled if the kernel version is - younger than 2.6.23 on i386. - -2007-10-17 Martin Hunt <hunt@redhat.com> - PR5000 - * vsprintf.c: Remove _stp_endian. - -2007-10-15 Masami Hiramatsu <mhiramat@redhat.com> - - * autoconf-tsc-khz.c: Fix a bug to be configured correctly. - -2007-10-09 Martin Hunt <hunt@redhat.com> - - * user/*: Removed obsolete userspace test files. - -2007-10-02 Frank Ch. Eigler <fche@elastic.org> - - PR 5041 - From <michael.gruener@linux.vnet.ibm.com>: - * loc2c-runtime.h (store_register): Add value as macro parameter where - missing. - -2007-09-24 Masami Hiramatsu <mhiramat@redhat.com> - - PR 3916 - * time.c (stp_time_t): Rename cpufreq to freq. - (__stp_get_freq): Rename from __stp_estimate_cpufreq. Use tsc_khz or - cpu_khz if it is available. Use itc_freq on ia64. - (__stp_ktime_get_real_ts): New function to get current kernel time. - (__stp_time_timer_callback): Call __stp_ktime_get_real_ts to get - base time. - (__stp_init_time): Ditto. - (__stp_constant_freq): New function to check the processor has - constant frequency timestamp counter. - (_stp_kill_time): Don't use the cpufreq notifier if the processor has - constant frequency timestamp counter. - (_stp_init_time): Ditto. - * autoconf-ktime-get-real.c : New file. - * autoconf-constant-tsc.c: Ditto. - * autoconf-tsc-khz.c: Ditto. - -2007-09-22 Frank Ch. Eigler <fche@elastic.org> - - PR 5057. - * stat-common.c (_stp_stat_print_histogram): Elide consecutive - zero rows beyond 2*STAT_ELISION+1. - (STAT_ELISION): New parameter, default 2. - -2007-09-21 Martin Hunt <hunt@redhat.com> - PR 5024 - * stat-common.c (_stp_stat_print_histogram): Change - overflow and underflow handling for linear histograms. - (__stp_stat_add): For linear histograms, use under - and over buckets. - -2007-09-19 Martin Hunt <hunt@redhat.com> - PR 5042 - * procfs.c (_stp_rmdir_proc_module): Warn if removal of - /proc/systemtap/module is deferred. Do not defer removal of - /proc/systemtap. - (_stp_mkdir_proc_module): Call path_release(). Set ownership of - /proc/systemtap/module to force deletion to be deferred. - (_stp_create_procfs): Set owner of all path components. - -2007-09-14 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_create_procfs): Be sure that directories in the path - are really directories and not files. - -2007-09-13 David Smith <dsmith@redhat.com> - - * procfs.c (_stp_procfs_dir_lookup): Added 'const' qualifier to - 'dir' parameter. - (_stp_create_procfs): Added 'const' qualifier to 'path' - parameter. Removed debug prints. - (_stp_close_procfs): Removed debug prints. - -2007-09-12 Martin Hunt <hunt@redhat.com> - - * map-stat.c (_stp_map_new_hstat_log): Set buckets to - HIST_LOG_BUCKETS. - (_stp_pmap_new_hstat_log): Ditto. - (_stp_map_new_hstat_linear): Call _stp_stat_calc_buckets(). - (_stp_pmap_new_hstat_linear): Ditto. - - * stat.h (STP_MAX_BUCKETS): Define.. - (HIST_LOG_BUCKETS): Define. - - * stat.c (_stp_stat_init): Call _stp_stat_calc_buckets(). - - * stat-common.c (_stp_stat_calc_buckets): New function. Common - bucket calculation and error reporting code. - (_stp_bucket_to_val): New function. - (_stp_val_to_bucket): Renamed and now handles negative numbers. - (_stp_stat_print_histogram): Handle negative values in log histograms. - (__stp_stat_add): Cleanup.. - - * map-gen.c (_stp_map_new): Remove buckets param for HIST_LOG. - * pmap-gen.c (_stp_pmap_new): Ditto. - -2007-09-10 Martin Hunt <hunt@redhat.com> - - * procfs.c: New file. Common runtime procfs functions. - -2007-08-20 Martin Hunt <hunt@redhat.com> - - * stack.c (_stp_kta): Removed. - -2007-08-20 Masami Hiramatsu <mhiramat@redhat.com> - - * stack-x86_64.c: Fix backtrace to use the value of stack register - instead of its address. - -2007-08-17 Martin Hunt <hunt@redhat.com> - - * bench2/bench.rb: Send HUP to stapio, instead of staprun. - -2007-08-10 Josh Stone <joshua.i.stone@intel.com> - - PR 4593 - * loc2c-runtime.h (deref, store_deref): Set an error message with - the pointer value and name into last_error, since it's hard to - determine the details once you've already jumped to deref_fault. - -2007-07-09 Martin Hunt <hunt@redhat.com> - - * sym.h (STP_MAX_MODULES): Raise limit to 256. - -2007-07-06 Martin Hunt <hunt@redhat.com> - - * stat-common.c (__stp_stat_add): Fix calculations - for linear histogram buckets. - - * stat.c (_stp_stat_init): Check for interval too - small. - -2007-07-05 Eugene Teo <eteo@redhat.com> - - * regs.c (_stp_print_regs): #ifdef CONFIG_CPU_CP15 instead. - -2007-07-02 Martin Hunt <hunt@redhat.com> - - * sym.c (_stp_kallsyms_lookup): Improve heuristic - for determining when a pointer is in a function. - (_stp_func_print): New function. - * stack-i386.c, stack-x86_64.c: Remove obsolete - unwind code. Use _stp_func_print(). - -2007-06-22 Frank Ch. Eigler <fche@elastic.org> - - * string.c (_stp_text_str): Fix handling of embedded - " and \ characters. - -2007-06-21 David Smith <dsmith@redhat.com> - - * lket/b2a/Makefile.in: Regenerated with automake 1.10. - -2007-06-15 Martin Hunt <hunt@redhat.com> - From Quentin Barnes. - * loc2c-runtime.h: Latest arm marcos. - * stack-arm.c (__stp_stack_print): Add a cast. - * regs.c (_stp_ret_addr): Define for arm. - -2007-06-07 Martin Hunt <hunt@redhat.com> - PR 4075 fix from Ananth Mavinakayanahalli - * string.h (_stp_get_user): Define. - * string.c (_stp_text_str): Use _stp_get_user(). - -2007-05-30 Martin Hunt <hunt@redhat.com> - - Patch from Quentin Barnes. - * arith.c: Add arm support for 64-bit division. - * copy.c: Enable arm support. - * loc2c-runtime.h: Ditto. - * regs.[ch]: Ditto. - * stack.c: Include stack-arm.c. - * stack-arm.c: New file. - * time.c (_stp_gettimeofday_ns): hack - for arm. See PR 4569. - -2007-05-29 Frank Ch. Eigler <fche@elastic.org> - - PR 4458 - * print_new.c (_stp_print_flush): Use interrupt-disabling - spinlock variants. - -2007-05-29 Frank Ch. Eigler <fche@redhat.com> - - PR 2224 - * map.h (NEED_MAP_LOCKS): New config macro, defaults to 0. - (MAP_GET_CPU, MAP_PUT_CPU): Wrappers, default to ~no-op. - * map.c (_stp_pmap_clear,agg): Use them. - * pmap-gen.c (_stp_pmap_new,set,add,get_cpu,get,del): Ditto. - -2007-05-15 Martin Hunt <hunt@redhat.com> - - * vsprintf.c: Add comment about %p. - * regs.c, stack*.c, sym.c: Fix %p calls. - -2007-04-27 Martin Hunt <hunt@redhat.com> - - * runtime.h: Improve check for debugfs in kernel. - -2007-04-27 Frank Ch. Eigler <fche@elastic.org> - - * autoconf-inode-private.c: New file from hunt. - -2007-04-04 Sébastien Dugué <sebastien.dugue@bull.net> - - * runtime/lket/b2a/lket_b2a.c: Fix percpu files parsing - for percpu_header transport changes. - -2007-04-05 Martin Hunt <hunt@redhat.com> - - * bench2/var_bench, var.st, const.st: New test. - -2007-04-05 Martin Hunt <hunt@redhat.com> - - * bench2/bench.rb (Stapbench::run): Check result code - of "killall staprun". If it is nonzero, something happened to - staprun. Print an error. - (Stapbench::load): Define STP_NO_OVERLOAD. - * bench2/README: Update. - * bench2/print_bench: New set of tests. - -2007-03-22 Frank Ch. Eigler <fche@elastic.org> - - * sym.c (_stp_module_relocate): Tolerate empty section string. - -2007-03-21 Martin Hunt <hunt@redhat.com> - - - * sym.h: Declare _stp_module_relocate. - * sym.c (_stp_module_relocate): Add comments, reformat, add - a way for "last" cached values to be cleared when modules - are removed. - (_stp_symbol_print): Simplify and remove static buffer. - (_stp_symbol_snprint): Ditto. - -2007-03-21 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_map_init): Fix signed vs unsigned comparison warning. - -2007-03-20 Frank Ch. Eigler <fche@elastic.org> - - PR 4224. - * sym.c (_stp_module_relocate): Support kernel relocations. - -2007-03-19 Frank Ch. Eigler <fche@elastic.org> - - * autoconf-hrtimer-rel.c: New file. - -2007-03-18 Martin Hunt <hunt@redhat.com> - - * stack.c, string.c, sym.c, transport/symbols.c: - Fix some signed vs unsigned comparison warnings. - -2007-03-14 Martin Hunt <hunt@redhat.com> - * stpd: Remove directory. - * relayfs: Remove directory. - -2007-03-14 Martin Hunt <hunt@redhat.com> - * bench2/bench.rb: Updated to work with new transport - and new itest.c. - * bench2/Makefile: Updated for new itest.c - * bench2/itest.c: Rewritten to use multiple threads - and automatically divide the workload among the threads. - - * print.c (_stp_print_flush): Move to print_new.c and - print_old.c. - * print_new.c: New file containing _stp_print_flush() - for the new transport. - * print_old.c: Ditto for old transport. - - * runtime.h (STP_OLD_TRANSPORT): Define - (errk): Define. - (MAXSTRINGLEN): Define if not already defined. - - * io.c (_stp_vlog): Use _stp_ctl_write(). - -2007-03-12 Frank Ch. Eigler <fche@redhat.com> - - PR 4179. - Based on patch from Vasily Averin <vvs@sw.ru>: - * time.c (_stp_init_time): Recover from partial failures. - -2007-03-01 David Wilder <dwilder@us.ibm.com> - - * loc2c-runtime.h: rewrote s390x version of __stp_put_asm - and __stp_put_asm to do single byte writes. - -2007-02-27 David Wilder <dwilder@us.ibm.com> - - * loc2c-runtime.h: Added defines for EX_TABLE needed by older - s390 kernels that do not already have it defined. - -2007-02-07 Martin Hunt <hunt@redhat.com> - - * stack-ppc64.c (__stp_stack_print): Remove an old - reference to the string length and instead limit backtraces - to MAXBACKTRACE. - * stack.c: Define MAXBACKTRACE - -2007-02-06 Josh Stone <joshua.i.stone@intel.com> - - * loc2c-runtime.h (kread): Let it work with const types. - -2007-01-31 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_string_init): Deleted. - (_stp_sprintf): Deleted. - (_stp_vsprintf): Deleted. - (_stp_string_cat_cstr): Deleted. - (_stp_string_cat_string): Deleted. - (_stp_string_cat_char): Deleted. - (_stp_string_ptr): Deleted. - (_stp_string_cat): Deleted. - (_stp_snprintf): Moved from vsprintf.c. - (_stp_vscnprintf): Moved from vsprintf.c. - - * string.h (STP_STRING_SIZE): Deleted. - (STP_NUM_STRINGS): Deleted. - Remove all references to type "String". - - * vsprintf.c (_stp_vscnprintf): Moved to string.c. - (_stp_snprintf): Moved to string.c - - * sym.c (_stp_symbol_sprint): Replaced with - _stp_symbol_print, which writes to the print buffer. - (_stp_symbol_sprint_basic): Replaced with - _stp_symbol_snprint. - - * runtime.h: Include io.c. - - * stat-common.c: Use new _stp_print* functions. - * stat.c: Ditto. - - * regs.c: Renamed to regs-ia64.c. - * current.c: Renamed regs.c. - * regs-ia64.c: New file (renamed from regs.c). - - * stack.c (_stp_stack_sprint): Renamed _stp_stack_print - and now just prints to the print buffer. Calls - __stp_stack_print instead of __stp_stack_sprint. - (_stp_stack_snprint): New function. Calls _stp_stack_print and - then copies the print buffer into a string. - (_stp_stack_printj): Deleted. - (_stp_ustack_sprint): Deleted. - * stack-*.c: Rewritten to print instead of writing to strings. - Uses new _stp_print* functions. - - * print.c (_stp_printf): Create new function instead of macro. - (_stp_print): Ditto. - (_stp_print_char): New function. - - * map.c: Use _stp_print() and _stp_print_char() - instead of _stp_print_cstr(). - - * io.c (_stp_vlog): Use _stp_print() instead - of _stp_string_cat_cstr(). - - * copy.c (_stp_string_from_user): Deleted. - - -2007-01-30 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_vlog): Use dynamic percpu allocations - instead of very wasteful static allocations. - * print.c (_stp_print_init): Do percpu allocations - for io.c. - (_stp_print_cleanup): Free percpu allocations. - - * string.c (_stp_sprintf): Overflow check needed - to be >= instead of >. - -2007-01-30 Martin Hunt <hunt@redhat.com> - - * alloc.c (_stp_alloc_percpu): Don't implement - our own; just call __alloc_percpu with appropriate args - for the OS version. - (_stp_free_percpu): Delete. - * map.c (_stp_map_init): When calling kmalloc_node, first - call cpu_to_node() to get the proper node number. - * stat.c (_stp_stat_del): Call free_percpu() - instead of _stp_free_percpu(). - -2007-01-29 Martin Hunt <hunt@redhat.com> - - * alloc.c (_stp_kmalloc): New function. Call kmalloc - with the correct flags and track usage. - (_stp_kzalloc): Ditto. - * map.c: Use new alloc calls. - * print.c: Ditto. - * stat.c: Ditto. - * time.c: Ditto. - -2007-01-25 Roland McGrath <roland@redhat.com> - - * loc2c-runtime.h (store_deref): Use "Zr" constraint for 64-bit case. - -2007-01-22 Josh Stone <joshua.i.stone@intel.com> - - * loc2c-runtime.h (kread, kwrite): Tweaks to work better with - reading and writing pointer values. - -2007-01-22 Martin Hunt <hunt@redhat.com> - - * map-gen.c (_stp_map_exists): New. Check for membership only. - -2007-01-19 Josh Stone <joshua.i.stone@intel.com> - - PR 3079 - * loc2c-runtime.h (kread, kwrite): New macros to safely read/write - values from kernel pointers. This includes a workaround for 64-bit - numbers on i386 platforms. - -2007-01-10 Martin Hunt <hunt@redhat.com> - - PR 3708 - * map.c (str_copy): Check for NULL pointers. - (_new_map_set_int64): Don't check val for 0. - (_new_map_set_str): Don't check val for NULL. - - * map-gen.c (VAL_IS_ZERO): Removed. - (_stp_map_del): New. - (__stp_map_set): Don't check for zero. - - * pmap-gen.c (VAL_IS_ZERO): Removed. - (_stp_pmap_del): New. - (__stp_pmap_set): Don't check for zero. - -2006-12-20 Martin Hunt <hunt@redhat.com> - - * runtime.h: Include mm.h. - -2006-12-20 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/lket_b2a.c: bugfix for NULL appname when - search appNameTree. - -2006-12-18 David Smith <dsmith@redhat.com> - - * lket/b2a/Makefile.in: Regenerated. This needed to be done since - lket/b2a/README was removed but lket/b2a/Makefile.in still had a - reference to it which was causing "make distdir" to fail. - -2006-12-18 Frank Ch. Eigler <fche@elastic.org> - - PR 3079 - * loc2c-runtime.h (deref, store_deref): Fork x86 and x86-64 - variants. Remove dysfunctional 64-bit ops from x86. - -2006-12-15 Frank Ch. Eigler <fche@elastic.org> - - * print.c (_stp_print_flush): Add a likely() marker to the hot path. - -2006-12-13 Frank Ch. Eigler <fche@elastic.org> - - * regs.h (s390x REG_IP): Parenthesize for warning-free builds. - -2006-12-08 Josh Stone <joshua.i.stone@intel.com> - - * runtime.h (param_set_int64_t, param_get_int64_t, - param_check_int64_t): New functions to allow taking module parameters - directly as int64_t values. - -2006-12-06 Josh Stone <joshua.i.stone@intel.com> - - * time.c (stp_timer_reregister): Add a global to control whether the - gettimeofday timer should restart itself, for clean shutdown. - (__stp_time_timer_callback): Check the global. - (_stp_kill_time, _stp_init_time): Set the global. - (_stp_gettimeofday_ns): Switch to preempt_enable_no_resched. - - * time.c (__stp_time_cpufreq_callback): Use the cpu# from the notifier. - (_stp_init_time): No need to disable preemption around cpufreq init. - -2006-12-04 Martin Hunt <hunt@redhat.com> - - * bench2/bench.rb: Fixes for the latest runtime - changes. - -2006-11-21 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/lket_b2a.[ch]: add b2a_error() and change - the error return codes. - -2006-11-19 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/lket_b2a.[ch]: bugfix for #3536 - -2006-11-15 Martin Hunt <hunt@redhat.com> - - * alloc.c (STP_ALLOC_FLAGS): Define. - Cleanup ifdefs. - * map.c: Use STP_ALLOC_FLAGS. - * stat.c: ditto. - -2006-11-10 Li Guanglei <guanglei@cn.ibm.com> - - * transport/procfs.c: bugfix of the obsolete buf_info - and consumed_info. - -2006-11-09 Martin Hunt <hunt@redhat.com> - - * sym.h: Change int to int32_t. - -2006-11-09 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/lket_b2a.[ch]: add options to control - the output data fields of lket.out - -2006-11-02 Martin Hunt <hunt@redhat.com> - - * sym.c (_stp_module_relocate): New function. Needed by the - translator to relocate module symbols. - (_stp_kallsyms_lookup_name): Rewrite to use new symbol structs. - (_stp_kallsyms_lookup): Ditto. - - * sym.h: Declare the structures and arrays that contain all - the symbol and module information. - - * io.c (_stp_vlog, _stp_dbug): Make first parameter const. - * runtime.h: Update prototype for _stp_dbug. - -2006-10-27 Thang Nguyen <thang.p.nguyen@intel.com> - - * runtime/regs.c: patch from Bibo Mao for fixing the return - value on IA64 (bz #3404). - -2006-10-24 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/lket_b2a.[ch]: be sync with LKET hookid - rearrangement. - -2006-10-23 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/lket_b2a.c: bugfix of event description - data insert. - -2006-10-12 Martin Hunt <hunt@redhat.com> - - * stack-ppc64.c (__stp_stack_sprint): Declare sp before _sp. - -2006-10-12 Martin Hunt <hunt@redhat.com> - - * stack.c: Reorganize and split arch-specific functions to - separate files. - (_stp_kta): Better checking. - (_stp_stack_sprint): Better handling of return probes. - - * stack-i386.c: New file. Uses 2.6.18 DWARF unwinder if available. - * stack-x86_64.c: New file. Uses 2.6.18 DWARF unwinder if available. - * stack-ppc64.c: New file. - * stack-ia64.c: New file. - - * sym.c (_stp_kallsyms_lookup_name): New function. Like - kallsyms_lookup_name() except use our internal lookup table. - -2006-10-10 Frank Ch. Eigler <fche@elastic.org> - - * runtime/lket/b2a/lket_b2a.c: Add several missing #ifdef HAS_MYSQL. - -2006-10-10 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/lket_b2a.c, runtime/lket/b2a/lket_b2a.h: - clean up the unused database tables and destory GTree on exit. - -2006-10-10 Li Guanglei <guanglei@cn.ibm.com> - - * runtime/lket/b2a/Makefile.am: add the checking and optional - compiling for mysql client library - * runtime/lket/b2a/Makefile.in: regenerated - * runtime/lket/b2a/lket_b2a.c, runtime/lket/b2a/lket_b2a.h: - Adding the support of automatically database creation and - dumping lket trace into mysql database - -2006-10-09 Josh Stone <joshua.i.stone@intel.com> - - From David Wilder <dwilder@us.ibm.com> - * time.c (__stp_estimate_cpufreq): Short-circuit on s390. - (_stp_gettimeofday_ns): Use a fixed formula on s390 to - convert TOD clocks to nanoseconds. - -2006-09-27 Martin Hunt <hunt@redhat.com> - - * stack.c (_stp_kta): Rewrite. Use the _stap_symbols - struct instead of calling into the kernel. - - * sym.c (_stp_kallsyms_lookup): Move here from runtime.h - - * runtime.h: Get rid of all the symbol stuff that - did not belong here. - -2006-09-26 David Smith <dsmith@redhat.com> - - * README: Changed 'stpd' references to 'staprun'. - * README.doc: Ditto. - * TODO: Ditto. - * io.c: Ditto. - * print.c: Ditto. - * runtime.h: Ditto. - * bench2/bench.rb: Ditto. - -2006-09-26 Martin Hunt <hunt@redhat.com> - - * time.c (_stp_init_time): Use dynamic percpu allocations - instead of evil static allocations. - (_stp_kill_time): Free percpu allocations and set - _stp_time to NULL so the timers are only deleted once. - -2006-09-26 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_vlog): Remove ifdef for STP_RELAYFS. Relayfs now - behaves the same as procfs. - -2006-09-22 Martin Hunt <hunt@redhat.com> - - * print.c: Replace STP_PRINT_BUF_LEN with STP_BUFFER_SIZE. - * string.c: Ditto. - -2006-09-21 Martin Hunt <hunt@redhat.com> - - PR 3232 - * print.c (_stp_print_init): New. Alloc per-cpu buffers. - (_stp_print_cleanup): New. Free per-cpu buffers. - (_stp_print_flush): Use per_cpu_ptr(). - * string.c (_stp_sprintf): Ditto. - (_stp_vsprintf): Ditto. - (_stp_string_cat_cstr): Ditto. - (_stp_string_cat_char): Ditto. - -2006-09-20 Josh Stone <joshua.i.stone@intel.com> - - PR 3233 - * time.c (stp_time_t): Use ns for the base time, and freq is now kHz. - (__stp_estimate_cpufreq): Compute kHz instead of MHz. - (__stp_time_timer_callback, __stp_init_time): Compute base in ns. - (__stp_time_cpufreq_callback): Record kHz instead of MHz. - (_stp_init_time): Record kHz, and disable preemption to avoid a race - in the cpufreq notifier. - (_stp_gettimeofday_ns): Converted from _stp_gettimeofday_us. - - * lket/b2a/lket_b2a.c (main): Correct arguments to fseek. - (dump_data): Work around a spurious compiler warning. - -2006-09-19 Li Guanglei <guanglei@cn.ibm.com> - - * lket/b2a/lket_b2a.c, lket/b2a/lket_b2a.h: - Be sync with the recent runtime printing changes made by Martin. - Some clean up work before adding the support of dumping data - into MySQL - Bug fix of segment fault when an event is not registered. - -2006-09-18 Josh Stone <joshua.i.stone@intel.com> - - PR 3220 - From Eugeniy Meshcheryakov <eugen@debian.org>: - * lket/b2a/lket_b2a.c: Check that appNameTree exists before destroying. - -2006-09-18 Martin Hunt <hunt@redhat.com> - - * bench2/bench.rb: Remove the deprecated "-m" option - to stpd. Also, don't use merge mode for relayfs. - * bench2/run_binary_print: New test. Compare various ways of - printing binary data. - -2006-09-18 Martin Hunt <hunt@redhat.com> - - * print.c (_stp_print_flush): Rewrite so one version works for - relayfs or procfs. Use proper per-cpu functions. - (_stp_reserve_bytes): New function. Reserve bytes in the output buffer. - (_stp_print_binary): New function. Write a variable number of - 64-bit values directly into the output buffer. - - * string.c (_stp_sprintf): Rewrite using new per-cpu buffers. - (_stp_vsprintf): Ditto. - (_stp_string_cat_cstr): Ditto. - (_stp_string_cat_char): Ditto. - - * runtime.h: Set defaults for MAXTRYLOCK and TRYLOCKDELAY to make - runtime tests in bench2 happy. - -2006-08-29 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guijian@cn.ibm.com> - * lket/b2a/lket_b2a.c, lket/b2a/lket_b2a.h: - add the support to get_cycles() and sched_clock() timing - mechanism for LKET. - -2006-08-14 Will Cohen <wcohen@redhat.com> - - PR 3037 - * string.c: - * print.c: Remove includes for <linux/config.h>. - -2006-08-11 David Smith <dsmith@redhat.com> - - * lket/b2a/.cvsignore: Added file to let cvs ignore generated - files. - -2006-07-21 Martin Hunt <hunt@redhat.com> - - * runtime.h: Include compat.h. - -2006-07-20 Martin Hunt <hunt@redhat.com> - - * vsprintf.c (_stp_vsnprintf): %p format fixes. - -2006-07-14 Josh Stone <joshua.i.stone@intel.com> - - PR 2922 - * time.c (_stp_init_time): call cpufreq_get for each cpu from - a non-atomic context (module init time). - * time.c (__stp_init_time): remove call to cpufreq_get from IPI. - - * time.c (__stp_time_timer_callback): disable IRQ's to avoid - perturbations in measurements. - * time.c (_stp_gettimeofday_us): disable preemption to avoid CPU - swaps while we're computing the time. - -2006-07-12 Martin Hunt <hunt@redhat.com> - - * runtime.h (for_each_cpu): Define for new kernels - which no longer define it. - -2006-07-11 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_text_str): Use __get_user(). - -2006-07-11 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_text_str): Add a parameter to support - userspace strings too. - * string.h: (_stp_text_str): Fix proto. - -2006-07-11 Li Guanglei <guanglei@cn.ibm.com> - - * lket/b2a/lket_b2a.c: modified to be sync with - the new addevent.process event hooks - -2006-06-29 Li Guanglei <guanglei@cn.ibm.com> - - * lket/b2a/lket_b2a.c, lket/b2a/lket_b2a.h: modified to be - sync with new _lket_trace() - -2006-06-27 Roland McGrath <roland@redhat.com> - - * loc2c-runtime.h: Add some comments. - -2006-06-23 Josh Stone <joshua.i.stone@intel.com> - - * time.c: Do cpufreq notification only if CONFIG_CPU_FREQ defined. - -2006-06-21 Josh Stone <joshua.i.stone@intel.com> - - PR 2525 - * time.c: Time-estimation with minimal dependency on xtime. - -2006-06-16 Roland McGrath <roland@redhat.com> - - * lket/b2a/Makefile.in: Regenerated with automake-1.9.6-2. - -2006-06-09 Li Guanglei <guanglei@cn.ibm.com> - - * lket/b2a/lket_b2a.c, lket/b2a/lket_b2a.h: Rewrite - according to the latest LKET's tapsets. Make it able - to read the metainfo wrote by tapsets. - -2006-06-02 Li Guanglei <guanglei@cn.ibm.com> - - * lket/b2a/lket_b2a.c: eliminate some compile warnings - -2006-06-01 Li Guanglei <guanglei@cn.ibm.com> - - * lket/b2a/lket_b2a.h, lket/b2a/lket_b2a.c: make it able to - read user added trace data and backtrace - -2006-05-30 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_text_str): New function. - * string.h (_stp_text_str): Declare. - -2006-05-25 Martin Hunt <hunt@redhat.com> - - * vsprintf.c (_stp_vsnprintf): Change %p to work like - libc and automatically insert "0x" before the pointer. - -2006-05-24 Josh Stone <joshua.i.stone@intel.com> - - PR 2677 - * sym.c (_stp_symbol_sprint_basic): New function that returns - just the symbol name, and doesn't bother with String. - -2006-05-24 Li Guanglei <guanglei@cn.ibm.com> - - * lket/b2a/Makefile.am, lket/b2a/Makefile.in, - lket/b2a/README, lket/b2a/lket_b2a.c, - lket/b2a/lket_b2a.h: a binary to ascii converter used - to convert LKET's default binary trace data. - -2006-05-09 Li Guanglei <guanglei@cn.ibm.com> - - PR 2647 - Patch given by Gui Jian <guij@cn.ibm.com> - * vsprintf.c: %0s support to print null-terminated string - -2006-05-03 Josh Stone <joshua.i.stone@intel.com> - - * loc2c-runtime.h (deref_string): resolved gcc "warning: - assignment makes integer from pointer without a cast" when - using a pointer as the source address. - -2006-04-28 Martin Hunt <hunt@redhat.com> - - * vsprintf.c (_stp_vsnprintf): Fix argument size for %p. - -2006-04-17 Martin Hunt <hunt@redhat.com> - - * vsprintf.c (_stp_vsnprintf): Fix endian - before writing binary. - (_stp_endian): New variable to control endianess. - -2006-04-11 Tom Zanussi <zanussi@us.ibm.com> - - * print.c (_stp_print_flush): Change TIMESTAMP_SIZE to - STP_TIMESTAMP_SIZE to avoid conflicts with Suse kernels. - -2006-04-10 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_string_cat_cstr): No need to copy - terminating 0. - - * vsprintf.c (_stp_snprintf): New function. - - * stat-common.c (_stp_stat_print_histogram): Write a - newline at the end of the histogram. - -2006-04-09 Martin Hunt <hunt@redhat.com> - - * print.c (_stp_print_flush): Send 'len" bytes - instead of 'len+1', which included terminating 0. - - * string.c (_stp_sprintf): Call _stp_vsnprintf() - instead of vsnprintf(). - (_stp_vsprintf): Ditto. - - * vsprintf.c: New file. - -2006-04-05 Will Cohen <wcohen@redhat.com> - - * string.h (__stp_stdout): Correct initialization. - -2006-03-30 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_string_cat_cstr): Use memcpy() instead of strncpy(). - -2006-03-26 Martin Hunt <hunt@redhat.com> - - * bench2/bench.rb (Bench::run): Instead of loading the module - once and running against different numbers of threads, load - and unload the module each time. Then keep track of failures - per thread. Also use the new itest to keep the tests the same - size regardless of the number of threads. - (Bench::initialize): Make itest if needed. - (Bench::load, Stapbench::load): Increase buffer size to 8MB. - - * bench2/itest.c: Change arg to be the number of threads - instead of the number of millions of calls to make. - This makes it easy to divide the work among multiple threads - without making the test run many times longer. - -2006-03-09 Martin Hunt <hunt@redhat.com> - - * bench2: New directory containing a benchmark framework. - -2006-02-10 Martin Hunt <hunt@redhat.com> - - * copy.c (_stp_copy_from_user): Revert previous incorrect change. - -2006-02-09 Martin Hunt <hunt@redhat.com> - - * copy.c (_stp_copy_from_user): If access fails, - return -1. - -2006-01-25 Martin Hunt <hunt@redhat.com> - - * stat.c (_stp_stat_init): Use _stp_alloc_percpu(). - (_stp_stat_del): New function. - - * alloc.c (_stp_alloc_percpu): New function. - (_stp_free_percpu): New function. - -2006-01-19 Martin Hunt <hunt@redhat.com> - - * pmap-gen.c (_stp_pmap_get): Fix bug where old data - from agg map could be returned after element was deleted. - -2006-01-16 Josh Stone <joshua.i.stone@intel.com> - - * stat.c (_stp_stat_clear): add a function that just - clears a Stat, so we can use delete in the translator. - -2006-01-16 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_pmap_agg): Return NULL when aggregation - fails. - -2006-01-15 Frank Ch. Eigler <fche@elastic.org> - - * io.c (_stp_exit): Revert. - -2006-01-10 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_exit): set STAP_SESSION_STOPPING. - -2006-01-03 Frank Ch. Eigler <fche@redhat.com> - - * io.c (_stp_softerror): New function. - -2005-12-14 Martin Hunt <hunt@redhat.com> - - * pmap-gen.c (_stp_pmap_new_*): Initialize lock. - (_stp_pmap_set_*): Lock map while in use. - (_stp_pmap_add_*): Lock map while in use. - (_stp_pmap_get_cpu): Ditto. - (_stp_pmap_get): Lock each per-cpu map. - - * map-gen.c: Define and use NULLRET for a NULL return value. - * map.c (_stp_pmap_clear): New function. - (_stp_pmap_agg): Lock each per-cpu map as - it gets aggregated. - -2005-12-13 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_map_sortn): Set a limit of 30 for n. Automatically - call _stp_map_sort() if more is requested. - -2005-12-08 Martin Hunt <hunt@redhat.com> - - * map.c (_new_map_create): Only increment map size if a node - was moved off the free list. - (_stp_map_size): New function. - (_stp_pmap_size): New function. - -2005-12-07 Martin Hunt <hunt@redhat.com> - - PR1923 - * map.h (struct map_root): Remove membuf. - (struct pmap): Define. - (PMAP): Declare. - - * map.c (_stp_map_init): Use kmalloc() to allocate individual - nodes instead of using vmalloc() to allocate one big chunk. - (_stp_map_new): Use kmalloc. - (_stp_pmap_new): Use kmalloc. Return a PMAP. - (__stp_map_del): New function. Free all the nodes in a map. - (_stp_map_del): Call __stp_map_del() then free map struct. - (_stp_pmap_del): Takes a PMAP. Calls __stp_map_del() for - each cpu. - (_stp_pmap_printn_cpu): Change arg to PMAP. - (_stp_pmap_agg): Change arg to PMAP. - (_stp_pmap_get_agg): Change arg to PMAP. - - * map-stat.c (_stp_pmap_new_hstat_linear): Use PMAP - instead of MAP. Fix allocations. - (_stp_pmap_new_hstat_log): Ditto. - - * pmap-gen.c Fix all functions to take or return PMAPS - instead of MAPS. - - * alloc.c: Remove everything except kmalloc_node(). - All runtime code now uses kmalloc() directly. - -2005-11-30 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_exit): To prevent any possible interactions - with the probed function, just set a flag here. - -2005-11-28 Graydon Hoare <graydon@redhat.com> - - * stat-common.c (_stp_stat_print_histogram): Various formatting - corrections and aesthetic tweaks. - (__stp_stat_add): Correction to linear bucket underflow cases. - -2005-11-28 Martin Hunt <hunt@redhat.com> - - * alloc.c (__stp_valloc_percpu): Use same code for up and smp. - (_stp_per_cpu_ptr): New macro. - * user/alloc.c: Ditto. - * map.c: Use _stp_map_cpu_ptr(). - * map-stat.c: Ditto. - * pmap-gen.c: Ditto. - * runtime.h: Include alloc.c - * user/runtime.h: Ditto. - - * map.c (_stp_pmap_del): Use _stp_free_percpu() to - free pmaps. - - * map-stat.c (_stp_pmap_new_hstat_log): Fix typo. Call - _stp_pmap_new() instead of _stp_map_new(). - -2005-11-11 Martin Hunt <hunt@redhat.com> - - * map.h: Removed old API macros and prototypes. - -2005-11-10 Martin Hunt <hunt@redhat.com> - - * pmap-gen.c (_stp_pmap_get()): New function. Aggregates - the per-cpu map nodes into an aggregation map node. - - * map.c (_stp_new_agg): Return a struct map_node *. - (_stp_add_agg): If count is 0 when adding, - just set the stats. - -2005-11-10 Martin Hunt <hunt@redhat.com> - - * map.c: Doc updates. - (_stp_new_agg): - - * pmap-gen.c: Change a bunch of generated function names to - avoid conflicts with maps with the same key and value types. - -2005-11-10 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_cmp): Use _stp_div64(). - -2005-11-09 Martin Hunt <hunt@redhat.com> - - * map.h: Remove HSTAT_LOG and HSTAT_LINEAR. - * map-gen.c: Fix comment. - * pmap-gen.c: Ditto. - -2005-11-09 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_cmp): Patch to sort on stats. - (_stp_map_sort): Ditto. - (_stp_map_sortn): Ditto. - -2005-11-09 Martin Hunt <hunt@redhat.com> - - * map.c: Change order of includes. - -2005-11-09 Martin Hunt <hunt@redhat.com> - - * map.h (struct map_root): Delete fields - used by old API. - - * map.c: Remove old map API functions. - * map-stat.c (_stp_map_add_stat): Delete. - (_stp_pmap_new_hstat_linear): Move here from map.c. - (_stp_pmap_new_hstat_log): Ditto. - - * list.c: Deleted. - * map-keys.c: Deleted. - * map-values.c: Deleted. - * map-int.c: Deleted. - -2005-11-08 Martin Hunt <hunt@redhat.com> - - * alloc.c (__stp_valloc_percpu): Fix call to vmalloc_node. - (vmalloc_node): Remove nonworking code. - -2005-11-08 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_map_init): New function. Extracted from _stp_map_new() - so it can be used in _stp_pmap_new(). - (_stp_map_new): Call _stp_map_init(). - (_stp_pmap_new): New function. - (_stp_pmap_new_hstat_linear): New function. - (_stp_pmap_new_hstat_log): New function. - (_stp_pmap_del): New function. - (_stp_pmap_printn_cpu): New function. - (_stp_pmap_printn): New function. - (_stp_new_agg): New function. - (_stp_add_agg): New function. - (_stp_pmap_agg): New function. - (_new_map_clear_node): New function. - - * map.h (struct map_root): Add Hist struct. Add copy - and cmp function pointers for pmaps. - - * stat.h: Remove Stat struct. Replace with Hist struct - that is limited to only histogram params. - * map-stat.c: Fix up references to histogram params in map_root. - * stat-common.c: Ditto. - * stat.c: Ditto. - - * pmap-gen.c: New file. Implements per-cpu maps. - - * map-gen.c: Minor bug fixes. Use new VAL_IS_ZERO() macro. - - * alloc.c (vmalloc_node): For NUMA, provide a vmalloc that - does node-local allocations. - (_stp_alloc_cpu): A version of _stp_alloc() that does - node-local allocations. - (_stp_valloc): A version of _stp_valloc() that does - node-local allocations. - (__stp_valloc_percpu): New function. Like alloc_percpu() - except uses _stp_valloc(). - (_stp_vfree_percpu): New function. Like free_percpu(). - -2005-11-04 Martin Hunt <hunt@redhat.com> - - * runtime.h: #include <linux/version.h>. - (init_module): Remove old ppc comment. - ifdef _stp_kta so it only gets set for x86 and x86_64. - -2005-10-31 Martin Hunt <hunt@redhat.com> - - * ALL: Cleanup copyrights. - -2005-10-28 Martin Hunt <hunt@redhat.com> - - * map-gen.c (MAP_GET_VAL): Use the _stp_get_*() functions. - (_stp_map_set_*): When setting to "", don't create - node if key not found. - (_stp_map_get_*): Use new MAP_GET_VAL. Return "" when - string lookups not found. - - * map.c (_stp_get_int64): Check args and return - 0 on bad args or wrong type. - (_stp_get_stat): Ditto. - (_stp_key_get_int64): Ditto. - (_stp_get_str): Check args and return - "bad type" on bad args or wrong type. - (_stp_key_get_str): Ditto. - (_new_map_set_str): If setting to "", delete node. - (_new_map_get_*): Delete. Use _stp_get_*(). - - -2005-10-26 Martin Hunt <hunt@redhat.com> - - * map-gen.c (KEY4CPY): Fix typo. - (KEYCPY): Add missing semicolon. - -2005-10-26 Martin Hunt <hunt@redhat.com> - - * map-gen.c: New file. - - * map.c (_new_map_create, _new_map_del_node, _new_map_del_node, - _new_map_set_int64, _new_map_set_str,_new_map_get_int64, - _new_map_get_str, _new_map_get_stat, _new_map_set_stat): - New internal functions for the new API. - - * map-int.c (__stp_map_set_int64): Modify to return an - error code. - * map-stat.c (_stp_map_add_stat): Ditto. - * map-str (_stp_map_set_str): Ditto. - - * Doxyfile: Remove predefines NEED_STRING_VALS, - NEED_STATS, NEED_INT64. - * map-keys.c: Ditto. - * list.c (_stp_list_new): Ditto. Also set map->list. - * map-values.c: Ditto. - -2005-10-19 Martin Hunt <hunt@redhat.com> - - * runtime.h (_stp_kallsyms_lookup_tabled): Only - compile this for systemtap. Runtime-only examples - don't need it. - -2005-10-19 Tom Zanussi <zanussi@us.ibm.com> - - * print.c (_stp_print_flush): Switch to binary TIMESTAMP. - -2005-10-14 Tom Zanussi <zanussi@us.ibm.com> - - PR 1455 - * string.c (_stp_sprintf): Restore overwritten NULL byte. - * print.c: Change STP_PRINT_BUF_LEN to correct size. - -2005-10-06 Frank Ch. Eigler <fche@elastic.org> - - PR 1332. - * sym.h: New file to declare explicit symbol table struct. - * runtime.h (_stp_kallsyms_lookup_tabled): Use it if available. - * sym.c (_stp_symbol_sprint): HAS_LOOKUP mooted. - -2005-09-30 Graydon Hoare <graydon@redhat.com> - - * loc2c-runtime.h (_put_user_asm): Fix bracket-matching. - -2005-09-23 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_map_sortn): Call _stp_map_sort() - when n is 0. - -2005-09-23 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_cmp): New comparison function for sorts. - (_stp_swap): New swap function for bubble sort. - (_stp_map_sortn): New function. - (_stp_map_sort): New function. - (_stp_map_printn): New function. - (_stp_map_print): Convert to a macro. - -2005-09-22 Martin Hunt <hunt@redhat.com> - - * regs.h: PPC64 version from - Ananth N Mavinakayanahalli <ananth@in.ibm.com> - - * runtime.h (init_module): Only initialize _stp_kta and - _stp_kallsyms_lookup on i386 and x86_64. Define HAS_LOOKUP. - - * sym.c (_stp_symbol_sprint): If HAS_LOOKUP is not - defined, just print address in hex. - - * current.c (_stp_ret_addr): Add ppc64 version. - (_stp_sprint_regs): PPC64 version from - Ananth N Mavinakayanahalli <ananth@in.ibm.com> - -2005-09-14 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_map_clear): New function. CLears a map but - does not free it. - - * copy.c (__stp_strncpy_from_user): Add ppc64 support. - (_stp_strncpy_from_user): Call access_ok(). - (_stp_string_from_user): Ditto. - (_stp_copy_from_user): Ditto. - -2005-09-12 Martin Hunt <hunt@redhat.com> - - * io.c (ERR_STRING): Remove ansi codes. - (WARN_STRING): Ditto. - -2005-09-12 Martin Hunt <hunt@redhat.com> - - * arith.c (_stp_div64): Check for division by 0 or -1 first. - This simplifies things and removes the possibility of x86_64 - trying LLONG_MIN/-1 and faulting. - (_stp_mod64): Ditto. - -2005-09-10 Frank Ch. Eigler <fche@elastic.org> - - * arith.c: Add some comments explaining why the last change works. - -2005-09-09 Roland McGrath <roland@redhat.com> - - * loc2c-runtime.h [__powerpc__] (store_register): Add #undef. - -2005-09-09 Martin Hunt <hunt@redhat.com> - - * stat-common.c (_stp_stat_print_valtype): Use _stp_div64(). - * arith.c (_stp_div64): Check error before writing to it. - Remove check against 32-bit LONG_MIN and -1. That only - applies to 64-bit. - (_stp_mod64): Ditto. - -2005-09-08 Martin Hunt <hunt@redhat.com> - - * arith.c (_stp_div64): Check for overflow. - (_stp_mod64): Ditto. - -2005-09-08 Martin Hunt <hunt@redhat.com> - - * arith.c (_stp_div64): For 64-bit cpus, just use native - division. Otherwise call _div64(). - (_stp_mod64): Call _mod64() isf necessary. - (_div64): 64-bit division for 32-bit cpus. - (_mod64): 64-bit modulo for 32-bit cpus. - - * map-values.c (_stp_map_entry_exists): Remove unused var. - -2005-09-01 Martin Hunt <hunt@redhat.com> - - * stack.c (_stp_stack_sprint): Add a verbose arg - to pass along to underlying funcs. - -2005-08-31 Martin Hunt <hunt@redhat.com> - - * runtime.h (init_module): Include full prototype - info in function cast to satisfy stap. - - * sym.c (_stp_kallsyms_lookup): Moved to runtime.h. - * stack.c (_stp_kta): Moved to runtime.h. - * runtime.h (init_module): Initialize _stp_kallsyms_lookup - and _stp_kta. - * probes.c (_stp_lookup_name): Replaced by kallsyms_lookup_name(). - * list.c (_stp_copy_argv_from_user): ifdef this function - NEED_STRING_VALS. - -2005-08-30 Roland McGrath <roland@redhat.com> - - * loc2c-runtime.h (fetch_register, store_register): Rewritten to pass - REGS to dwarf_register_<N> as a macro argument. - [__i386__, __x86_64__]: Update dwarf_register_* macros. - [__i386__] (dwarf_register_4): Define special case for stack pointer. - -2005-08-29 Martin Hunt <hunt@redhat.com> - - * list.c (_stp_copy_argv_from_user): Move to here. - * copy.c (_stp_copy_argv_from_user): Delete. - * runtime.h: Always include copy.h. - -2005-08-25 Roland McGrath <roland@redhat.com> - - * loc2c-runtime.h (deref_string): Rewritten using deref. - -2005-08-24 Roland McGrath <roland@redhat.com> - - * loc2c-runtime.h (deref_string): New macro. - -2005-08-24 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_vlog): Send warnings and errors to STP_OOB_DATA. - -2005-08-23 Martin Hunt <hunt@redhat.com> - - * runtime.h: Add a prototype for _stp_dbug(). - -2005-08-22 Martin Hunt <hunt@redhat.com> - - * runtime.h (kbug): New dbug macros that calls printk. - -2005-08-21 Frank Ch. Eigler <fche@redhat.com> - - * arith.c (*): Adapt to last_error context variable. - -2005-08-19 Frank Ch. Eigler <fche@elastic.org> - - * arith.c (_stp_random_pm): New function. - -2005-08-19 Martin Hunt <hunt@redhat.com> - - * print.c: Change ifdefs to STP_RELAYFS. - * runtime.h: Ditto. - * io.c (_stp_vlog): Call _stp_write instead of - _stp_ctrl_send. - * Makefile: Don't build stp-control. - * README.doc: Update. - * TODO: Update. - -2005-08-12 Graydon Hoare <graydon@redhat.com> - - * map-values.c (_stp_map_entry_exists): New function. - * map.h (_stp_map_entry_exists): Declare it. - -2005-08-12 Frank Ch. Eigler <fche@elastic.org> - - * arith.c: New file to contain arithmetic helper functions. - * builtin_functions.h: Remove, unused. - * runtime.h: Include it. - -2005-08-10 Roland McGrath <roland@redhat.com> - - * loc2c-runtime.h (store_bitfield): Fix argument use. - (store_deref): New macro (three flavors). - -2005-08-03 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_vlog): Revert previous change for now. - * print.c (_stp_print_flush): Ditto. - -2005-08-03 Tom Zanussi <trz@us.ibm.com> - - * io.c (_stp_vlog): Remove call to _stp_print_flush(). - * print.c (_stp_print_flush): _stp_warn() on first - transport failure. - -2005-08-01 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_vlog): Use _stp_pid instead os _stp_tport->pid. - * print.c (_stp_print_flush): Don't need _stp_tport. - *runtime.h (probe_start): Just call _stp_transport_init(). - (probe_exit): Just call _stp_transport_close(). - -2005-07-28 Graydon Hoare <graydon@redhat.com> - - * loc2c-runtime.h: New file from elfutils CVS. - -2005-07-20 Martin Hunt <hunt@redhat.com> - - * io.c (_stp_vlog): Don't count transport failures for - these messages. - -2005-07-19 Martin Hunt <hunt@redhat.com> - - * print.c (_stp_print_flush): Check return value and increment - transport failures. - -2005-07-14 Frank Ch. Eigler <fche@redhat.com> - - * builtin_functions.h (printk): Use explicit format string. - -2005-07-11 Graydon Hoare <graydon@redhat.com> - - * builtin_functions.h: New file. - -2005-07-10 Martin Hunt <hunt@redhat.com> - - * runtime.h (init_module): Fix return value. - -2005-07-08 Martin Hunt <hunt@redhat.com> - - * runtime.h: Move some common pieces of modules into this file. - Includes MODULE_LICENSE, cleanup_module and init_module. - - * print.c (_stp_print_flush): Rename "t" to "_stp_tport". - - * io.c (_stp_vlog): Ditto. - -2005-07-01 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_string_init): CAll stp_error() on bad - init. - - * list.c (_stp_list_clear): Call _stp_warn(). - - * probes.c: Convert all _stp_log() calls to either stp_warn() or - dbug(). - - * print.c: Comment out dbug()s. - - * stat-common.c: Comment out dbug()s. - - * map.c (_stp_map_new): Call _stp_error() on a bad map type. - Comment out dbug()s. - - * map-stat.c (_stp_map_new_hstat_log): Call _stp_warn(). - (_stp_map_new_hstat_linear): Ditto. - - * map-int.c: Comment out dbug()s. - - * map-str.c: Comment out dbug()s. - - * map-keys.c: Use _stp_warn(). Comment out dbug()s. - - * alloc.c (_stp_alloc): Call _stp_error(). - (_stp_valloc): Ditto. - - * io.c (_stp_warn): New function. - (_stp_exit): New function. - (_stp_error): New function. - (_stp_dbug): New function. - - * runtime.h (dbug): Call _stp_dbug() if DEBUG is defined. - -2005-06-29 Martin Hunt <hunt@redhat.com> - - * map-values.c (_stp_map_add_int64): Fix docs. - * map-str.c: Fix some docs - * map.c: Ditto. - * map.doc: Ditto. - - * current.c (_stp_ret_addr_r): New function. - (_stp_probe_addr): New function. - (_stp_probe_addr_r): New function. - -2005-06-27 Martin Hunt <hunt@redhat.com> - - * Doxyfile (PREDEFINED): Added USE_RET_PROBES. - - * probes.c (_stp_register_kretprobes): New function. - (_stp_unregister_kretprobes): New function. - -2005-06-20 Tom Zanussi <zanussi@us.ibm.com> - - * print.c: Made relayfs _stp_print_flush() use sequence counter. - - * runtime.h: Added sequence counter, moved subbuf_size etc to probes. - -2005-06-18 Martin Hunt <hunt@redhat.com> - - * counter.c: New file. Counter aggregations. - - * stat.c: New file. Stat aggregations. - - * stat.h: Header file for stats. - - * map-int.c: New file. Support for int64 values. - - * map-stat.c: New file. Support for stat values. - - * map-str.c: New file. Support for string values. - - * map-values.c: Now just includes the necessary map-*.c files. - - * stat-common.c: New file. Stats stuff common to Stats and maps - containing stats. - - * Doxyfile: Bumped version to 0.6. - - * README: Renamed README.doc and reorganized. - - -2005-06-15 Martin Hunt <hunt@redhat.com> - - * current.c (_stp_ret_addr): Fix computation for i386. - -2005-06-14 Martin Hunt <hunt@redhat.com> - - * README: Removed old docs and replaced with simple build - instructions. - - * Makefile: New file. - - * probes/build: New file. - -2005-06-13 Martin Hunt <hunt@redhat.com> - - * print.c (next_fmt): Move this func to print.c. - -2005-06-02 Martin Hunt <hunt@redhat.com> - - * string.c (_stp_string_cat_cstr): Be sure result is - always terminated. - - * print.c (_stp_vprintf): Fix typo. - -2005-05-31 Martin Hunt <hunt@redhat.com> - - * map.c (_stp_map_print): Now takes a format string instead of a name. - - * map.h (foreach): Update macro. - - * string.c (_stp_string_cat_char): New function. Append a char - to a string. - - * map-keys.c: Don't forget to undef KEYSYM, ALLKEYS and ALLKEYSD. - -2005-05-26 Martin Hunt <hunt@redhat.com> - - * current.c (_stp_sprint_regs): Implement for i386. - - * sym.c (_stp_symbol_sprint): Check name before trying to - print it. - (_stp_symbol_print): Change to macro that calls _stp_symbol_sprint(). - -2005-05-18 Martin Hunt <hunt@redhat.com> - - * print.c: All functions except _stp_print_flush() are - now macros which use _stp_stdout. - - * string.c: Add _stp_stdout support. Data written to - _stp_stdout is automatically flushed when the print buffer - is full. - - * runtime.h: Always include string.c. - -2005-05-17 Martin Hunt <hunt@redhat.com> - - * map.c (needed_space): Use do_div(). - (_stp_map_print_histogram): Ditto. - (_stp_map_print): Ditto. - - * map-values.c (_stp_map_add_int64_stat): Use do_div() when - computing histogram bucket. - - * map-keys.c (_stp_map_key): Fix some warnings on 32-bit machines - by using key_data casts. - -2005-03-30 Martin Hunt <hunt@redhat.com> - - * scbuf.c: Make functions use per-cpu buffers as documented. - _stp_scbuf_clear(): Now returns a pointer to the buffer. diff --git a/runtime/addr-map.c b/runtime/addr-map.c index 706da454..e898044f 100644 --- a/runtime/addr-map.c +++ b/runtime/addr-map.c @@ -30,7 +30,7 @@ struct addr_map static DEFINE_SPINLOCK(addr_map_lock); -struct addr_map* blackmap; +static struct addr_map* blackmap; /* Find address of entry where we can insert a new one. */ static size_t @@ -88,7 +88,7 @@ lookup_addr_aux(unsigned long addr, struct addr_map* map) return 0; } -int +static int lookup_bad_addr(unsigned long addr) { struct addr_map_entry* result = 0; @@ -102,7 +102,7 @@ lookup_bad_addr(unsigned long addr) } -int +static int add_bad_addr_entry(unsigned long min_addr, unsigned long max_addr, struct addr_map_entry** existing_min, struct addr_map_entry** existing_max) @@ -181,7 +181,7 @@ add_bad_addr_entry(unsigned long min_addr, unsigned long max_addr, return 0; } -void +static void delete_bad_addr_entry(struct addr_map_entry* entry) { } diff --git a/runtime/alloc.c b/runtime/alloc.c index cfdb97bd..89d16612 100644 --- a/runtime/alloc.c +++ b/runtime/alloc.c @@ -63,7 +63,7 @@ struct _stp_mem_entry { static LIST_HEAD(_stp_mem_list); -void _stp_check_mem_fence (char *addr, int size) +static void _stp_check_mem_fence (char *addr, int size) { char *ptr; int i; @@ -88,7 +88,7 @@ void _stp_check_mem_fence (char *addr, int size) } } -void *_stp_mem_debug_setup(void *addr, size_t size, enum _stp_memtype type) +static void *_stp_mem_debug_setup(void *addr, size_t size, enum _stp_memtype type) { struct list_head *p; struct _stp_mem_entry *m; @@ -108,7 +108,7 @@ void *_stp_mem_debug_setup(void *addr, size_t size, enum _stp_memtype type) } /* Percpu allocations don't have the fence. Implementing it is problematic. */ -void _stp_mem_debug_percpu(struct _stp_mem_entry *m, void *addr, size_t size) +static void _stp_mem_debug_percpu(struct _stp_mem_entry *m, void *addr, size_t size) { struct list_head *p = (struct list_head *)m; m->magic = MEM_MAGIC; @@ -120,7 +120,7 @@ void _stp_mem_debug_percpu(struct _stp_mem_entry *m, void *addr, size_t size) spin_unlock(&_stp_mem_lock); } -void _stp_mem_debug_free(void *addr, enum _stp_memtype type) +static void _stp_mem_debug_free(void *addr, enum _stp_memtype type) { int found = 0; struct list_head *p, *tmp; @@ -291,7 +291,7 @@ static void *_stp_kmalloc_node(size_t size, int node) } #endif /* LINUX_VERSION_CODE */ -void _stp_kfree(void *addr) +static void _stp_kfree(void *addr) { #ifdef DEBUG_MEM _stp_mem_debug_free(addr, MEM_KMALLOC); @@ -300,7 +300,7 @@ void _stp_kfree(void *addr) #endif } -void _stp_vfree(void *addr) +static void _stp_vfree(void *addr) { #ifdef DEBUG_MEM _stp_mem_debug_free(addr, MEM_VMALLOC); @@ -309,7 +309,7 @@ void _stp_vfree(void *addr) #endif } -void _stp_free_percpu(void *addr) +static void _stp_free_percpu(void *addr) { #ifdef DEBUG_MEM _stp_mem_debug_free(addr, MEM_PERCPU); @@ -318,7 +318,7 @@ void _stp_free_percpu(void *addr) #endif } -void _stp_mem_debug_done(void) +static void _stp_mem_debug_done(void) { #ifdef DEBUG_MEM struct list_head *p, *tmp; diff --git a/runtime/arith.c b/runtime/arith.c index 60576090..d1d0da29 100644 --- a/runtime/arith.c +++ b/runtime/arith.c @@ -21,21 +21,21 @@ /* Other 32-bit cpus will need to modify this file. */ #if defined (__i386__) || defined(__arm__) -long long _div64 (long long u, long long v); -long long _mod64 (long long u, long long v); +static long long _div64 (long long u, long long v); +static long long _mod64 (long long u, long long v); #endif /* 31 bit s390 suupport is not yet included, it may never be. #ifdef __s390__ -long long _div64 (long long u, long long v); -long long _mod64 (long long u, long long v); +static long long _div64 (long long u, long long v); +static long long _mod64 (long long u, long long v); #endif */ /** Divide x by y. In case of division-by-zero, * set context error string, and return 0 */ -int64_t _stp_div64 (const char **error, int64_t x, int64_t y) +static int64_t _stp_div64 (const char **error, int64_t x, int64_t y) { // check for division-by-zero if (unlikely (y == 0)) { @@ -61,7 +61,7 @@ int64_t _stp_div64 (const char **error, int64_t x, int64_t y) /** Modulo x by y. In case of division-by-zero, * set context error string, and return any 0 */ -int64_t _stp_mod64 (const char **error, int64_t x, int64_t y) +static int64_t _stp_mod64 (const char **error, int64_t x, int64_t y) { // check for division-by-zero if (unlikely (y == 0)) { @@ -88,7 +88,7 @@ int64_t _stp_mod64 (const char **error, int64_t x, int64_t y) /** Return a random integer between -n and n. * @param n how far from zero to go. Make it positive but less than a million or so. */ -int _stp_random_pm (int n) +static int _stp_random_pm (int n) { static unsigned long seed; static int initialized_p = 0; @@ -251,7 +251,7 @@ typedef union #endif #if !defined (count_leading_zeros) -const UQItype _stp_clz_tab[256] = +static const UQItype _stp_clz_tab[256] = { 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, @@ -286,7 +286,7 @@ const UQItype _stp_clz_tab[256] = #define COUNT_LEADING_ZEROS_0 W_TYPE_SIZE #endif -UDWtype +static UDWtype _stp_udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp) { const DWunion nn = {.ll = n}; @@ -499,7 +499,7 @@ _stp_udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp) return ww.ll; } -long long _div64 (long long u, long long v) +static long long _div64 (long long u, long long v) { long c = 0; DWunion uu = {.ll = u}; @@ -520,7 +520,7 @@ long long _div64 (long long u, long long v) return w; } -long long _mod64 (long long u, long long v) +static long long _mod64 (long long u, long long v) { long c = 0; DWunion uu = {.ll = u}; diff --git a/runtime/autoconf-procfs-owner.c b/runtime/autoconf-procfs-owner.c new file mode 100644 index 00000000..d64bf5e8 --- /dev/null +++ b/runtime/autoconf-procfs-owner.c @@ -0,0 +1,8 @@ +#include <linux/proc_fs.h> + +/* kernel commit 4d38a69c6 */ + +void bar (void) { + struct proc_dir_entry foo; + foo.owner = (void*) 0; +} diff --git a/runtime/autoconf-vm-area.c b/runtime/autoconf-vm-area.c new file mode 100644 index 00000000..920d103d --- /dev/null +++ b/runtime/autoconf-vm-area.c @@ -0,0 +1,9 @@ +#include <linux/vmalloc.h> +#include <asm/page.h> + +void foo (void) +{ + void *dummy; + dummy = alloc_vm_area (PAGE_SIZE); + free_vm_area (dummy); +} diff --git a/runtime/copy.c b/runtime/copy.c index 6bb22762..4fb87253 100644 --- a/runtime/copy.c +++ b/runtime/copy.c @@ -47,8 +47,7 @@ }) -long _stp_strncpy_from_user(char *dst, const char __user *src, long count); -//static long __stp_strncpy_from_user(char *dst, const char __user *src, long count); +static long __stp_strncpy_from_user(char *dst, const char __user *src, long count); #if defined (__i386__) #define __stp_strncpy_from_user(dst,src,count,res) \ @@ -131,7 +130,7 @@ do { \ * <i>count</i> bytes and returns <i>count</i>. */ -long _stp_strncpy_from_user(char *dst, const char __user *src, long count) +static long _stp_strncpy_from_user(char *dst, const char __user *src, long count) { long res = -EFAULT; if (access_ok(VERIFY_READ, src, count)) @@ -152,7 +151,7 @@ long _stp_strncpy_from_user(char *dst, const char __user *src, long count) * */ -unsigned long _stp_copy_from_user(char *dst, const char __user *src, unsigned long count) +static unsigned long _stp_copy_from_user(char *dst, const char __user *src, unsigned long count) { if (count) { if (access_ok(VERIFY_READ, src, count)) diff --git a/runtime/counter.c b/runtime/counter.c index a3c3669b..40ea66a0 100644 --- a/runtime/counter.c +++ b/runtime/counter.c @@ -52,7 +52,7 @@ typedef struct _counter *Counter; * * @return a Counter. Will be NULL on error. */ -Counter _stp_counter_init (void) +static Counter _stp_counter_init (void) { Counter cnt = _stp_alloc_percpu (struct _counter); #if NEED_COUNTER_LOCKS == 1 @@ -73,7 +73,7 @@ Counter _stp_counter_init (void) * @param cnt Counter * @param val int64 value */ -void _stp_counter_add (Counter cnt, int64_t val) +static void _stp_counter_add (Counter cnt, int64_t val) { Counter c = per_cpu_ptr (cnt, get_cpu()); COUNTER_LOCK(c); @@ -90,7 +90,7 @@ void _stp_counter_add (Counter cnt, int64_t val) * @param clear Set this to have the value cleared after reading. * @return An int64 value. */ -int64_t _stp_counter_get_cpu (Counter cnt, int cpu, int clear) +static int64_t _stp_counter_get_cpu (Counter cnt, int cpu, int clear) { int64_t val; Counter c = per_cpu_ptr (cnt, cpu); @@ -114,7 +114,7 @@ int64_t _stp_counter_get_cpu (Counter cnt, int cpu, int clear) * @param clear Set this to have the value cleared after reading. * @return An int64 value. */ -int64_t _stp_counter_get (Counter cnt, int clear) +static int64_t _stp_counter_get (Counter cnt, int clear) { int i; int64_t sum = 0; @@ -133,7 +133,7 @@ int64_t _stp_counter_get (Counter cnt, int clear) /** Free a Counter. * @param cnt Counter */ -void _stp_counter_free (Counter cnt) +static void _stp_counter_free (Counter cnt) { _stp_free_percpu (cnt); } diff --git a/runtime/debug.h b/runtime/debug.h index 9b2fe5c5..e8b2e701 100644 --- a/runtime/debug.h +++ b/runtime/debug.h @@ -14,7 +14,7 @@ * _dbug() writes to systemtap stderr. * errk() writes to the system log. */ -int _stp_transport_state = 0; +static int _stp_transport_state = 0; #define _dbug(args...) _stp_dbug(__FUNCTION__, __LINE__, args) diff --git a/runtime/io.c b/runtime/io.c index c49d86e6..8ddb53ac 100644 --- a/runtime/io.c +++ b/runtime/io.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * I/O for printing warnings, errors and debug messages - * Copyright (C) 2005-2008 Red Hat Inc. + * Copyright (C) 2005-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 @@ -56,24 +56,6 @@ static void _stp_vlog (enum code type, const char *func, int line, const char *f put_cpu(); } -/** Logs Data. - * This function sends the message immediately to staprun. It - * will also be sent over the bulk transport (relayfs) if it is - * being used. If the last character is not a newline, then one - * is added. This function is not as efficient as _stp_printf() - * and should only be used for urgent messages. You probably want - * dbug(), or _stp_warn(). - * @param fmt A variable number of args. - * @todo Evaluate if this function is necessary. - */ -void _stp_log (const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - _stp_vlog (INFO, NULL, 0, fmt, args); - va_end(args); -} - /** Prints warning. * This function sends a warning message immediately to staprun. It * will also be sent over the bulk transport (relayfs) if it is @@ -81,7 +63,7 @@ void _stp_log (const char *fmt, ...) * is added. * @param fmt A variable number of args. */ -void _stp_warn (const char *fmt, ...) +static void _stp_warn (const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -97,7 +79,7 @@ void _stp_warn (const char *fmt, ...) * call. You should probably call return immediately after * calling _stp_exit(). */ -void _stp_exit (void) +static void _stp_exit (void) { _stp_exit_flag = 1; } @@ -112,7 +94,7 @@ void _stp_exit (void) * @param fmt A variable number of args. * @sa _stp_exit(). */ -void _stp_error (const char *fmt, ...) +static void _stp_error (const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -131,7 +113,7 @@ void _stp_error (const char *fmt, ...) * @param fmt A variable number of args. * @sa _stp_error */ -void _stp_softerror (const char *fmt, ...) +static void _stp_softerror (const char *fmt, ...) { va_list args; va_start(args, fmt); diff --git a/runtime/itrace.c b/runtime/itrace.c index 3ee48265..df18a400 100644 --- a/runtime/itrace.c +++ b/runtime/itrace.c @@ -187,7 +187,7 @@ done: } -int usr_itrace_init(int single_step, pid_t tid, struct stap_itrace_probe *p) +static int usr_itrace_init(int single_step, pid_t tid, struct stap_itrace_probe *p) { struct itrace_info *ui; struct task_struct *tsk; diff --git a/runtime/map-gen.c b/runtime/map-gen.c index ce6e8742..c4bdf2c7 100644 --- a/runtime/map-gen.c +++ b/runtime/map-gen.c @@ -336,7 +336,7 @@ static unsigned int KEYSYM(hash) (ALLKEYSD(key)) #if VALUE_TYPE == INT64 || VALUE_TYPE == STRING -MAP KEYSYM(_stp_map_new) (unsigned max_entries) +static MAP KEYSYM(_stp_map_new) (unsigned max_entries) { MAP m = _stp_map_new (max_entries, VALUE_TYPE, sizeof(struct KEYSYM(map_node)), 0); if (m) @@ -347,7 +347,7 @@ MAP KEYSYM(_stp_map_new) (unsigned max_entries) /* _stp_map_new_key1_key2...val (num, HIST_LINEAR, start, end, interval) */ /* _stp_map_new_key1_key2...val (num, HIST_LOG) */ -MAP KEYSYM(_stp_map_new) (unsigned max_entries, int htype, ...) +static MAP KEYSYM(_stp_map_new) (unsigned max_entries, int htype, ...) { int start=0, stop=0, interval=0; MAP m; @@ -384,7 +384,7 @@ MAP KEYSYM(_stp_map_new) (unsigned max_entries, int htype, ...) } #endif /* VALUE_TYPE */ -int KEYSYM(__stp_map_set) (MAP map, ALLKEYSD(key), VSTYPE val, int add) +static int KEYSYM(__stp_map_set) (MAP map, ALLKEYSD(key), VSTYPE val, int add) { unsigned int hv; struct hlist_head *head; @@ -427,18 +427,18 @@ int KEYSYM(__stp_map_set) (MAP map, ALLKEYSD(key), VSTYPE val, int add) return MAP_SET_VAL(map,(struct map_node *)n, val, 0); } -int KEYSYM(_stp_map_set) (MAP map, ALLKEYSD(key), VSTYPE val) +static int KEYSYM(_stp_map_set) (MAP map, ALLKEYSD(key), VSTYPE val) { return KEYSYM(__stp_map_set) (map, ALLKEYS(key), val, 0); } -int KEYSYM(_stp_map_add) (MAP map, ALLKEYSD(key), VSTYPE val) +static int KEYSYM(_stp_map_add) (MAP map, ALLKEYSD(key), VSTYPE val) { return KEYSYM(__stp_map_set) (map, ALLKEYS(key), val, 1); } -VALTYPE KEYSYM(_stp_map_get) (MAP map, ALLKEYSD(key)) +static VALTYPE KEYSYM(_stp_map_get) (MAP map, ALLKEYSD(key)) { unsigned int hv; struct hlist_head *head; @@ -474,7 +474,7 @@ VALTYPE KEYSYM(_stp_map_get) (MAP map, ALLKEYSD(key)) return NULLRET; } -int KEYSYM(_stp_map_del) (MAP map, ALLKEYSD(key)) +static int KEYSYM(_stp_map_del) (MAP map, ALLKEYSD(key)) { unsigned int hv; struct hlist_head *head; @@ -511,7 +511,7 @@ int KEYSYM(_stp_map_del) (MAP map, ALLKEYSD(key)) return 0; } -int KEYSYM(_stp_map_exists) (MAP map, ALLKEYSD(key)) +static int KEYSYM(_stp_map_exists) (MAP map, ALLKEYSD(key)) { unsigned int hv; struct hlist_head *head; diff --git a/runtime/map.c b/runtime/map.c index 5108e596..de25d6f3 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Map Functions - * Copyright (C) 2005, 2006, 2007, 2008 Red Hat Inc. + * Copyright (C) 2005-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 @@ -26,17 +26,17 @@ static int map_sizes[] = { 0 }; -unsigned int int64_hash (const int64_t v) +static unsigned int int64_hash (const int64_t v) { return (unsigned int)hash_long ((unsigned long)v, HASH_TABLE_BITS); } -int int64_eq_p (int64_t key1, int64_t key2) +static int int64_eq_p (int64_t key1, int64_t key2) { return key1 == key2; } -void str_copy(char *dest, char *src) +static void str_copy(char *dest, char *src) { int len = 0; if (src) { @@ -48,7 +48,7 @@ void str_copy(char *dest, char *src) dest[len] = 0; } -void str_add(void *dest, char *val) +static void str_add(void *dest, char *val) { char *dst = (char *)dest; int len = strlen(val); @@ -61,12 +61,12 @@ void str_add(void *dest, char *val) dst[len + len1] = 0; } -int str_eq_p (char *key1, char *key2) +static int str_eq_p (char *key1, char *key2) { return strncmp(key1, key2, MAP_STRING_LENGTH - 1) == 0; } -unsigned int str_hash(const char *key1) +static unsigned int str_hash(const char *key1) { int hash = 0, count = 0; char *v1 = (char *)key1; @@ -88,7 +88,7 @@ unsigned int str_hash(const char *key1) * @param m pointer to the map_node. * @returns an int64 value. */ -int64_t _stp_get_int64(struct map_node *m) +static int64_t _stp_get_int64(struct map_node *m) { if (!m || m->map->type != INT64) return 0; @@ -102,7 +102,7 @@ int64_t _stp_get_int64(struct map_node *m) * @param m pointer to the map_node. * @returns a pointer to a string. */ -char *_stp_get_str(struct map_node *m) +static char *_stp_get_str(struct map_node *m) { if (!m || m->map->type != STRING) return "bad type"; @@ -116,7 +116,7 @@ char *_stp_get_str(struct map_node *m) * @param m pointer to the map_node. * @returns A pointer to the stats. */ -stat *_stp_get_stat(struct map_node *m) +static stat *_stp_get_stat(struct map_node *m) { if (!m || m->map->type != STAT) return 0; @@ -130,7 +130,7 @@ stat *_stp_get_stat(struct map_node *m) * @returns an int64 * @sa key1int(), key2int() */ -int64_t _stp_key_get_int64 (struct map_node *mn, int n) +static int64_t _stp_key_get_int64 (struct map_node *mn, int n) { int type; int64_t res = 0; @@ -150,7 +150,7 @@ int64_t _stp_key_get_int64 (struct map_node *mn, int n) * @returns a pointer to a string * @sa key1str(), key2str() */ -char *_stp_key_get_str (struct map_node *mn, int n) +static char *_stp_key_get_str (struct map_node *mn, int n) { int type; char *str = ""; @@ -290,7 +290,7 @@ err: * @sa foreach */ -struct map_node *_stp_map_start(MAP map) +static struct map_node *_stp_map_start(MAP map) { if (map == NULL) return NULL; @@ -313,7 +313,7 @@ struct map_node *_stp_map_start(MAP map) * @sa foreach */ -struct map_node *_stp_map_iter(MAP map, struct map_node *m) +static struct map_node *_stp_map_iter(MAP map, struct map_node *m) { if (map == NULL) return NULL; @@ -328,7 +328,7 @@ struct map_node *_stp_map_iter(MAP map, struct map_node *m) * @param map */ -void _stp_map_clear(MAP map) +static void _stp_map_clear(MAP map) { struct map_node *m; @@ -351,7 +351,7 @@ void _stp_map_clear(MAP map) } } -void _stp_pmap_clear(PMAP pmap) +static void _stp_pmap_clear(PMAP pmap) { int i; @@ -393,7 +393,7 @@ static void __stp_map_del(MAP map) * @param map */ -void _stp_map_del(MAP map) +static void _stp_map_del(MAP map) { if (map == NULL) return; @@ -403,7 +403,7 @@ void _stp_map_del(MAP map) _stp_kfree(map); } -void _stp_pmap_del(PMAP pmap) +static void _stp_pmap_del(PMAP pmap) { int i; @@ -444,7 +444,7 @@ static int _stp_cmp (struct list_head *a, struct list_head *b, int keynum, int d ret = 1; else ret = 0; - //_stp_log ("comparing %s and %s and returning %d\n", _stp_get_str(m1), _stp_get_str(m2), ret); + //dbug ("comparing %s and %s and returning %d\n", _stp_get_str(m1), _stp_get_str(m2), ret); return ret; } else { int64_t a,b; @@ -510,7 +510,7 @@ static inline void _stp_swap (struct list_head *a, struct list_head *b) * @sa _stp_map_sortn() */ -void _stp_map_sort (MAP map, int keynum, int dir) +static void _stp_map_sort (MAP map, int keynum, int dir) { struct list_head *p, *q, *e, *tail; int nmerges, psize, qsize, i, type, insize = 1; @@ -577,7 +577,7 @@ void _stp_map_sort (MAP map, int keynum, int dir) * @param dir Sort Direction. -1 for low-to-high. 1 for high-to-low. * @sa _stp_map_sort() */ -void _stp_map_sortn(MAP map, int n, int keynum, int dir) +static void _stp_map_sortn(MAP map, int n, int keynum, int dir) { if (n == 0 || n > 30) { _stp_map_sort(map, keynum, dir); @@ -726,7 +726,7 @@ static void _stp_add_agg(struct map_node *aptr, struct map_node *ptr) * @param map A pointer to a pmap. * @returns a pointer to the aggregated map. Null on failure. */ -MAP _stp_pmap_agg (PMAP pmap) +static MAP _stp_pmap_agg (PMAP pmap) { int i, hash; MAP m, agg; @@ -912,7 +912,7 @@ static int _new_map_set_stat (MAP map, struct map_node *n, int64_t val, int add) * @param pmap * @returns an int */ -int _stp_pmap_size (PMAP pmap) +static int _stp_pmap_size (PMAP pmap) { int i, num = 0; diff --git a/runtime/map.h b/runtime/map.h index 6cd6e119..6c1c855b 100644 --- a/runtime/map.h +++ b/runtime/map.h @@ -166,34 +166,34 @@ typedef struct pmap *PMAP; /** @cond DONT_INCLUDE */ /************* prototypes for map.c ****************/ -int int64_eq_p(int64_t key1, int64_t key2); +static int int64_eq_p(int64_t key1, int64_t key2); void int64_copy(void *dest, int64_t val); void int64_add(void *dest, int64_t val); int64_t int64_get(void *ptr); void stat_copy(void *dest, stat *src); void stat_add(void *dest, stat *src); stat *stat_get(void *ptr); -int64_t _stp_key_get_int64(struct map_node *mn, int n); -char * _stp_key_get_str(struct map_node *mn, int n); -unsigned int int64_hash(const int64_t v); +static int64_t _stp_key_get_int64(struct map_node *mn, int n); +static char * _stp_key_get_str(struct map_node *mn, int n); +static unsigned int int64_hash(const int64_t v); char * str_get(void *ptr); -void str_copy(char *dest, char *src); -void str_add(void *dest, char *val); -int str_eq_p(char *key1, char *key2); -int64_t _stp_get_int64(struct map_node *m); -char * _stp_get_str(struct map_node *m); -stat *_stp_get_stat(struct map_node *m); -unsigned int str_hash(const char *key1); +static void str_copy(char *dest, char *src); +static void str_add(void *dest, char *val); +static int str_eq_p(char *key1, char *key2); +static int64_t _stp_get_int64(struct map_node *m); +static char * _stp_get_str(struct map_node *m); +static stat *_stp_get_stat(struct map_node *m); +static unsigned int str_hash(const char *key1); static MAP _stp_map_new(unsigned max_entries, int type, int key_size, int data_size); static PMAP _stp_pmap_new(unsigned max_entries, int type, int key_size, int data_size); static int msb64(int64_t x); static MAP _stp_map_new_hstat_log(unsigned max_entries, int key_size); static MAP _stp_map_new_hstat_linear(unsigned max_entries, int ksize, int start, int stop, int interval); static void _stp_map_print_histogram(MAP map, stat *s); -struct map_node * _stp_map_start(MAP map); -struct map_node * _stp_map_iter(MAP map, struct map_node *m); -void _stp_map_del(MAP map); -void _stp_map_clear(MAP map); +static struct map_node * _stp_map_start(MAP map); +static struct map_node * _stp_map_iter(MAP map, struct map_node *m); +static void _stp_map_del(MAP map); +static void _stp_map_clear(MAP map); void _stp_map_print(MAP map, const char *fmt); static struct map_node *_new_map_create (MAP map, struct hlist_head *head); diff --git a/runtime/mempool.c b/runtime/mempool.c index 0fbb4326..f8831428 100644 --- a/runtime/mempool.c +++ b/runtime/mempool.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Preallocated memory pools - * 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 @@ -72,41 +72,6 @@ err: return NULL; } -/* Resize a memory pool */ -static int _stp_mempool_resize(_stp_mempool_t *pool, size_t num) -{ - int i; - unsigned long flags; - struct _stp_mem_buffer *m; - - if (unlikely(num == 0 || num == pool->num)) - return pool->num; - - if (num > pool->num) { - for (i = 0; i < num - pool->num; i++) { - m = (struct _stp_mem_buffer *)_stp_kmalloc(pool->size); - if (unlikely(m == NULL)) - goto done; - m->pool = pool; - pool->num++; - spin_lock_irqsave(&pool->lock, flags); - list_add((struct list_head *)m, &pool->free_list); - spin_unlock_irqrestore(&pool->lock, flags); - } - } else { - for (i = 0; i < pool->num - num; i++) { - spin_lock_irqsave(&pool->lock, flags); - m = (struct _stp_mem_buffer *)pool->free_list.next; - list_del(&m->list); - spin_unlock_irqrestore(&pool->lock, flags); - _stp_kfree(m); - } - pool->num = num; - } -done: - return num; -} - /* allocate a buffer from a memory pool */ static void *_stp_mempool_alloc(_stp_mempool_t *pool) { diff --git a/runtime/perf.c b/runtime/perf.c index 0b812630..9ac8b481 100644 --- a/runtime/perf.c +++ b/runtime/perf.c @@ -59,7 +59,7 @@ static struct pfarg_start start_args; * @param pmd_count, number of entries in pmd * @returns an int, 0 if no errors encountered during setup */ -int _stp_perfmon_setup(void **desc, +static int _stp_perfmon_setup(void **desc, struct pfarg_ctx *context, struct pfarg_pmc pmc[], int pmc_count, struct pfarg_pmd pmd[], int pmd_count) @@ -98,7 +98,7 @@ cleanup: *desc=NULL; * @param desc unique pointer to describe configuration * @returns an int, 0 if no errors encountered during shutdown */ -int _stp_perfmon_shutdown(void *desc) +static int _stp_perfmon_shutdown(void *desc) { int err=0; @@ -116,7 +116,7 @@ int _stp_perfmon_shutdown(void *desc) * @param desc unique pointer to describe configuration * @returns an int64, raw value of counter */ -int64_t _stp_perfmon_read(void *desc, int counter) +static int64_t _stp_perfmon_read(void *desc, int counter) { struct pfarg_pmd storage; diff --git a/runtime/perf.h b/runtime/perf.h index e3212228..6a87bff0 100644 --- a/runtime/perf.h +++ b/runtime/perf.h @@ -15,13 +15,13 @@ * @brief Header file for performance monitoring hardware support */ -int _stp_perfmon_setup(void **desc, +static int _stp_perfmon_setup(void **desc, struct pfarg_ctx *context, struct pfarg_pmc pmc[], int pmc_count, struct pfarg_pmd pmd[], int pmd_count); -int _stp_perfmon_shutdown(void *desc); +static int _stp_perfmon_shutdown(void *desc); -int64_t _stp_perfmon_read(void *desc, int counter); +static int64_t _stp_perfmon_read(void *desc, int counter); #endif /* _PERF_H_ */ diff --git a/runtime/pmap-gen.c b/runtime/pmap-gen.c index 7f7ddeb0..86c3dc42 100644 --- a/runtime/pmap-gen.c +++ b/runtime/pmap-gen.c @@ -400,7 +400,7 @@ static unsigned int KEYSYM(phash) (ALLKEYSD(key)) #if VALUE_TYPE == INT64 || VALUE_TYPE == STRING -PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries) +static PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries) { PMAP pmap = _stp_pmap_new (max_entries, VALUE_TYPE, sizeof(struct KEYSYM(pmap_node)), 0); if (pmap) { @@ -426,7 +426,7 @@ PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries) /* _stp_pmap_new_key1_key2...val (num, HIST_LINEAR, start, end, interval) */ /* _stp_pmap_new_key1_key2...val (num, HIST_LOG) */ -PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries, int htype, ...) +static PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries, int htype, ...) { int start=0, stop=0, interval=0; PMAP pmap; @@ -477,7 +477,7 @@ PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries, int htype, ...) } #endif /* VALUE_TYPE */ -int KEYSYM(__stp_pmap_set) (MAP map, ALLKEYSD(key), VSTYPE val, int add) +static int KEYSYM(__stp_pmap_set) (MAP map, ALLKEYSD(key), VSTYPE val, int add) { unsigned int hv; struct hlist_head *head; @@ -522,7 +522,7 @@ int KEYSYM(__stp_pmap_set) (MAP map, ALLKEYSD(key), VSTYPE val, int add) return MAP_SET_VAL(map,(struct map_node *)n, val, 0); } -int KEYSYM(_stp_pmap_set) (PMAP pmap, ALLKEYSD(key), VSTYPE val) +static int KEYSYM(_stp_pmap_set) (PMAP pmap, ALLKEYSD(key), VSTYPE val) { int res; MAP m = per_cpu_ptr (pmap->map, MAP_GET_CPU ()); @@ -538,7 +538,7 @@ int KEYSYM(_stp_pmap_set) (PMAP pmap, ALLKEYSD(key), VSTYPE val) return res; } -int KEYSYM(_stp_pmap_add) (PMAP pmap, ALLKEYSD(key), VSTYPE val) +static int KEYSYM(_stp_pmap_add) (PMAP pmap, ALLKEYSD(key), VSTYPE val) { int res; MAP m = per_cpu_ptr (pmap->map, MAP_GET_CPU()); @@ -555,7 +555,7 @@ int KEYSYM(_stp_pmap_add) (PMAP pmap, ALLKEYSD(key), VSTYPE val) } -VALTYPE KEYSYM(_stp_pmap_get_cpu) (PMAP pmap, ALLKEYSD(key)) +static VALTYPE KEYSYM(_stp_pmap_get_cpu) (PMAP pmap, ALLKEYSD(key)) { unsigned int hv; struct hlist_head *head; @@ -608,7 +608,7 @@ VALTYPE KEYSYM(_stp_pmap_get_cpu) (PMAP pmap, ALLKEYSD(key)) return NULLRET; } -VALTYPE KEYSYM(_stp_pmap_get) (PMAP pmap, ALLKEYSD(key)) +static VALTYPE KEYSYM(_stp_pmap_get) (PMAP pmap, ALLKEYSD(key)) { unsigned int hv; int cpu, clear_agg = 0; @@ -696,7 +696,7 @@ VALTYPE KEYSYM(_stp_pmap_get) (PMAP pmap, ALLKEYSD(key)) return NULLRET; } -int KEYSYM(__stp_pmap_del) (MAP map, ALLKEYSD(key)) +static int KEYSYM(__stp_pmap_del) (MAP map, ALLKEYSD(key)) { unsigned int hv; struct hlist_head *head; @@ -737,7 +737,7 @@ int KEYSYM(__stp_pmap_del) (MAP map, ALLKEYSD(key)) return 0; } -int KEYSYM(_stp_pmap_del) (PMAP pmap, ALLKEYSD(key)) +static int KEYSYM(_stp_pmap_del) (PMAP pmap, ALLKEYSD(key)) { int res; MAP m = per_cpu_ptr (pmap->map, MAP_GET_CPU ()); diff --git a/runtime/print.c b/runtime/print.c index 14a0820b..2c84d3c9 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Print Functions - * Copyright (C) 2007-2008 Red Hat Inc. + * Copyright (C) 2007-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 @@ -39,16 +39,16 @@ typedef struct __stp_pbuf { char buf[STP_BUFFER_SIZE]; } _stp_pbuf; -void *Stp_pbuf = NULL; +static void *Stp_pbuf = NULL; -/** private buffer for _stp_log() */ +/** private buffer for _stp_vlog() */ #define STP_LOG_BUF_LEN 256 typedef char _stp_lbuf[STP_LOG_BUF_LEN]; -void *Stp_lbuf = NULL; +static void *Stp_lbuf = NULL; /* create percpu print and io buffers */ -int _stp_print_init (void) +static int _stp_print_init (void) { Stp_pbuf = _stp_alloc_percpu(sizeof(_stp_pbuf)); if (unlikely(Stp_pbuf == 0)) @@ -63,7 +63,7 @@ int _stp_print_init (void) return 0; } -void _stp_print_cleanup (void) +static void _stp_print_cleanup (void) { if (Stp_pbuf) _stp_free_percpu(Stp_pbuf); @@ -171,7 +171,7 @@ static void _stp_print_binary (int num, ...) * * @sa _stp_print_flush() */ -void _stp_printf (const char *fmt, ...) +static void _stp_printf (const char *fmt, ...) { int num; va_list args; @@ -207,7 +207,7 @@ void _stp_printf (const char *fmt, ...) * @param str A C string (char *) */ -void _stp_print (const char *str) +static void _stp_print (const char *str) { _stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id()); char *end = pb->buf + STP_BUFFER_SIZE; @@ -231,9 +231,8 @@ void _stp_print (const char *str) pb->len = ptr - pb->buf; } -void _stp_print_char (const char c) +static void _stp_print_char (const char c) { - char *buf; _stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id()); int size = STP_BUFFER_SIZE - pb->len; if (unlikely(1 >= size)) @@ -243,38 +242,7 @@ void _stp_print_char (const char c) pb->len ++; } -/* This function is used when printing maps or stats. */ -/* Probably belongs elsewhere, but is here for now. */ -/* It takes a format specification like those used for */ -/* printing maps and stats. It prints chars until it sees */ -/* a special format char (beginning with '%'. Then it */ -/* returns a pointer to that. */ -static char *next_fmt(char *fmt, int *num) -{ - char *f = fmt; - int in_fmt = 0; - *num = 0; - while (*f) { - if (in_fmt) { - if (*f == '%') { - _stp_print_char('%'); - in_fmt = 0; - } else if (*f > '0' && *f <= '9') { - *num = *f - '0'; - f++; - return f; - } else - return f; - } else if (*f == '%') - in_fmt = 1; - else - _stp_print_char(*f); - f++; - } - return f; -} - -void _stp_print_kernel_info(char *vstr, int ctx, int num_probes) +static void _stp_print_kernel_info(char *vstr, int ctx, int num_probes) { #ifdef DEBUG_MEM printk(KERN_DEBUG "%s: systemtap: %s, base: %p, memory: %lu+%lu+%u+%u+%u data+text+ctx+net+alloc, probes: %d\n", diff --git a/runtime/print_new.c b/runtime/print_new.c index 4136ecbe..fa7b4727 100644 --- a/runtime/print_new.c +++ b/runtime/print_new.c @@ -16,7 +16,7 @@ * @note Preemption must be disabled to use this. */ -DEFINE_SPINLOCK(_stp_print_lock); +static DEFINE_SPINLOCK(_stp_print_lock); void EXPORT_FN(stp_print_flush) (_stp_pbuf *pb) { diff --git a/runtime/procfs.c b/runtime/procfs.c index 0fe22aba..d6b75336 100644 --- a/runtime/procfs.c +++ b/runtime/procfs.c @@ -1,7 +1,7 @@ /* -*- linux-c -*- * * /proc command channels - * Copyright (C) 2007 Red Hat Inc. + * Copyright (C) 2007-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 @@ -14,15 +14,17 @@ * number of needed files. */ +#ifndef _STP_PROCFS_C_ +#define _STP_PROCFS_C_ + #define STP_MAX_PROCFS_FILES 16 static int _stp_num_pde = 0; -static int _stp_num_procfs_files = 0; static struct proc_dir_entry *_stp_pde[STP_MAX_PROCFS_FILES]; static struct proc_dir_entry *_stp_procfs_files[STP_MAX_PROCFS_FILES]; static struct proc_dir_entry *_stp_proc_stap = NULL; static struct proc_dir_entry *_stp_proc_root = NULL; -void _stp_close_procfs(void); +static void _stp_close_procfs(void); // 2.6.24 fixed proc_dir_entry refcounting. #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) @@ -34,7 +36,7 @@ void _stp_close_procfs(void); /* * Removes /proc/systemtap/{module_name} and /proc/systemtap (if empty) */ -void _stp_rmdir_proc_module(void) +static void _stp_rmdir_proc_module(void) { if (_stp_proc_root && _stp_proc_root->subdir == NULL) { if (atomic_read(&_stp_proc_root->count) != LAST_ENTRY_COUNT) @@ -45,7 +47,7 @@ void _stp_rmdir_proc_module(void) } if (_stp_proc_stap) { - if (!_stp_lock_debugfs()) { + if (!_stp_lock_transport_dir()) { errk("Unable to lock transport directory.\n"); return; } @@ -62,7 +64,7 @@ void _stp_rmdir_proc_module(void) _stp_proc_stap = NULL; } - _stp_unlock_debugfs(); + _stp_unlock_transport_dir(); } } @@ -71,12 +73,12 @@ void _stp_rmdir_proc_module(void) * Safely creates /proc/systemtap (if necessary) and * /proc/systemtap/{module_name}. */ -int _stp_mkdir_proc_module(void) +static int _stp_mkdir_proc_module(void) { if (_stp_proc_root == NULL) { struct nameidata nd; - if (!_stp_lock_debugfs()) { + if (!_stp_lock_transport_dir()) { errk("Unable to lock transport directory.\n"); goto done; } @@ -90,7 +92,7 @@ int _stp_mkdir_proc_module(void) /* doesn't exist, so create it */ _stp_proc_stap = proc_mkdir ("systemtap", NULL); if (_stp_proc_stap == NULL) { - _stp_unlock_debugfs(); + _stp_unlock_transport_dir(); goto done; } } else { @@ -105,10 +107,12 @@ int _stp_mkdir_proc_module(void) } _stp_proc_root = proc_mkdir(THIS_MODULE->name, _stp_proc_stap); +#ifdef AUTOCONF_PROCFS_OWNER if (_stp_proc_root != NULL) _stp_proc_root->owner = THIS_MODULE; +#endif - _stp_unlock_debugfs(); + _stp_unlock_transport_dir(); } done: return (_stp_proc_root) ? 1 : 0; @@ -128,7 +132,7 @@ static struct proc_dir_entry *_stp_procfs_lookup(const char *dir, struct proc_di return NULL; } -int _stp_create_procfs(const char *path, int num) +static int _stp_create_procfs(const char *path, int num) { const char *p; char *next; @@ -161,7 +165,9 @@ int _stp_create_procfs(const char *path, int num) goto err; } _stp_pde[_stp_num_pde++] = last_dir; +#ifdef AUTOCONF_PROCFS_OWNER last_dir->owner = THIS_MODULE; +#endif last_dir->uid = _stp_uid; last_dir->gid = _stp_gid; } else { @@ -195,7 +201,7 @@ err: return -1; } -void _stp_close_procfs(void) +static void _stp_close_procfs(void) { int i; for (i = _stp_num_pde-1; i >= 0; i--) { @@ -205,3 +211,5 @@ void _stp_close_procfs(void) _stp_num_pde = 0; _stp_rmdir_proc_module(); } + +#endif /* _STP_PROCFS_C_ */ diff --git a/runtime/regs.c b/runtime/regs.c index 81b865b1..e963affa 100644 --- a/runtime/regs.c +++ b/runtime/regs.c @@ -23,43 +23,6 @@ * @{ */ - -/** Get the current return address. - * Call from kprobes (not jprobes). - * @param regs The pt_regs saved by the kprobe. - * @return The return address saved in the stack pointer. - * @note i386 and x86_64 only so far. - */ - -unsigned long _stp_ret_addr (struct pt_regs *regs) -{ -#if defined (STAPCONF_X86_UNIREGS) && (defined (__x86_64__) || defined (__i386__)) - unsigned long *ra = (unsigned long *)regs->sp; - if (ra) - return *ra; - else - return 0; -#elif defined (__x86_64__) - unsigned long *ra = (unsigned long *)regs->rsp; - if (ra) - return *ra; - else - return 0; -#elif defined (__i386__) - return regs->esp; -#elif defined (__powerpc64__) || defined (__arm__) - return REG_LINK(regs); -#elif defined (__ia64__) - return regs->b0; -#elif defined (__s390__) || defined (__s390x__) - return regs->gprs[14]; -#elif defined (__arm__) - return regs->ARM_r0; -#else - #error Unimplemented architecture -#endif -} - /** Get the current return address for a return probe. * Call from kprobe return probe. * @param ri Pointer to the struct kretprobe_instance. @@ -85,7 +48,7 @@ unsigned long _stp_ret_addr (struct pt_regs *regs) #if defined (STAPCONF_X86_UNIREGS) && defined (__x86_64__) -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs; unsigned int fsindex,gsindex; @@ -126,7 +89,7 @@ void _stp_print_regs(struct pt_regs * regs) #elif defined (STAPCONF_X86_UNIREGS) && defined (__i386__) -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; @@ -153,7 +116,7 @@ void _stp_print_regs(struct pt_regs * regs) } #elif defined (__x86_64__) -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs; unsigned int fsindex,gsindex; @@ -193,7 +156,7 @@ void _stp_print_regs(struct pt_regs * regs) } #elif defined (__ia64__) -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri; @@ -228,7 +191,7 @@ void _stp_print_regs(struct pt_regs * regs) * @param regs The pt_regs saved by the kprobe. * @note i386 and x86_64 only so far. */ -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; @@ -263,7 +226,7 @@ static int _stp_probing_32bit_app(struct pt_regs *regs) return (user_mode(regs) && test_tsk_thread_flag(current, TIF_32BIT)); } -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { int i; @@ -302,7 +265,7 @@ static const char *processor_modes[]= }; -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { unsigned long flags = condition_codes(regs); @@ -365,7 +328,7 @@ void _stp_print_regs(struct pt_regs * regs) #define GPRSIZE "%08lX " #endif -void _stp_print_regs(struct pt_regs * regs) +static void _stp_print_regs(struct pt_regs * regs) { char *mode; int i; diff --git a/runtime/runtime.h b/runtime/runtime.h index 3ca43dc4..822562a2 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -44,7 +44,7 @@ #endif static void _stp_dbug (const char *func, int line, const char *fmt, ...); -void _stp_error (const char *fmt, ...); +static void _stp_error (const char *fmt, ...); #include "debug.h" @@ -96,7 +96,7 @@ static struct #include "addr-map.c" /* Support functions for int64_t module parameters. */ -int param_set_int64_t(const char *val, struct kernel_param *kp) +static int param_set_int64_t(const char *val, struct kernel_param *kp) { char *endp; long long ll; @@ -117,7 +117,7 @@ int param_set_int64_t(const char *val, struct kernel_param *kp) return 0; } -int param_get_int64_t(char *buffer, struct kernel_param *kp) +static int param_get_int64_t(char *buffer, struct kernel_param *kp) { return sprintf(buffer, "%lli", (long long)*((int64_t *)kp->arg)); } @@ -132,7 +132,7 @@ int init_module (void) return _stp_transport_init(); } -int probe_start(void); +static int probe_start(void); void cleanup_module(void) { diff --git a/runtime/sdt.h b/runtime/sdt.h deleted file mode 100644 index 9fe7b176..00000000 --- a/runtime/sdt.h +++ /dev/null @@ -1,163 +0,0 @@ -// 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. - -#include <string.h> - -#if _LP64 -#define STAP_PROBE_STRUCT_ARG(arg) \ - __uint64_t arg; -#else -#define STAP_PROBE_STRUCT_ARG(arg) \ - long arg __attribute__ ((aligned(8))); -#endif - -#define STAP_SENTINEL 0x31425250 - -#define STAP_PROBE_STRUCT(probe,type,argc) \ -struct _probe_ ## probe \ -{ \ - int probe_type; \ - char *probe_name; \ - STAP_PROBE_STRUCT_ARG (probe_arg); \ -}; \ -static char probe_name [strlen(#probe)+1] \ - __attribute__ ((section (".probes"))) \ - = #probe; \ -static volatile struct _probe_ ## probe _probe_ ## probe __attribute__ ((section (".probes"))) = {STAP_SENTINEL,&probe_name[0],argc}; - -#define STAP_CONCAT(a,b) a ## b -#define STAP_LABEL(p,n) \ - STAP_CONCAT(_probe_ ## p ## _, n) - -// The goto _probe_ prevents the label from "drifting" -#ifdef USE_STAP_PROBE -#define STAP_PROBE(provider,probe) \ - STAP_PROBE_STRUCT(probe,0,0) \ - _stap_probe_0 (_probe_ ## probe.probe_name); -#else -#define STAP_PROBE(provider,probe) \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop"); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__); -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE1(provider,probe,arg1) \ - STAP_PROBE_STRUCT(probe,0,1) \ - _stap_probe_1 (_probe_ ## probe.probe_name,(size_t)arg1); -#else -#define STAP_PROBE1(provider,probe,parm1) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__);} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE2(provider,probe,arg1,arg2) \ - STAP_PROBE_STRUCT(probe,0,2) \ - _stap_probe_2 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2); -#else -#define STAP_PROBE2(provider,probe,parm1,parm2) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__);} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE3(provider,probe,arg1,arg2,arg3) \ - STAP_PROBE_STRUCT(probe,0,3) \ - _stap_probe_3 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3); -#else -#define STAP_PROBE3(provider,probe,parm1,parm2,parm3) \ - {volatile typeof((parm1)) arg1 __attribute__ ((unused)) = parm1; \ - volatile typeof((parm2)) arg2 __attribute__ ((unused)) = parm2; \ - volatile typeof((parm3)) arg3 __attribute__ ((unused)) = parm3; \ -STAP_LABEL(probe,__LINE__): \ - asm volatile ("nop" :: "r"(arg1), "r"(arg2), "r"(arg3)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__);} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE4(provider,probe,arg1,arg2,arg3,arg4) \ - STAP_PROBE_STRUCT(probe,0,4) \ - _stap_probe_4 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4); -#else -#define STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ - {volatile typeof((parm1)) arg1 __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" :: "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__);} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE5(provider,probe,arg1,arg2,arg3,arg4,arg5) \ - STAP_PROBE_STRUCT(probe,0,5) \ - _stap_probe_5 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4,(size_t)arg5); -#else -#define STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \ - {volatile typeof((parm1)) arg1 __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" :: "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__);} -#endif - -#ifdef USE_STAP_PROBE -#define STAP_PROBE6(provider,probe,arg1,arg2,arg3,arg4,arg5,arg6) \ - STAP_PROBE_STRUCT(probe,0,6) \ - _stap_probe_6 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4,(size_t)arg5,(size_t)arg6); -#else -#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" :: "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5), "r"(arg6)); \ - STAP_PROBE_STRUCT(probe,1,(size_t)&& STAP_LABEL(probe,__LINE__)) \ - if (__builtin_expect(_probe_ ## probe.probe_type < 0, 0)) \ - goto STAP_LABEL(probe,__LINE__);} -#endif - -#define DTRACE_PROBE(provider,probe) \ -STAP_PROBE(provider,probe) -#define DTRACE_PROBE1(provider,probe,parm1) \ -STAP_PROBE1(provider,probe,parm1) -#define DTRACE_PROBE2(provider,probe,parm1,parm2) \ -STAP_PROBE2(provider,probe,parm1,parm2) -#define DTRACE_PROBE3(provider,probe,parm1,parm2,parm3) \ -STAP_PROBE3(provider,probe,parm1,parm2,parm3) -#define DTRACE_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ -STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) -#define DTRACE_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \ -STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4,parm5) -#define DTRACE_PROBE6(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) \ -STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c index ed7e2ce1..206801d8 100644 --- a/runtime/stack-i386.c +++ b/runtime/stack-i386.c @@ -14,10 +14,11 @@ static int _stp_valid_stack_ptr(unsigned long context, unsigned long p) } /* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */ -static void _stp_stack_print_fallback(unsigned long context, unsigned long stack, int verbose, int levels) +#if ! (defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) +static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels) { unsigned long addr; - while (levels && _stp_valid_stack_ptr(context, stack)) { + while (levels && stack & (THREAD_SIZE-1)) { if (unlikely(_stp_read_address(addr, (unsigned long *)stack, KERNEL_DS))) { /* cannot access stack. give up. */ return; @@ -27,6 +28,7 @@ static void _stp_stack_print_fallback(unsigned long context, unsigned long stack stack++; } } +#endif static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) { @@ -69,11 +71,11 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) /* If an error happened or we hit a kretprobe trampoline, use fallback backtrace */ /* FIXME: is there a way to unwind across kretprobe trampolines? */ if (ret < 0 || (ret > 0 && UNW_PC(&info) == _stp_kretprobe_trampoline)) - _stp_stack_print_fallback(context, UNW_SP(&info), verbose, levels); + _stp_stack_print_fallback(UNW_SP(&info), verbose, levels); break; } #else /* ! STP_USE_DWARF_UNWINDER */ - _stp_stack_print_fallback(context, (unsigned long)®_SP(regs), verbose, levels); + _stp_stack_print_fallback((unsigned long)®_SP(regs), verbose, levels); #endif /* STP_USE_FRAME_POINTER */ #endif } diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index d3ec91cf..183de0a0 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -9,6 +9,8 @@ */ /* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */ + +#if ! (defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels) { unsigned long addr; @@ -22,6 +24,8 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose, int leve stack++; } } +#endif + static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) { @@ -48,3 +52,5 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) _stp_stack_print_fallback(REG_SP(regs), verbose, levels); #endif } + + diff --git a/runtime/stack.c b/runtime/stack.c index 23ac2edc..aa0e6d65 100644 --- a/runtime/stack.c +++ b/runtime/stack.c @@ -27,6 +27,14 @@ #define MAXBACKTRACE 20 +#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26) +// XXX: PR9866: hacky temporarily restriction to recent kernels +#include <linux/stacktrace.h> +#include <asm/stacktrace.h> +#endif + +static void _stp_stack_print_fallback(unsigned long, int, int); + #if defined (__x86_64__) #include "stack-x86_64.c" #elif defined (__ia64__) @@ -43,11 +51,58 @@ #error "Unsupported architecture" #endif +#if defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26) + +struct print_stack_data +{ + int verbose; + int max_level; + int level; +}; + +static void print_stack_warning(void *data, char *msg) +{ +} + +static void +print_stack_warning_symbol(void *data, char *msg, unsigned long symbol) +{ +} + +static int print_stack_stack(void *data, char *name) +{ + return -1; +} + +static void print_stack_address(void *data, unsigned long addr, int reliable) +{ + struct print_stack_data *sdata = data; + if (sdata->level++ < sdata->max_level) + _stp_func_print(addr,sdata->verbose, 0); +} + +static const struct stacktrace_ops print_stack_ops = { + .warning = print_stack_warning, + .warning_symbol = print_stack_warning_symbol, + .stack = print_stack_stack, + .address = print_stack_address, +}; + +static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels) +{ + struct print_stack_data print_data; + print_data.verbose = verbose; + print_data.max_level = levels; + print_data.level = 0; + dump_trace(current, NULL, (long *)stack, 0, &print_stack_ops, + &print_data); +} +#endif /** Prints the stack backtrace * @param regs A pointer to the struct pt_regs. */ -void _stp_stack_print(struct pt_regs *regs, int verbose, struct kretprobe_instance *pi, int levels) +static void _stp_stack_print(struct pt_regs *regs, int verbose, struct kretprobe_instance *pi, int levels) { if (verbose) { /* print the current address */ @@ -75,7 +130,7 @@ void _stp_stack_print(struct pt_regs *regs, int verbose, struct kretprobe_instan * @param regs A pointer to the struct pt_regs. * @returns void */ -void _stp_stack_snprint(char *str, int size, struct pt_regs *regs, int verbose, struct kretprobe_instance *pi, int levels) +static void _stp_stack_snprint(char *str, int size, struct pt_regs *regs, int verbose, struct kretprobe_instance *pi, int levels) { /* To get a string, we use a simple trick. First flush the print buffer, */ /* then call _stp_stack_print, then copy the result into the output string */ @@ -93,7 +148,7 @@ void _stp_stack_snprint(char *str, int size, struct pt_regs *regs, int verbose, * @note Currently limited to a depth of two. Works from jprobes and kprobes. */ #if 0 -void _stp_ustack_print(char *str) +static void _stp_ustack_print(char *str) { struct pt_regs *nregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)current->thread_info)) - 1; _stp_printf("%p : [user]\n", (int64_t) REG_IP(nregs)); @@ -103,4 +158,39 @@ void _stp_ustack_print(char *str) #endif /* 0 */ /** @} */ + +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) + int i; + unsigned long backtrace[MAXBACKTRACE]; + struct stack_trace trace; + int maxLevels = min(levels, MAXBACKTRACE); + memset(&trace, 0, sizeof(trace)); + trace.entries = &backtrace[0]; + trace.max_entries = maxLevels; + trace.skip = 0; + save_stack_trace_tsk(tsk, &trace); + for (i = 0; i < maxLevels; ++i) { + if (backtrace[i] == 0 || backtrace[i] == ULONG_MAX) + break; + _stp_printf("%lx ", backtrace[i]); + } +#endif +} + +/** Writes a task stack backtrace to a string + * + * @param str string + * @param tsk A pointer to the task_struct + * @returns void + */ +void _stp_stack_snprint_tsk(char *str, int size, struct task_struct *tsk, int verbose, int levels) +{ + _stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id()); + _stp_print_flush(); + _stp_stack_print_tsk(tsk, verbose, levels); + strlcpy(str, pb->buf, size < (int)pb->len ? size : (int)pb->len); + pb->len = 0; +} #endif /* _STACK_C_ */ diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog deleted file mode 100644 index 6c2304ce..00000000 --- a/runtime/staprun/ChangeLog +++ /dev/null @@ -1,904 +0,0 @@ -2008-01-11 Mark Wielaard <mjw@redhat.com> - - * staprun.h: include config.h for dependency. - -2008-12-08 Frank Ch. Eigler <fche@elastic.org> - - PR7062 - * staprun.c (enable_uprobes): Find uprobes.ko based on - SYSTEMTAP_RUNTIME. - (main): Unset SYSTEMTAP_* environment vars if setuid. - -2008-12-03 Roland McGrath <roland@redhat.com> - - PR7063 - * staprun.c (main): Use $SYSTEMTAP_STAPIO instead of hard-coded path. - Remove SYSTEMTAP_STAPRUN and SYSTEMTAP_STAPIO - environment variables when setuid is in effect. - * mainloop.c (cleanup_and_exit): Use $SYSTEMTAP_STAPRUN to re-exec, - not hard-coded path. - -2008-12-03 Frank Ch. Eigler <fche@elastic.org> - - PR6925 - * staprun (init_staprun): If a stap_* module load fails, try - to unload possible leftover, and try again. - -2008-11-28 Frank Ch. Eigler <fche@elastic.org> - - PR4783 - * staprun.c (remove_module): Don't reset with setpriority(0), - as we never set it to high-priority any more anyway. - * mainloop.c (system_cmd): Ditto. - -2008-11-12 Frank Ch. Eigler <fche@elastic.org> - - PR6964 redux. - * mainloop (WORKAROUND_BZ467568): New macro to control - behavior. - (start_cmd, stp_main_loop): Use signal/pause-based - synchronization as a fallback for rhbz 467568. - -2008-10-28 Frank Ch. Eigler <fche@elastic.org> - - PR6964, from Wenji Huang <wenji.huang@oracle.com>: - * mainloop.c (start_cmd, stp_main_loop): Temporarily - disable ptrace calls. - -2008-10-15 Frank Ch. Eigler <fche@elastic.org> - - * mainloop.c (start_cmd): Fix wordexp error handling. - -2008-09-18 David Smith <dsmith@redhat.com> - - PR 6903. - * staprun_funcs.c (check_permissions): Instead of checking the - effective uid, check the real uid for root permissions. - -2008-09-06 Frank Ch. Eigler <fche@elastic.org> - - * mainloop.c (start_cmd): Rewrite to use wordexp/execvp/ptrace. - (stp_main_loop): Use ptrace detach to resume target process. - -2008-09-05 Frank Ch. Eigler <fche@elastic.org> - - * staprun.c (run_as): Teach it to exec too. Update callers. - Always do set[ug]id as dictated. - * staprun.h (do_cap): Remove. Update all callers. - * staprun_funcs.c: Ditto. - * cap.c: Removed. Update headers. - -2008-07-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6736. - * common.c (send_request): Move here ... - * mainloop.c: from here. - * staprun.c (send_relocations): New function to send kernel - and module relocation bases to probe module. - * staprun.h: Corresponding changes. - -2008-06-03 Frank Ch. Eigler <fche@elastic.org> - - PR 6429. - * mainloop.c (stp_main_loop): Remove STP_UNWIND message support. - -2008-05-05 Martin Hunt <hunt@redhat.com> - - * mainloop.c (child_proc): Handle sig_chld - in the proper thread. - (signal_thread): Don't call send_request() - because it isn't thread-safe. - -2008-05-05 Martin Hunt <hunt@redhat.com> - - * mainloop.c (signal_thread): New thread to handle signals - better. - (setup_main_signals): Create signal thread. - -2008-04-30 Masami Hiramatsu <mhiramat@redhat.com> - - PR 6008 - * common.c (parse_args): Increase the limitation of the buffer size - to 4095MB. - * common.c (usage): Ditto. - -2008-04-30 Masami Hiramatsu <mhiramat@redhat.com> - - * stapio.c (main): Fix a typo in a debug message. - * staprun.c (main): Ditto. - -2008-04-24 Frank Ch. Eigler <fche@elastic.org> - - PR 6451. - * common.c (control_channel): Initialize to -1. - * ctl.c (close_ctl_channel): Tolerate fd=0. - -2008-04-22 Martin Hunt <hunt@redhat.com> - - * cap.c (init_cap): Detect capabilities failure and - run with them disabled. - -2008-04-22 Martin Hunt <hunt@redhat.com> - - * mainloop.c (send_request): Move here from common.c - staprun no longer send any messages. - -2008-04-22 hunt <hunt@redhat.com> - - * common.c (usage): Add -d option. - -2008-04-21 Martin Hunt <hunt@redhat.com> - - * staprun.c, stapio.c, staprun.h, mainloop.c, staprun_funcs.c, - ctl.c, common.c: Add "-d" option to have staprun remove - modules. Have staprun exec stapio and then have stapio - exec "staprun -d" to remove the module when finished. - -2008-04-16 Martin Hunt <hunt@redhat.com> - - * ctl.c (init_ctl_channel): Remove unused parameter. - Just opens one channel now. - -2008-02-21 David Smith <dsmith@redhat.com> - - * staprun_funcs.c (check_path): Small security fix. - -2008-01-21 Martin Hunt <hunt@redhat.com> - - * symbols.c (send_module): Simplify and use new send_data() - function to keep longword alignment. - -2008-01-14 Martin Hunt <hunt@redhat.com> - - PR4037 and fixes to better synchronize staprun and stapio. - * symbols.c (send_data): Send header and data seperately, saving - a memcpy and avoiding any alignment issues. - (get_sections): Return -1 on error instead of just exiting - and leaving stapio hanging. Send data in proper format even if kernel - pointers are different size. - (send_module): Return -1 on error instead of just exiting - and leaving stapio hanging. - (do_module): Ditto. - (compar): Removed. - (do_kernel_symbols): Rewrite to be more robust. Return -1 on - error instead of just exiting and leaving stapio hanging. - - * staprun_funcs.c (handle_symbols): Signal stapio if we error out. - Set kernel_ptr_size; - - * staprun.h (kernel_ptr_size): Declare. - - * mainloop.c (stp_main_loop): When ready, send STP_READY. - -2008-01-12 Frank Ch. Eigler <fche@elastic.org> - - PR 5603 horrible hack. - * symbols.c (do_kernel_symbols): Make buf[256] instead of [128]. - -2007-12-11 Martin Hunt <hunt@redhat.com> - PR5368 - * relay_old.c (init_oldrelayfs): Don't start threads - if load_only. - * relay.c (init_relayfs): Ditto. - -2007-11-09 Martin Hunt <hunt@redhat.com> - - * mainloop.c (stp_main_loop): Bump recvbuf to 8196 for - compatibility with old transport. - -2007-10-26 Martin Hunt <hunt@redhat.com> - PR5218 - * stapio.c (main): Set initialized properly when - attached. - -2007-10-12 Martin Hunt <hunt@redhat.com> - Changes to separate the symbols from the command channel. - - * cap.c (init_cap): Add CAP_DAC_OVERRIDE. - * staprun.h: Change init_ctl_channel prototype. - * ctl.c (init_ctl_channel): Modify to open either - a command or symbol channel. Use ".cmd" and ".symbols" - as the new names. - * mainloop.c (init_stapio): Call init_ctl_channel(0); - * staprun.c (cleanup): Call stop_symbol_thread(). - (main): Call start_symbol_thread(). - * staprun_funcs.c (handle_symbols): Make a thread. - (start_symbol_thread): New. - (stop_symbol_thread): New. - -2007-10-11 Frank Ch. Eigler <fche@elastic.org> - - * staprun.c (main): Move checks for init_cap and getuid - from just before command line argument parsing to just after. - -2007-10-09 Martin Hunt <hunt@redhat.com> - - * common.c (set_clexec): New. - * staprun.h: Add prototype for set_clexec. - * relay*.c, ctl.c: Call set_clexec after - file opens. - -2007-09-14 Martin Hunt <hunt@redhat.com> - - * ctl.c (init_ctl_channel): Return 1 if the ctl file opened - was for the old relayfs transport. - - * mainloop.c (init_stapio): Don't call using_old_transport(). - Use the return of init_ctl_channel() instead. - (using_old_transport): Deleted. - -2007-08-31 Martin Hunt <hunt@redhat.com> - - * mainloop.c (start_cmd): Set the priority to - forked processes back to normal. - (system_cmd): Ditto. - -2007-08-21 Martin Hunt <hunt@redhat.com> - - * mainloop.c (start_cmd): Send SIGINT to target_cmd, - not stapio. - -2007-08-20 David Smith <dsmith@redhat.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * common.c (parse_args): Make sure the '-c' and '-x' options can't - be specified together. - -2007-08-15 David Smith <dsmith@redhat.com> - - * staprun.c (main): Quit if effective uid is not root. - -2007-08-15 Martin Hunt <hunt@redhat.com> - PR4736 - * staprun.c (cleanup): Set priority back to normal - before removing module. - -2007-08-15 Martin Hunt <hunt@redhat.com> - - * stap_merge.tcl: New. - -2007-08-14 David Smith <dsmith@redhat.com> - - Merge from setuid-branch. Changes also by Martin Hunt - <hunt@redhat.com>. - - * staprun.c (init_staprun): Drop CAP_SYS_ADMIN when we're done - with it. - (main): Calls parse_modpath instead of path_parse_modname. Just - call parse_modpath with argv[optind]. Let it allocate and set - modpath and modname. If no modulename was given, display usage - and exit. Drop CAP_SYS_NICE when we're done with it. Set - atexit(exit_cleanup) so cleanup always gets called and modules get - removed. Call handle_symbols. - (run_stapio): Set argv[0] to stapio so that it executes as itself - instead of staprun. - (cleanup): Only do cleanups once and only try to remove module - when appropriate. - (exit_cleanup): New. Calls cleanup(). - (mountfs): Sets uid to root before making directory and then - restores uid. - (setup_ctl_channel): Uses DEBUGFS define and improved - error message. - (setup_relayfs): Ditto. - (setup_oldrelayfs): Uses DEBUGFS and RELAYFS defines. - (run_stp_check): Replaced by mountfs(). - (mountfs): New function. Replaces an external script with C code. - (init_staprun): Calls mountfs() instead of run_stp_check(). - - * staprun.h: Renamed path_parse_modname to parse_modpath. Added - MODULE_NAME_LEN define. Added [_][p]err macros. Removed - VERSION_CMD. - - * mainloop.c (cleanup_and_exit): Make sure initialized is 2 - before exiting with code 2. - (stp_main_loop): Set initialized to 2 when STP_TRANSPORT - is received. Call cleanup_and_exit() with proper status. - (start_cmd): exit 1 instead of -1. - (system_cmd): Ditto. - (init_staprun): Renamed init_stapio. - (cleanup_and_exit): Set exit status. - - * cap.c: New file. - * common.c: New file. - * stapio.c: New file. - * staprun_funcs.c: New file. - * Makefile: Removed. - - * symbols.c (get_sections): Move the filter code up so that - uninteresting section names are filtered out before - attempting to open them. - (do_kernel_symbols): Better detect overfow conditions and realloc - new space. - (do_module): After sending all modules, send a null message to - indicate we are finished. - - * ctl.c (init_ctl_channel): When attempting to attach, if the - control channel doesn't exist, print a better error message. - - * relay_old.c (init_oldrelayfs): Errors out if - open_relayfs_files() couldn't open any files. - - PR 4795 - * mainloop.c (send_request): Fixed buffer overflow check. - * staprun.h: Added buffer overflow checking versions of - strcpy/sprintf/snprintf. - * common.c (path_parse_modname): Checks for overflows on - strcpy/sprintf/snprintf. - (read_buffer_info): Ditto. - * ctl.c (init_ctl_channel): Ditto. - * relay.c (init_relayfs): Ditto. - * relay_old.c (open_relayfs_files): Ditto. - (init_oldrelayfs): Ditto. - * staprun_funcs.c (insert_module): Ditto. - (check_path): Ditto. - * symbols.c (get_sections): Ditto. - -2007-07-09 David Smith <dsmith@redhat.com> - - * relay.c (init_relayfs): Fixed a buffer size bug introduced by - the last change. - -2007-07-09 David Smith <dsmith@redhat.com> - - * relay.c (init_relayfs): Make sure buffers are big enough to hold - a full path. - * relay_old.c (init_oldrelayfs): Ditto. - -2007-07-09 David Smith <dsmith@redhat.com> - - * ctl.c (read_buffer_info): Make sure buffer is big enough to hold - a full path. - (init_ctl_channel): Ditto. - -2007-07-02 Martin Hunt <hunt@redhat.com> - - * symbols.c (get_sections): Set data pointer to the lowest address - of any data section. - -2007-06-21 Martin Hunt <hunt@redhat.com> - - * relay.c (init_relayfs): Send message to check for bulkmode. - -2007-06-20 Martin Hunt <hunt@redhat.com> - - * stap_merge.c (main): Add verbose option. Will realloc - buffer if current size is too small. Check return codes - from writes so gcc won't complain. - -2007-06-07 Martin Hunt <hunt@redhat.com> - - * relay_old.c (open_relayfs_files): Add support for - output file names (-o) with bulk (relayfs) mode. - -2007-06-04 Martin Hunt <hunt@redhat.com> - - * mainloop.c (cleanup_and_exit): Disable signals - while exiting. - (fatal_handler): Use return values from write() to - avoid warnings. - -2007-05-24 Martin Hunt <hunt@redhat.com> - - * mainloop.c (cleanup_and_exit): Fix typo. - -2007-05-22 Martin Hunt <hunt@redhat.com> - - * mainloop.c (init_staprun): Change dbug() call. - - * relay.c: Fix ppoll() call and some race conditions involving - signals. - -2007-05-10 Martin Hunt <hunt@redhat.com> - - * relay.c (reader_thread): Set timeout for streaming to - 200ms. - -2007-05-09 Martin Hunt <hunt@redhat.com> - - * relay.c (reader_thread): For bulk mode, set timeout to NULL - so ppoll never times out. - -2007-05-08 Martin Hunt <hunt@redhat.com> - - * relay.c (ppoll): Add a compatibility function for - glibc < 2.4. - -2007-05-08 Martin Hunt <hunt@redhat.com> - Signal handler cleanup. - * mainloop.c (fatal_handler): New. Cleanly handle - unexpected fatal signals. - (setup_main_signals): New. Set signals once mainloop - is entered. - (setup_signals): New. Block certain signals during initialization. - Set handler for fatal signals. - * relay.c (reader_thread): Use ppoll(). Terminate on - SIGUSR2 after reading any remaining data. - (close_relayfs): Remove sleep hack. Send SIGUSR2 to all threads. - - Runtime debug messages. - * staprun.h: Change dbug() to accept a debuglevel and - enable it. - * *.c: Modify dbug() calls. - -2007-05-07 Martin Hunt <hunt@redhat.com> - Patch from David Smith - * mainloop.c (stp_main_loop): Properly handle write() - return value. Fixes build problem with some compilers. - -2007-04-10 Martin Hunt <hunt@redhat.com> - - * relay.c (close_relayfs): Give threads some time to - run before closing. - -2007-04-06 Martin Hunt <hunt@redhat.com> - - * stp_merge.c (main): Remove extra newline in output. - * stap_merge.c: Renamed from stp_merge.c. - * Makefile: Updated. - -2007-04-02 Martin Hunt <hunt@redhat.com> - - * relay_old.c (close_oldrelayfs): If just detaching, call - pthread_cancel. - (open_relayfs_files): Just return 0 if relay_fd[cpu] not opened. - (init_oldrelayfs): Scan percpu files to calculate ncpus. - - * mainloop.c (init_staprun): Call old transport init when necessary. - (cleanup_and_exit): Ignore signals when cleaning up. - - * ctl.c (read_buffer_info): For old transport, need to read transport - parameters. - -2007-03-26 Martin Hunt <hunt@redhat.com> - - * mainloop.c (run_stp_check): Just use system() call. - (init_staprun): Remove _stp_pid module parameter. - (cleanup_and_exit): If closed==2, just exit without removing module. - (driver_poll): Remove. We no longer require stap running. - (_stp_main_loop): Remove call to driver_poll. - - * ctl.c (init_ctl_channel): Don't put files in systemtap_pid, - revert back to systemtap/modulename. - - * relay.c: Revert back to systemtap/modulename paths. - * relay_old.c: Ditto. - - * staprun.c: Add -L and -A args. - -2007-03-20 Martin Hunt <hunt@redhat.com> - - * symbols.c (send_module): If send returns < 0 then - cleanup and exit. - (do_kernel_symbols): Ditto. - -2007-03-18 Martin Hunt <hunt@redhat.com> - * staprun.h (err): Define. - * symbols.c (get_sections): More overflow checking. - -2007-03-18 Martin Hunt <hunt@redhat.com> - * symbols.c (get_sections): Filter out .gnu.linkonce.* sections - except for .gnu.linkonce.this_module. - -2007-03-18 Martin Hunt <hunt@redhat.com> - * staprun.h (VERSION_CMD): Command to use for version check. - Changes to support runtime decision on new or old transport. - * mainloop.c (init_staprun): Check the kernel version at runtime - instead of at compile time. - (cleanup_and_exit): Call the correct relayfs close function. - (stp_main_loop): Call the correct relayfs init function. - * relay.c: Remove ifdef wrapper. File is always compiled and used - if the kernel version is appropriate. - * relay_old.c: Ditto. - -2007-03-14 Martin Hunt <hunt@redhat.com> - - * staprun.c: Renamed from stpd.c. Removed quiet and print_only - options. Added "-x" option as an alias for "-t". Removed "-m" - option. Updated arg processing to leave 4 slots for modoptions[]. - Bump the priority of staprun. - * ctl.c: New. Transport control channel functions. - * relay.c: New. Relayfs control functions for new transport. - * relay_old.c: New. Relayfs control functions for older - versions of relayfs. - * mainloop.c: New. Staprun main loop. - * staprun.h: Renamed from librelay.h. Cleaned up. - - * stap_merge.c: Renamed. Updated for modified save format. - - -2006-12-11 Martin Hunt <hunt@redhat.com> - - * symbols.c (get_sections): Set buffer sizes to large enough - sizes to hold all possible values, but also include checks in case - we are wrong. - -2006-11-15 Martin Hunt <hunt@redhat.com> - - * symbols.c (do_kernel_symbols): Add sizeof(long) to sym_base - to preserve 64-bit alignment. - -2006-11-09 Martin Hunt <hunt@redhat.com> - - * librelay.c: Change all references to transport messages - to use the new names with "_stp" prefix. - (stp_main_loop): For STP_SYMBOLS, check pointer size and - endianess to confirm staprun is compatible with the kernel. - - * librelay.h: Move a bunch of common includes here. - * stpd.c: Cleanup includes. - * symbols.c: Ditto. - -2006-11-02 Martin Hunt <hunt@redhat.com> - - * symbols.c: New file. Sends symbol and module information to - the systemtap module. - - * librelay.c (stp_main_loop): Add STP_MODULE and STP_SYMBOLS - message handling. - - * librelay.h: Add some new function prototypes. - - * Makefile (CFLAGS): Set to be the same as for building modules. - Added symbols.c to sources. - -2006-10-10 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c (merge_output): Add check for min when writing - output, otherwise last write happens twice. - -2006-09-26 David Smith <dsmith@redhat.com> - - * Makefile: Changed 'stpd' references to 'staprun'. - * librelay.c: Ditto. - * stpd.c: Ditto. - -2006-09-25 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c (kill_percpu_threads): Remove printf. - (wait_for_percpu_threads): New. - (process_subbufs): Remove processing, processing_mutex, exit - thread if exiting flag set. - (read_last_buffers): Removed. - (cleanup_and_exit): Remove call to read_last_buffers, wait for - threads to read flushed buffers instead. - (stp_main_loop): Remove mutex init. - -2006-09-22 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c (init_relayfs): Cleanup if stp_check fails. - -2006-09-19 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c (init_relayfs): Add debugfs path to relay files and - add new systemtap directory to path. - (init_stp): rmmod module on failure. - (merge_output): Remove debugging printfs left in code. - (close_relay_files): Clear relay_file descriptor after close. - (cleanup_and_exit): Allow cleanup and exit even if there was an - error opening relay files. - (stp_main_loop): Call cleanup_and_exit() if init_relayfs() fails. - -2006-09-18 Martin Hunt <hunt@redhat.com> - - * stpd.c (usage): Remove "-m" option. - (main): Print warning if "-m" is used. - * librelay.c (merge_output): Rewrite to handle - new format that support binary. - (stp_main_loop): Read merge option from the - transport info message. - -2006-09-13 Martin Hunt <hunt@redhat.com> - - * librelay.c (init_relayfs): Exec stp_check and find - relay_filebase. - - * librelay.h (stp_main_loop): Fix declaration of init_stp(). - - * stpd.c (usage): Remove "-r" option. - (main): Don't find stpd_filebase and don't send it to init_stp(). - - -2006-08-02 Tom Zanussi <zanussi@us.ibm.com> - - * stpd.c (main): Use modname rather than driver_pid in - stpd_filebase. - -2006-07-20 Martin Hunt <hunt@redhat.com> - - * librelay.c (stp_main_loop): If module doesn't start, kill any - target command. - -2006-06-23 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c (cleanup_and_exit): Close relay files even if - not merging. - -2006-06-13 Martin Hunt <hunt@redhat.com> - - * librelay.c (start_cmd): Rewrite using sigwait() to eliminate - a race. - -2006-05-18 Martin Hunt <hunt@redhat.com> - - * librelay.c (stp_main_loop): Set output to always be line - buffered. - -2006-04-08 Martin Hunt <hunt@redhat.com> - - * librelay.c (stp_main_loop): Write with fwrite() instead - of fputs() so we can write binary data. - -2006-04-05 Martin Hunt <hunt@redhat.com> - * librelay.c (merge_output): Remove ANSI codes and write - warning to stderr. - -2006-04-05 Martin Hunt <hunt@redhat.com> - * librelay.c (merge_output): Set the output filename if necessary. - (merge_output): - - * stpd.c (main): Don't reset output_filename just because - relayfs is possible. Move that code to librelay.c. - -2006-04-04 Roland McGrath <roland@redhat.com> - - * stpd.c (main): Cast f_type when comparing; type differs by machine. - -2006-04-04 Tom Zanussi <zanussi@us.ibm.com> - - * stpd.c (main): Check that /mnt/relay is actually relayfs. - -2006-03-15 Tom Zanussi <zanussi@us.ibm.com> - - * stpd.c (main): Add runtime check for relayfs vs relay-on-proc. - -2006-03-06 Martin Hunt <hunt@redhat.com> - - * librelay.c (start_cmd): Set proper uid/gid before execing - command. - (system_cmd): New function. - (cleanup_and_exit): Wait for any child processes to complete. - (stp_main_loop): Recognize STP_SYSTEM message. - - * stpd.c (main): Add support for "-u username". - -2006-02-25 Martin Hunt <hunt@redhat.com> - - * librelay.c (init_stp): Better error handling and cleanup. - -2006-02-23 Frank Ch. Eigler <fche@elastic.org> - - PR 1304 - * stpd.c (mdooptions): New array. - (main): Populate it with leftover arguments. - * librelay.c (init_stp): Pass it to execve(). - -2005-12-08 Frank Ch. Eigler <fche@elastic.org> - - PR 1937 - * stpd.c (main): Support new "-d" option. - (usage): Document it. - * librelay.c (driver_poll): New function to react to death of - driver process. - (stp_main_loop): Call it if "-d PID" given. Treat SIGHUP like others. - -2005-10-19 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c: Move output_file var to stpd.c. - (stp_main_loop): If the output_file option was specified, - and streaming mode is being used, send output to the file - instead of stdout. If !streaming, send output to the file - instead of probe.out. - * stpd.c (usage): Add comment for -o option. - (main): Add -o option. - -2005-10-19 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c (merge_output): Switch to binary TIMESTAMP. - * stp_dump.c (main): Switch to binary TIMESTAMP. - * stp_merge.c (main): Switch to binary TIMESTAMP. - -2005-10-14 Tom Zanussi <zanussi@us.ibm.com> - - PR 1476 - * librelay.c: Add flag for buffer processing. - (reader_thread): Disable/enable cancel state around buffer - processing, and update flag to show we're busy processing. - (cleanup_and_exit): Wait for any threads busy processing. - (stp_main_loop): Initialize processing mutex. - -2005-09-06 Martin Hunt <hunt@redhat.com> - - * librelay.c: Remove all USE_PROCFS ifdefs. - (sig_usr): Signal handler for SIGUSR1. - (start_cmd): New function to handle "-c" option, forks() - off a new process then waits for SIGUSR1 to exec it. - (init_stp): Call start_cmd(). - (stp_main_loop): Set a signal handler for SIGCHLD. - - * stpd.c (main): Add "-t" and "-c" options. - (usage): Update with new options. - -2005-08-29 Martin Hunt <hunt@redhat.com> - - * stpd.c main): Add enable_relayfs flag. - Turn it off with "-r". - -2005-08-24 Martin Hunt <hunt@redhat.com> - - * librelay.c (sigproc): Removed the "Exiting..." - message for now. - -2005-08-24 Martin Hunt <hunt@redhat.com> - - * librelay.c (sigproc): Reestablish signal handler so - impatient people don't hit ^C twice and terminate the - program before it saves the data and removes the module. - Also print a message to stderr that it is exiting. - (stp_main_loop): Write OOB data (warnings, errors, etc) - to stderr instead of stdout. - * librelay.h: Write debug info to stderr. - * Makefile: add librelay.h to dependencies. - -2005-08-23 Martin Hunt <hunt@redhat.com> - - * librelay.c (merge_output): Don't add an extra \n. - -2005-08-23 Martin Hunt <hunt@redhat.com> - - * librelay.c (read_last_buffers): New function. Directly grab the - last buffers. - (info_pending): Deleted. - (request_last_buffers): Deleted. - -2005-08-22 Martin Hunt <hunt@redhat.com> - - * Makefile (debug): Add debug target. - * librelay.h (dbug): Define. - * librelay.c: Enable some dbug lines. - -2005-08-19 Martin Hunt <hunt@redhat.com> - - * librelay.c (reader_thread): Check the return value for write(). - -2005-08-19 Frank Ch. Eigler <fche@elastic.org> - - * librelay.c (modpath): New global. Use it for insmod only. - * stpd.c (main): Set both modpath and modname, to support - modules specified by full path name. - -2005-08-19 Martin Hunt <hunt@redhat.com> - - * stpd.c (main): Simplify buffer size code. - * librelay.c: Major changes to support procfs instead of netlink. - -2005-08-03 Tom Zanussi <trz@us.ibm.com> - - * librelay.c: Track subbuf info requests/replies - so we know unequivocally when it's ok to do final - processing. - (reader_thread): Remove buffer-full warning. - -2005-08-03 Martin Hunt <hunt@redhat.com> - * librelay.c (init_stp): Change variable name to eliminate shadow warning. - -2005-08-03 Martin Hunt <hunt@redhat.com> - * librelay.c (open_control_channel): Set the receive buffer - to 512K, or the max allowed. - - * stpd.c: Remove "-n" subbug option and change "-b" option - so you can specify buffering in different ways. Add a verbose option. - Exec the "stp_check" script. - -2005-08-01 Frank Ch. Eigler <fche@redhat.com> - - * librelay.c: Correct fwrite api usage. - * all: Correct copyright holder name. - -2005-08-01 Martin Hunt <hunt@redhat.com> - - * librelay.h: Get structs and enums from - ../transport/transport_msgs.h to eliminate duplication. - - * librelay.c (send_request): Retry if send fails. - (open_relayfs_files): Use fopen() instead of open() for the - percpu tmpfiles. - (request_last_buffers): Just send cpu number for STP_BUF_INFO request. - (reader_thread): Ditto. - (process_subbufs): Use fwrite_unlocked() instead of write(). - (sigchld): Removed. - (init_stp): Go back to using system() instead of fork and exec - to load module. When done, send a TRANSPORT_INFO request. - (cleanup_and_exit): Change parameter to simple flag to - indicate if the module needs removing. - (sigproc): Remove complicated logic and just send STP_EXIT. - (stp_main_loop): When receiving STP_TRANSPORT_INFO, set - the local params and reply with a STP_START. When - receiving STP_START, there was an error, so cleanup and exit. - - * stpd.c (main): Added new options to set number of - buffers and their size. - -2005-07-29 Roland McGrath <roland@redhat.com> - - * librelay.c (process_subbufs): Use unsigned for I. - (sigproc): Add __attribute__((unused)) on parameter. - (sigchld): Likewise. Avoid shadowing global variable name. - (stp_main_loop): Add a cast. - -2005-07-18 Martin Hunt <hunt@redhat.com> - - * stp_merge.c (main): Fix dropped count calculation. - -2005-07-14 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c (reader_thread): Add missing pthread_mutex_lock - -2005-07-14 Frank Ch. Eigler <fche@redhat.com> - - * stpd.c (main): Pass !quiet mode to init_stp(). - * librelay.c (init_relayfs): Be quiet if !print_totals. - -2005-07-13 Martin Hunt <hunt@redhat.com> - - * stpd.c (usage): Fix usage string. - - * librelay.c (init_stp): Change last arg to NULL, not 0. - -2005-07-08 Martin Hunt <hunt@redhat.com> - - * librelay.c (sigchld): Signal handler to detect - completion of module loading. - (init_stp): Use fork/exec instead of system() so - we can get async signal of module load success/failure. - (cleanup_and_exit): New function. - (sigproc): If module is not loaded, don't send message to it. - (stp_main_loop): Call cleanup_and_exit() when STP_EXIT - is received. Don't send a request for the transport - mode. The module will send notification to the daemon - when it is ready. - - * stpd.c (main): Don't print message until module - is loaded. - -2005-07-01 Martin Hunt <hunt@redhat.com> - - * librelay.c: Removed the color coding of cpu output. - -2005-06-28 Martin Hunt <hunt@redhat.com> - - * librelay.c (merge_output): Use unlocked stdio - to improve speed. - - * stp_merge.c: New file. - - * Makefile: Add stp_merge. - -2005-06-27 Martin Hunt <hunt@redhat.com> - - * stpd.c (main): Add new command line arg, "-m" - to disable the per-cpu merging. - - * librelay.c (merge_output): Replacement for sort_output(). - Efficiently merges per-cpu streams. - - -2005-06-20 Tom Zanussi <zanussi@us.ibm.com> - - * librelay.c: Large refactoring, important changes are - added transport_mode command, for relayfs transport - display results only when probe completes and/or write - output file, merge, sort and delete the per-cpu files - in postprocessing, refactor so that relayfs files aren't - created until transport command received, removed sigalrm, - read the final subbuffers on exit - - * stpd.c: Remove all command-line args except for -p - and -q as well as all code related to buffer sizes. - - * librelay.h: Add transport mode command and struct. - -2005-05-16 Martin Hunt <hunt@redhat.com> - - * librelay.c (sigproc): If STP_EXIT send fails, keep retrying - every 10ms. - (init_stp): Don't set n_subbufs and subbuf_size params. diff --git a/runtime/staprun/mainloop.c b/runtime/staprun/mainloop.c index 2fb049b0..29eb4f1f 100644 --- a/runtime/staprun/mainloop.c +++ b/runtime/staprun/mainloop.c @@ -357,6 +357,8 @@ void cleanup_and_exit(int detach) err("\nDisconnecting from systemtap module.\n" "To reconnect, type \"staprun -A %s\"\n", modname); } else { const char *staprun = getenv ("SYSTEMTAP_STAPRUN") ?: BINDIR "/staprun"; +#define BUG9788_WORKAROUND +#ifndef BUG9788_WORKAROUND dbug(2, "removing %s\n", modname); if (execlp(staprun, basename (staprun), "-d", modname, NULL) < 0) { if (errno == ENOEXEC) { @@ -368,6 +370,51 @@ void cleanup_and_exit(int detach) perror(staprun); _exit(1); } +#else + pid_t pid; + int rstatus; + struct sigaction sa; + + dbug(2, "removing %s\n", modname); + + // So that waitpid() below will work correctly, we need to clear + // out our SIGCHLD handler. + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = SIG_DFL; + sigaction(SIGCHLD, &sa, NULL); + + pid = fork(); + if (pid < 0) { + _perr("fork"); + _exit(-1); + } + + if (pid == 0) { /* child process */ + /* Run the command. */ + if (execlp(staprun, basename (staprun), "-d", modname, NULL) < 0) { + if (errno == ENOEXEC) { + char *cmd; + if (asprintf(&cmd, "%s -d '%s'", staprun, modname) > 0) + execl("/bin/sh", "sh", "-c", cmd, NULL); + free(cmd); + } + perror(staprun); + _exit(1); + } + } + + /* parent process */ + if (waitpid(pid, &rstatus, 0) < 0) { + _perr("waitpid"); + _exit(-1); + } + + if (WIFEXITED(rstatus)) { + _exit(WEXITSTATUS(rstatus)); + } + _exit(-1); +#endif } _exit(0); } diff --git a/runtime/stat.c b/runtime/stat.c index e40a4f2d..689a84fe 100644 --- a/runtime/stat.c +++ b/runtime/stat.c @@ -74,7 +74,7 @@ typedef struct _Stat *Stat; * @param stop - An integer. The stopping value. Should be > start. * @param interval - An integer. The interval. */ -Stat _stp_stat_init (int type, ...) +static Stat _stp_stat_init (int type, ...) { int size, buckets=0, start=0, stop=0, interval=0; stat *sd, *agg; @@ -141,7 +141,7 @@ exit1: * * @param st Stat */ -void _stp_stat_del (Stat st) +static void _stp_stat_del (Stat st) { if (st) { _stp_free_percpu (st->sd); @@ -156,7 +156,7 @@ void _stp_stat_del (Stat st) * @param st Stat * @param val Value to add */ -void _stp_stat_add (Stat st, int64_t val) +static void _stp_stat_add (Stat st, int64_t val) { stat *sd = per_cpu_ptr (st->sd, get_cpu()); STAT_LOCK(sd); @@ -175,7 +175,7 @@ void _stp_stat_add (Stat st, int64_t val) * @param cpu CPU number * @returns A pointer to a stat. */ -stat *_stp_stat_get_cpu (Stat st, int cpu) +static stat *_stp_stat_get_cpu (Stat st, int cpu) { stat *sd = per_cpu_ptr (st->sd, cpu); STAT_LOCK(sd); @@ -203,7 +203,7 @@ static void _stp_stat_clear_data (Stat st, stat *sd) * for polling. * @returns A pointer to a stat. */ -stat *_stp_stat_get (Stat st, int clear) +static stat *_stp_stat_get (Stat st, int clear) { int i, j; stat *agg = st->agg; @@ -242,7 +242,7 @@ stat *_stp_stat_get (Stat st, int clear) * * @param st Stat */ -void _stp_stat_clear (Stat st) +static void _stp_stat_clear (Stat st) { int i; stp_for_each_cpu(i) { diff --git a/runtime/string.c b/runtime/string.c index 13c46dda..cdafbf64 100644 --- a/runtime/string.c +++ b/runtime/string.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * String Functions - * Copyright (C) 2005, 2006, 2007 Red Hat Inc. + * Copyright (C) 2005, 2006, 2007, 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 @@ -28,7 +28,7 @@ * variable number of args. */ -int _stp_snprintf(char *buf, size_t size, const char *fmt, ...) +static int _stp_snprintf(char *buf, size_t size, const char *fmt, ...) { va_list args; int i; @@ -39,7 +39,7 @@ int _stp_snprintf(char *buf, size_t size, const char *fmt, ...) return i; } -int _stp_vscnprintf(char *buf, size_t size, const char *fmt, va_list args) +static int _stp_vscnprintf(char *buf, size_t size, const char *fmt, va_list args) { unsigned i = _stp_vsnprintf(buf,size,fmt,args); return (i >= size) ? (size - 1) : i; @@ -60,9 +60,8 @@ int _stp_vscnprintf(char *buf, size_t size, const char *fmt, va_list args) * in will have "..." after the second quote. * @param user Set this to indicate the input string pointer is a userspace pointer. */ -void _stp_text_str(char *outstr, char *in, int len, int quoted, int user) +static void _stp_text_str(char *outstr, char *in, int len, int quoted, int user) { - const int length = len; char c, *out = outstr; if (len == 0 || len > MAXSTRINGLEN-1) diff --git a/runtime/string.h b/runtime/string.h index 6106b009..f4d4cc05 100644 --- a/runtime/string.h +++ b/runtime/string.h @@ -1,5 +1,5 @@ /* -*- linux-c -*- - * Copyright (C) 2005, 2007 Red Hat Inc. + * Copyright (C) 2005, 2007, 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 @@ -9,12 +9,8 @@ #ifndef _STRING_H_ #define _STRING_H_ -/* set up a special stdout string */ -static char _stp_stdout[] = "_stdout_"; - #define to_oct_digit(c) ((c) + '0') -void _stp_vsprintf (char *str, const char *fmt, va_list args); -void _stp_text_str(char *out, char *in, int len, int quoted, int user); +static void _stp_text_str(char *out, char *in, int len, int quoted, int user); /* * Powerpc uses a paranoid user address check in __get_user() which diff --git a/runtime/sym.c b/runtime/sym.c index 82eef17d..3788544e 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Symbolic Lookup Functions - * Copyright (C) 2005-2008 Red Hat Inc. + * Copyright (C) 2005-2009 Red Hat Inc. * Copyright (C) 2006 Intel Corporation. * * This file is part of systemtap, and is free software. You can @@ -21,11 +21,10 @@ */ /* XXX: this needs to be address-space-specific. */ -unsigned long _stp_module_relocate(const char *module, const char *section, unsigned long offset) +static unsigned long _stp_module_relocate(const char *module, const char *section, unsigned long offset) { static struct _stp_module *last = NULL; static struct _stp_section *last_sec; - unsigned long flags; unsigned i, j; /* if module is -1, we invalidate last. _stp_del_module calls this when modules are deleted. */ @@ -134,7 +133,6 @@ static const char *_stp_kallsyms_lookup(unsigned long addr, unsigned long *symbo struct _stp_module *m = NULL; struct _stp_section *sec = NULL; struct _stp_symbol *s = NULL; - unsigned long flags; unsigned end, begin = 0; m = _stp_mod_sec_lookup(addr, task, &sec); @@ -256,7 +254,7 @@ static int _stp_module_check(void) * a probe because it is too time-consuming. Use at module exit time. */ -void _stp_symbol_print(unsigned long address) +static void _stp_symbol_print(unsigned long address) { const char *modname; const char *name; @@ -275,7 +273,7 @@ void _stp_symbol_print(unsigned long address) } /* Like _stp_symbol_print, except only print if the address is a valid function address */ -int _stp_func_print(unsigned long address, int verbose, int exact) +static int _stp_func_print(unsigned long address, int verbose, int exact) { const char *modname; const char *name; @@ -303,7 +301,7 @@ int _stp_func_print(unsigned long address, int verbose, int exact) return 0; } -void _stp_symbol_snprint(char *str, size_t len, unsigned long address, +static void _stp_symbol_snprint(char *str, size_t len, unsigned long address, struct task_struct *task) { const char *modname; diff --git a/runtime/sym.h b/runtime/sym.h index 9d6a4ded..e642cab4 100644 --- a/runtime/sym.h +++ b/runtime/sym.h @@ -54,15 +54,15 @@ struct _stp_module { /* Defined by translator-generated stap-symbols.h. */ -struct _stp_module *_stp_modules []; -unsigned _stp_num_modules; +static struct _stp_module *_stp_modules []; +static unsigned _stp_num_modules; /* the number of modules in the arrays */ static unsigned long _stp_kretprobe_trampoline = 0; -unsigned long _stp_module_relocate (const char *module, const char *section, unsigned long offset); +static unsigned long _stp_module_relocate (const char *module, const char *section, unsigned long offset); static struct _stp_module *_stp_get_unwind_info (unsigned long addr); #endif /* _STP_SYM_H_ */ diff --git a/runtime/task_finder.c b/runtime/task_finder.c index 31bccad8..ae381a41 100644 --- a/runtime/task_finder.c +++ b/runtime/task_finder.c @@ -22,14 +22,14 @@ struct stap_task_finder_target; #define __STP_TF_RUNNING 1 #define __STP_TF_STOPPING 2 #define __STP_TF_STOPPED 3 -atomic_t __stp_task_finder_state = ATOMIC_INIT(__STP_TF_STARTING); -atomic_t __stp_inuse_count = ATOMIC_INIT (0); +static atomic_t __stp_task_finder_state = ATOMIC_INIT(__STP_TF_STARTING); +static atomic_t __stp_inuse_count = ATOMIC_INIT (0); #define __stp_tf_handler_start() (atomic_inc(&__stp_inuse_count)) #define __stp_tf_handler_end() (atomic_dec(&__stp_inuse_count)) #ifdef DEBUG_TASK_FINDER -atomic_t __stp_attach_count = ATOMIC_INIT (0); +static atomic_t __stp_attach_count = ATOMIC_INIT (0); #define debug_task_finder_attach() (atomic_inc(&__stp_attach_count)) #define debug_task_finder_detach() (atomic_dec(&__stp_attach_count)) @@ -55,7 +55,7 @@ typedef int (*stap_task_finder_vm_callback)(struct stap_task_finder_target *tgt, unsigned long vm_end, unsigned long vm_pgoff); -int __stp_tf_vm_cb(struct stap_task_finder_target *tgt, +static int __stp_tf_vm_cb(struct stap_task_finder_target *tgt, struct task_struct *tsk, int map_p, char *vm_path, unsigned long vm_start, @@ -230,6 +230,14 @@ stap_utrace_detach(struct task_struct *tsk, if (tsk == NULL || tsk->pid <= 1) return 0; +#ifdef PF_KTHREAD + // Ignore kernel threads. On systems without PF_KTHREAD, + // we're ok, since kernel threads won't be matched by the + // utrace_attach_task() call below. + if (tsk->flags & PF_KTHREAD) + return 0; +#endif + // Notice we're not calling get_task_mm() here. Normally we // avoid tasks with no mm, because those are kernel threads. // So, why is this function different? When a thread is in @@ -302,6 +310,14 @@ stap_utrace_detach_ops(struct utrace_engine_ops *ops) rcu_read_lock(); do_each_thread(grp, tsk) { +#ifdef PF_KTHREAD + // Ignore kernel threads. On systems without + // PF_KTHREAD, we're ok, since kernel threads won't be + // matched by the stap_utrace_detach() call. + if (tsk->flags & PF_KTHREAD) + continue; +#endif + rc = stap_utrace_detach(tsk, ops); if (rc != 0) goto udo_err; @@ -414,7 +430,14 @@ __stp_utrace_attach(struct task_struct *tsk, if (tsk == NULL || tsk->pid <= 1) return EPERM; - // Ignore threads with no mm (which are kernel threads). +#ifdef PF_KTHREAD + // Ignore kernel threads + if (tsk->flags & PF_KTHREAD) + return EPERM; +#endif + + // Ignore threads with no mm (which are either kernel threads + // or "mortally wounded" threads). mm = get_task_mm(tsk); if (! mm) return EPERM; @@ -917,7 +940,7 @@ utftq_out: } -struct vm_area_struct * +static struct vm_area_struct * __stp_find_file_based_vma(struct mm_struct *mm, unsigned long addr) { struct vm_area_struct *vma = find_vma(mm, addr); @@ -1218,7 +1241,7 @@ struct utrace_engine_ops __stp_utrace_task_finder_ops = { .report_death = stap_utrace_task_finder_report_death, }; -int +static int stap_start_task_finder(void) { int rc = 0; diff --git a/runtime/time.c b/runtime/time.c index 15e205dd..ad7cef9d 100644 --- a/runtime/time.c +++ b/runtime/time.c @@ -54,10 +54,10 @@ typedef struct __stp_time_t { struct timer_list timer; } stp_time_t; -void *stp_time = NULL; +static void *stp_time = NULL; /* Flag to tell the timer callback whether to reregister */ -int stp_timer_reregister = 0; +static int stp_timer_reregister = 0; /* Try to estimate the number of CPU cycles in a millisecond - i.e. kHz. This * relies heavily on the accuracy of udelay. By calling udelay twice, we @@ -185,7 +185,7 @@ __stp_time_cpufreq_callback(struct notifier_block *self, return NOTIFY_OK; } -struct notifier_block __stp_time_notifier = { +static struct notifier_block __stp_time_notifier = { .notifier_call = __stp_time_cpufreq_callback, }; @@ -205,7 +205,7 @@ __stp_constant_freq(void) #endif /* CONFIG_CPU_FREQ */ /* This function is called during module unloading. */ -void +static void _stp_kill_time(void) { if (stp_time) { @@ -227,7 +227,7 @@ _stp_kill_time(void) } /* This function is called during module loading. */ -int +static int _stp_init_time(void) { int ret = 0; @@ -268,7 +268,7 @@ _stp_init_time(void) return ret; } -int64_t +static int64_t _stp_gettimeofday_ns(void) { int64_t base; diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog deleted file mode 100644 index e8e2a047..00000000 --- a/runtime/transport/ChangeLog +++ /dev/null @@ -1,807 +0,0 @@ -2009-01-06 Frank Ch. Eigler <fche@elastic.org> - - PR9699. - * transport.c (_stp_transport_init): Adapt to task_struct cred switch. - -2008-11-28 Frank Ch. Eigler <fche@elastic.org> - - PR5947: make code -Wpointer-arith clean - * symbols.c (generic_swap): Cast void* to char* as needed. - (_stp_sort): Ditto. - * utt.c (utt_switch_subbuf): Ditto. - * utt.h (utt_reserve): Ditto. - -2008-11-13 Masami Hiramatsu <mhiramat@redhat.com> - - * utt.c (utt_trace_setup): Use KERN_WARNING and show buffer size. - -2008-11-13 Masami Hiramatsu <mhiramat@redhat.com> - - PR7016 - * utt.c (utt_trace_setup): Check freeram and bufferram before - allocating relay buffers for avoiding OOM. - -2008-11-12 Frank Ch. Eigler <fche@elastic.org> - - * transport.c (_stp_cleanup_and_exit): Move debug print into - one-time conditional block to prevent spew. - -2008-10-07 Frank Ch. Eigler <fche@elastic.org> - - PR 4886 - * symbols.c (_stp_do_relocation): Simplify processing of build-id - note address. - -2008-09-17 Frank Ch. Eigler <fche@elastic.org> - - PR 6487, 6504. - From Masami Hiramatsu <mhiramat@redhat.com> - * utt.c (utt_switch_subbof, _utt_wakeup*, utt_reserve): New. - -2008-07-17 Frank Ch. Eigler <fche@elastic.org> - - * symbols.c (_stp_do_relocation): Adapt to stp_module decl changes. - -2008-07-12 Frank Ch. Eigler <fche@elastic.org> - - PR 6738. - * procfs.c (*): Remove code/data associated with symbol/unwind data - uploading. - (_stp_ctl_write_cmd): Support STP_RELOCATION message. - (kbug): Replace calls with dbug_trans(). - * relayfs.c (kbug): Ditto. - * transport.h: Corresponding changes. - -2008-07-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6736. - * control.c (_stp_ctl_write_cmd): Accept STP_RELOCATION message. - * symbols.c: Gutted file. - (_stp_do_relocation): New function. - * transport.c (_stp_transport_init): Corresponding changes. - * transport_msgs.h: Ditto. - -2008-07-09 Frank Ch. Eigler <fche@elastic.org> - - PR5963 - * transport.c (_stp_work_queue): Don't signal a premature exit - if a begin probe happened to exit(). - -2008-06-23 Wenji Huang <wenji.huang@oracle.com> - PR 6646 - * symbols.c (_stp_validate_addr): Revert the previous code. - -2008-06-23 Wenji Huang <wenji.huang@oracle.com> - PR 6646 - * symbols.c (_stp_validate_addr): Add validating address in runtime. - -2008-06-13 Wenji Huang <wenji.huang@oracle.com> - - * control.c (_stp_ctl_write_dbug): Remove STP_UNWIND support. - -2008-06-03 Frank Ch. Eigler <fche@elastic.org> - - PR 6429 - * symbols.c (_stp_init_modules): Don't ask stapio for unwind data. - * control.c (_stp_ctl_write_cmd): Remove STP_UNWIND support. - * transport_msgs.h (STP_UNWIND): Remove declaration. - -2008-04-30 Masami Hiramatsu <mhiramat@redhat.com> - - PR 5645 - * transport.c (_stp_transport_init): Fix subbuffer size calculation - overflow. - -2008-04-21 hunt <hunt@redhat.com> - - * control.c (_stp_ctl_write): Return len + sizeof(int) so - sending an empty command doesn't return 0 and look like a failure. - * transport.c: _stp_cleanup_and_exit(): Cleanup. - -2008-04-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6410 - * symbols.c (_stp_do_unwind_data): Tolerate !STP_USE_DWARF_UNWINDER. - -2008-04-15 Frank Ch. Eigler <fche@elastic.org> - - PR 6405 - * symbols.c (_stp_load_module_symbols): Support older kernels - without module->sect_attrs->nsections. - -2008-04-09 Martin Hunt <hunt@dragon> - - * symbols.c (_stp_init_kernel_symbols): Print error - messages and exit if symbol lookups fail. - (_stp_init_modules): Lookup modules_op. - -2008-03-31 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_init_modules): Use STP_USE_DWARF_UNWINDER. - - * transport.c (_stp_get_root_dir): Remove misleading error message. - -2008-03-30 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_init_modules): If using frames, don't - request unwind info. - -2008-03-25 Martin Hunt <hunt@redhat.com> - - * control.c (_stp_ctl_write_dbug): Insert missing break. - - 32-bit systems can't do 64-bit get_user(), so - * symbols.c (_stp_do_unwind_data): Change unwind_len to a u32. - * transport_msgs.h (struct _stp_msg_unwind): Ditto. - -2008-02-27 Martin Hunt <hunt@redhat.com> - - * symbols.c: Use rwlocks. Use new dbug macros. Handle - unwind info if present. - - * transport.c: Include mempool.c. Update dbug and kbug calls - to new macros. - * transport_msgs.h (_stp_command_name): Add - struct containing message names for debugging. - - * control.c, procfs.c: Use new dbug macros. Use - new mempool functions. - -2008-01-28 Martin Hunt <hunt@redhat.com> - - * control.c, procfs.c, symbols.c: Use DEFINE_SPINLOCK - -2008-01-15 Martin Hunt <hunt@redhat.com> - - PR4037 and fixes to better synchronize staprun and stapio. - * transport_msgs.h (struct _stp_symbol32): New. - (struct _stp_symbol64): New. - (struct _stp_msg_symbol_hdr): New. - (struct _stp_msg_module): New. - (STP_READY): Declare. - - * transport.c (_stp_handle_start): Don't set _stp_start_finished. - (_stp_work_queue): Don't use _stp_start_finished. - (_stp_transport_init): Don't call _stp_ask_for_symbols(). - - * symbols.c (_stp_do_symbols): Use _stp_msg_symbol_hdr; - - * control.c (_stp_sym_write_cmd): Allow sending of headers - and data in separate messages. - (_stp_ctl_write_cmd): Add STP_READY message. - - * procfs.c (_stp_sym_write_cmd): Allow sending of headers - and data in separate messages. - (_stp_ctl_write_cmd): Add STP_READY message. - -2008-01-15 Martin Hunt <hunt@redhat.com> - - Support for DEBUG_MEM - * transport.c (_stp_transport): Call stp_mem_debug_done(); - * (*.c): Call stp malloc and free functions. - -2007-11-09 Masami Hiramatsu <mhiramat@redhat.com> - - PR3858 - * transport.c (_stp_transport_init): Reduce relay buffer size to - 64KB*2 if -DRELAY_GUEST is specified. - -2007-11-09 Martin Hunt <hunt@redhat.com> - PR 5281 - * transport.c (_stp_detach, _stp_attach): Call utt_set_overwrite() - instead of setting a flag directly. - * utt.c (utt_set_overwrite): New. Set overwrite mode. - * relayfs.c (utt_set_overwrite): New. Set overwrite mode. - * utt.h: Remove global utt_overwrite_flag. - -2007-11-01 Martin Hunt <hunt@redhat.com> - - * procfs.c, control.c, transport.c: Recognize when stapio - is detached and disable delayed work. Enable when attached. - Cleanup code to destroy workqueue on exit. - -2007-10-12 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_ask_for_symbols): Don't ask for - transport_info yet. Need to wait until symbols are - received. - (_stp_work_queue): Rename _stp_ready_q to _stp_ctl_ready_q. - * procfs.c: Create a ".symbols" channel and use it for - STP_MODULE and STP_SYMBOLS. Rename "cmd" channel to ".cmd". - * control.c: Ditto. - -2007-09-21 Martin Hunt <hunt@redhat.com> - From Alan Brunelle - * control.c (_stp_ctl_read_cmd): Cast count to an int before printing. - -2007-09-20 Martin Hunt <hunt@redhat.com> - - * transport.h: Increase default buffer size. - * control.c (_stp_ctl_read_cmd): Check buffer size. - -2007-09-10 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_register_ctl_channel): Call - _stp_mkdir_proc_module(). - (_stp_unregister_ctl_channel): Call _stp_rmdir_proc_module(). - * transport.c: Include ../procfs.c runtime procfs functions. - -2007-08-17 Martin Hunt <hunt@redhat.com> - PR3857 - From Masami Hiramatsu - * utt.c (utt_subbuf_start_callback): Use overwrite flag. - * control.c (_stp_ctl_open_cmd): Set overwrite_flag off. - (_stp_ctl_close_cmd): Set overwrite flag on. - -2007-08-14 David Smith <dsmith@redhat.com> - - Merge from setuid-branch. Changes also by Martin Hunt - <hunt@redhat.com>. - - * control.c (_stp_ctl_write): Make sure we don't overflow. - (_stp_ctl_open_cmd): Do not allow multiple opens of the control - file. - (_stp_ctl_write_cmd): Once STP_START is received, ignore - everything except STP_EXIT. Create another state variable - "initialized". Don't respond to STP_SYMBOLS or STP_MODULES unless - initialized is 0. Also check that current pid is the same as the - pid that did insmod. - (_stp_register_ctl_channel): Bug fix - sets owner/group after - checking for NULL. - - * procfs.c (_stp_ctl_write): Make sure we don't overflow. - (_stp_ctl_open_cmd): Do not allow multiple opens of the control - file. - (_stp_ctl_write_cmd): Once STP_START is received, ignore - everything except STP_EXIT. Create another state variable - "initialized". Don't respond to STP_SYMBOLS or STP_MODULES unless - initialized is 0. Also check that current pid is the same as the - pid that did insmod. - (_stp_register_ctl_channel): Set ownership of cmd file and percpu - files for bulkmode. - - * relayfs.c (utt_trace_setup): Set ownership of percpu files. - Improved error handling. - (utt_trace_remove): Improved error checking. - - * utt.c (utt_remove_tree): Improved error checking. - (utt_trace_cleanup): Ditto. - (utt_create_buf_file_callback): Set file ownership. - (utt_create_global_buf_file_callback): Set file ownership. - - * transport.h: Delcare _stp_uid, _stp_gid, and _stp_init_pid. - * transport.c (_stp_transport_init): Set _stp_uid, _stp_gid, and - _stp_init_pid. - -2007-07-26 Martin Hunt <hunt@redhat.com> - - Spotted by Ming Chang. - * procfs.c (_stp_register_ctl_channel): Fix iterator when removing - proc entries when an error occurs. - -2007-07-10 Michal Schmidt <mschmidt@redhat.com> - - * symbols.c (_stp_del_module): Split freeing of module memory into - a separate function _stp_free_module(). - (_stp_do_module): Free module memory if _stp_ins_module() fails. - -2007-07-09 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_ins_module): Check for overflow of - modules array. - (_stp_do_module): If _stp_ins_module() fails, return an error. - -2007-07-02 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_do_symbols): Set "data" pointer for kernel to _etext. - (_stp_sort): New. sort function from the kernel. - (_stp_load_module_symbols): Use _stp_sort(). - -2007-06-21 Martin Hunt <hunt@redhat.com> - - * control.c (_stp_ctl_write_cmd): Add support for STP_BULK. - * transport_msgs.h (enum): Add STP_BULK. - -2007-06-18 Martin Hunt <hunt@redhat.com> - - * control.c (_stp_register_ctl_channel): Fix mode of cmd file. - -2007-05-16 Will Cohen <wcohen@redhat.com> - - * control.c: Explicit type cast for picky compilers. - -2007-05-15 Martin Hunt <hunt@redhat.com> - - * control.c: Change default buffer number and size. - (_stp_ctl_write): Add debug statements. Check size of - message to avoid overwriting buffer. - -2007-04-27 Martin Hunt <hunt@redhat.com> - - * utt.h (struct utt_trace): Remove sequence. - * utt.c (utt_trace_cleanup): Remove free of utt->sequence. - (utt_dropped_open): PR 4415. Use STAPCONF_INODE_PRIVATE to detect - correct inode struct. - (utt_trace_setup): Do not allocate utt->sequence. - -2007-04-02 Martin Hunt <hunt@redhat.com> - - * transport_msgs.h (struct _stp_msg_trans): Deleted. - Transport parameters are now read from procfs. - - * transport.c (_stp_ask_for_symbols): STP_TRANSPORT - message is empty. - - * procfs.c (_stp_ctl_open_cmd): New. Set _stp_ pid. - (_stp_ctl_close_cmd): New. Unset _stp_pid. - (_stp_proc_fops_cmd): Add pointers to above funcs. - (_stp_ctl_read_bufsize): New. - (_stp_register_ctl_channel): Create a proc read entry - "bufsize" containing transport buffer sizes. - -2007-03-28 Martin Hunt <hunt@redhat.com> - - * control.c (_stp_ctl_open_cmd): Set _stp_pid. - (stp_ctl_close_cmd): Clear _stp_pid. - * transport.h: Declare _stp_pid; - -2007-03-26 Frank Ch. Eigler <fche@elastic.org> - - * transport.c: Add #include <linux/namei.h> for lookup_one_len. - -2007-03-26 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_do_module): If a module has no symbols, just - return NULL instead of an errorcode. - - * control.c, procfs.c, relayfs.c, transport.c, utt.c, utt.h: - Revert back to using systemtap/modulename instead of systemtap_pid. - -2007-03-21 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_del_module): Add a call to _stp_module_relocate - to clear its cache. - -2007-03-20 Frank Ch. Eigler <fche@elastic.org> - - * symbols.c (_stp_do_symbols): Add cautionary blurb for important - setup of _stp_modules[0]->text. - -2007-03-20 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_alloc_module): Fix up error - cleanup when malloc fails. - -2007-03-14 Martin Hunt <hunt@redhat.com> - - * transport_msgs.h: ifdef old messages as such. - Add support for new transport. - * relayfs.c: Simplify and add new interface to look - like utt. - * utt.[ch]: New files. Similar to the proposed utt interface. - These setup and teardown relayfs on debugfs. - * control.c: New file. Implements a simple control channel. - A small subset of procfs.c. - * procfs.c: This is now only used for old kernels lacking newer - relayfs. Change STP_RELAYFS to STP_BULKMODE. Use new - messages from transport_msgs.h. Don't support - RELAYFS_CHANNEL_VERSION >= 4. CHanges all control channel functions - to new names. Use pids instead of module names in /proc names. - -2007-03-12 Frank Ch. Eigler <fche@elastic.org> - - * procfs.c (_stp_register_procfs): Use /proc/MODULE rather than - /proc/systemtap/MODULE. - -2007-03-12 Frank Ch. Eigler <fche@redhat.com> - - PR 4179. - Based on patch from Vasily Averin <vvs@sw.ru>: - * procfs.c (_stp_register_procfs): Recover from partial failures. - * transport.c (_stp_transport_open): Ditto. - -2007-01-30 Martin Hunt <hunt@redhat.com> - - * symbols.c: Comment out many debug lines. - -2007-01-29 Martin Hunt <hunt@redhat.com> - - * procfs.c: Count allocated IO memory. - * symbols.c: Use _stp_kmalloc() and _stp_kzalloc(). - * transport.c: Count allocated IO memory. - -2007-01-09 Martin Hunt <hunt@redhat.com> - - * symbols.c (_stp_del_module): Fix so memory allocated - for module 0 (kernel) is freed. - (_stp_free_modules): No need to lock module list. - -2006-12-20 Martin Hunt <hunt@redhat.com> - - * transport.c: Fixes to use the new 2.6.20 workqueue API. - -2006-11-15 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_proc_write_cmd): For STP_SYMBOLS, - type field is a long to preserve alignment. - Use STP_ALLOC_FLAGS. - - * symbols.c: Use STP_ALLOC_FLAGS. - -2006-11-09 Martin Hunt <hunt@redhat.com> - - * transport_msgs.h: Change all ints to int32_t. Prefix - all struct names with "_stp". - * transport.c: Use new struct names. - (_stp_handle_start): Send pointer size and endianess. - * procfs.c: Use new struct names. - -2006-11-02 Martin Hunt <hunt@redhat.com> - * symbols.c (_stp_do_module): Fix error message. - -2006-11-02 Martin Hunt <hunt@redhat.com> - - * symbols.c: New file. Get the STP_SYMBOLS and STP_MODULE - messages, allocate memory and store the data. - - * procfs.c (_stp_proc_write_cmd): When STP_SYMBOLS or STP_MODULE - request is received, call the appropriate functions. - - * transport.c (_stp_handle_start): If necessary, ask staprun for - symbols and modules. - (_stp_cleanup_and_exit): Unregister module notifier. - (_stp_transport_close): Unregister module notifier and free module - memory. - * transport_msgs.h (enum): Add STP_MODULE and STP_SYMBOLS. - -2006-09-26 David Smith <dsmith@redhat.com> - - * transport.c: Changed 'stpd' references to 'staprun'. - * transport.txt: Ditto. - -2006-09-26 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_handle_start): Don't initialize timers here. - (_stp_transport_init): Initialize timers here. - (_stp_cleanup_and_exit): Don't kill timers or free print buffers here. - (_stp_transport_close): kill timers and free print buffers here. - -2006-09-25 Tom Zanussi <zanussi@us.ibm.com> - - * procfs.c (_stp_proc_read): Set buf_info flushing flag. - * transport.c (_stp_cleanup_and_exit): Remove braces. - * transport_msgs.h: Add flushing flag to buf_info. - -2006-09-22 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_work_queue): Reenable some cleanup - code. - -2006-09-21 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_transport_init): Call _stp_print_init(). - (_stp_cleanup_and_exit): Call _stp_print_cleanup(). - -2006-09-21 Tom Zanussi <zanussi@us.ibm.com> - - * relayfs.c (_stp_get_relay_root): Call new mutex lock/unlock - wrappers instead. - (_stp_lock_inode): New. - (_stp_unlock_inode): New. - -2006-09-19 Tom Zanussi <zanussi@us.ibm.com> - - * procfs.c (_stp_get_proc_root): Removed. - (_stp_force_dir_creation): Removed. - (_stp_register_procfs): Remove unneeded procfs dentry code. * - relayfs.c (_stp_create_buf_file): Remove code to create relay - files in procfs, add code to create in debugfs. - (_stp_remove_buf_file): Remove code to delete relay files in - procfs, add code to delete from debugfs. - (_stp_create_relay_dir): New. - (_stp_remove_relay_dir): New. - (_stp_get_relay_root): New. - (_stp_relayfs_close): Use new functions. - (_stp_relayfs_open): Consolidate alternative versions and remove - extraneous version. * relayfs.h: Remove extraneous - _stp_relayfs_open prototype. - * transport.c (_stp_transport_open): Remove extraneous call to - _stp_relayfs_open() and remove call to _stp_unregister_procfs() on - failure - since it's called from cmd write, cmd can't be removed; - it's removed in normal shutdown anyway. - -2006-09-18 Martin Hunt <hunt@redhat.com> - - * transport_msgs.h (struct transport_info): Add merge field. - * transport.c (_stp_transport_open): Set merge field. - -2006-06-21 Josh Stone <joshua.i.stone@intel.com> - - PR 2525 - * transport.c (_stp_handle_start): Initialize timer functions. - * transport.c (_stp_cleanup_and_exit): Teardown timer functions. - -2006-06-13 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_transport_close): Destroy workqueue when - done. - -2006-06-09 Martin Hunt <hunt@redhat.com> - - * transport.c: Using the default workqueue was causing problems - because of the long delays on probe_exit(). Created a new - systemtap work queue and used that instead. - -2006-06-05 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_write): Always use spin_lock_irqsave() because - this function can sometimes be called with interrupts enabled. - -2006-04-10 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_write): More fixes because buffers - are no longer null-terminated. - -2006-03-20 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_write): Combine buffers only for REALTIME_DATA. - -2006-03-16 Tom Zanussi <zanussi@us.ibm.com> - - * procfs.c (_stp_proc_read): Change ifdef for relayfs version. - * relayfs.c: Change ifdefs for relayfs version. - * relayfs.h: Remove relayfs-config.h include. - * transport.c (_stp_handle_buf_info.c): Change ifdef for relayfs - version. - * relayfs-config.h.in: Removed. - -2006-03-15 Tom Zanussi <zanussi@us.ibm.com> - - * procfs.c (_stp_proc_read): Add ifdef for CONFIG_RELAY. - (_stp_get_proc_root): New function. - (_stp_force_dir_create): New function. - (_stp_register_procfs): Add support for CONFIG_RELAY files in - proc. - - * relayfs.c (_stp_subbuf_start): Fix ppc64 compilation error - mentioned in bug #2406. - (_stp_create_buf_file): New function. - (_stp_remove_buf_file): New function. - (_stp_relayfs_close): Add support for CONFIG_RELAY. - (_stp_relayfs_open): Add support for CONFIG_RELAY. - - * relayfs.h: Add support for CONFIG_RELAY and - RELAYFS_VERSION_GE_4. - * transport.c (_stp_handle_buf_info.c): Add support for - CONFIG_RELAY. - * transport (_stp_transport_open.c): Add support for CONFIG_RELAY. - - * relayfs-config.h.in: New file. - -2006-03-15 Martin Hunt <hunt@redhat.com> - - * procfs.c (STP_DEFAULT_BUFFERS): Bump up to 256. - -2006-03-06 Martin Hunt <hunt@redhat.com> - - * transport_msgs.h (struct cmd_info): New message. - -2006-02-25 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_proc_write_cmd): Check return code for - _stp_transport_open(). - - * transport.c (_stp_transport_write): This function - can now sleep because it is - (_stp_handle_start): Don't use a mutex when a simple atomic - will do. - (_stp_work_queue): Check atomic to see if probe_start() - has finished before attempting exit. - (_stp_transport_close): PR2391. Cancel work queue. - (_stp_transport_init): If _stp_register_procfs() fails, - return an error code. - - * transport.txt: New file. Documents transport initialization and - shutdown sequence. - -2006-02-24 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_transport_init): Fail if - _stp_register_procfs() fails. - -2006-02-17 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_proc_read_cmd): Change spin_lock() - to spin_lock_irqsave(). - - * transport.c (_stp_work_queue): Ditto. - -2005-12-02 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_set_buffers): kmalloc the buffers instead - of vmalloc. - (_stp_register_procfs): Ditto. - (_stp_unregister_procfs): kfree the buffers. - -2005-11-30 Martin Hunt <hunt@redhat.com> - - * transport.h (STP_WORK_TIMER): Declare. - * transport.c (_stp_work_queue): Wake up every STP_WORK_QUEUE - jiffies and check IO and exit status. - (_stp_handle_exit): Deleted. - * procfs.c (_stp_proc_write_cmd): Just set exit flag on STP_EXIT. - (_stp_write): Don't call wake_up_interruptible. - -2005-10-17 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_handle_start): Grab semaphore before - calling probe_start() and release after it is done. - (_stp_handle_exit): Ditto for exiting. This prevents - exiting before probe_start() is finished. - -2005-10-14 Tom Zanussi <zanussi@us.ibm.com> - - * relayfs.h: Add ifdef'ed relayfs_fs.h include for mainline - relayfs version. If you're running a kernel with a version - of relayfs >= 4 (the version # can be found in - /include/linux/relayfs_fs.h) configured in, adding a - #define RELAYFS_VERSION_GE_4 at the top of transport/relayfs.h - will make systemtap use it instead of the packaged version. - - * relayfs.c: Add ifdef'ed relayfs callback functions for - mainline relayfs version. - (_stp_relayfs_open): Add ifdef'ed code for mainline - relayfs version. - * procfs.c (_stp_proc_read): Ditto. - * transport.c (_handle_buf_info): Ditto. - -2005-10-05 Tom Zanussi <zanussi@us.ibm.com> - - * transport.c (_stp_transport_open): Add kbug message. - * transport.h: Change default n_subbufs to 16. - -2005-09-08 Martin Hunt <hunt@redhat.com> - - * procfs.c (_stp_register_procfs): Change ifdefs to eliminate - unused variable warnings. - (_stp_unregister_procfs): Ditto. - -2005-09-06 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_handle_start): Always reply to - a start message with STP_START. - -2005-08-24 Martin Hunt <hunt@redhat.com> - - * transport_msgs.h (enum): New type, STP_OOB_DATA. - -2005-08-23 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_cleanup_and_exit): Remove a 2 second sleep - that should no longer be necessary. - - * procfs.c (_stp_write): If the ready queue is not empty - then attempt to grab the last buffer in it and append our data - to it. - -2005-08-22 Martin Hunt <hunt@redhat.com> - - * transport.h: Don't define _stp_transport_write. - * transport.c (_stp_transport_write): Use - _stp_transport_send() when in probe_exit(). - -2005-08-19 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_cmd_handler): Remove. This was used by - stp-control. - - * procfs.c (_stp_proc_write_cmd): Call schedule_work() instead - of running _stp_exit_handler immediately. Fixes a problem where - the module couldn't exit if all the output buffers were full. - Set .owner for the filesystem entries. - -2005-08-19 Martin Hunt <hunt@redhat.com> - - * transport.h: Remove netlink references. - * transport.c: Remove netlink references. Ifdef relayfs code. - * procfs.c: New file. - * Makefile: Deleted. - * control.c: Deleted. - * control.h: Deleted. - * netlink.c: Deleted. - * netlink.h: Deleted. - -2005-08-03 Martin Hunt <hunt@redhat.com> - - * transport.c: Comment out a couple printks. - -2005-08-01 Martin Hunt <hunt@redhat.com> - - * control.h: Remove STP commands from here and put in - transport_msgs. - - * transport_msgs.h: New file containing the structs and - values for the messages exchanged between stpd and transport. - - * transport.h: Moved stuff shared with stpd to transport_msgs.h - - * transport.c: Complete rewrite to better handle complicated - initialization involving exchanging data with stpd. Supports - buffer size negotiation and more. - -2005-07-18 Martin Hunt <hunt@redhat.com> - - * transport.h (_stp_transport_write): Call _stp_relay_write(). - - * transport.c (_stp_cleanup_and_exit): Print transport - failure count. - (_stp_relay_write): Like relay_write() except returns - -1 on error. - -2005-07-14 Tom Zanussi <zanussi@us.ibm.com> - - * netlink.c (_stp_netlink_open): Add missing delayed_pkts - initialization. - -2005-07-08 Martin Hunt <hunt@redhat.com> - - * transport.c: Rename pid to _stp_pid. - Rename t to _stp_tport. - (_stp_cleanup_and_exit): New internal function. - (stp_exit_helper): Call _stp_cleanup_and_exit(). - (_stp_transport_cleanup): New function. - (_stp_cmd_handler): Remove handler for STP_TRANSPORT_MODE. - The transport now notifies the daemon of the transport. - (_stp_transport_close): No longer calls _stp_exit_helper(). - That is done by _stp_transport_cleanup(). - (_stp_transport_open): When done, call _stp_handle_transport() - to notify the daemon what our transport is. - (_stp_transport_send): Put a retry limit on sends. - - * transport.h: Rename pid to _stp_pid. - (_stp_transport_cleanup): Add prototype. - -2005-06-23 Martin Hunt <hunt@redhat.com> - - * transport.h: Move all the transport open stuff here - and provide a convenient macro. - - * control.c: Replace macro DEFINE_SPINLOCK because - some kernels don't have it. - -2005-06-20 Tom Zanussi <zanussi@us.ibm.com> - - * control.h: Added STP_TRANSPORT_MODE command. - - * transport.c: Lots of changes, most importantly - added transport mode command, which also sends buffer - sizes to daemon, added limit to number of attempts to - sending STP_EXIT (in case there is no daemon), moved - exit helper call. - - * transport.h: Added transport type enum and transport - info struct for communication with userspace, changed and - moved a couple functions to transport.c. - -2005-05-17 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_transport_close): Call stp_exit_helper() - directly instead of using work queue. - -2005-05-16 Martin Hunt <hunt@redhat.com> - - * transport.c (_stp_cmd_handler): For STP_EXIT, schedule a - work queue to do the exit functions. - (_stp_transport_close): Call work queue for STP_EXIT. - (_stp_transport_send): Call _stp_ctrl_send() like before, except - when in probe_exit(). In that case, keep retrying on send errors - until we succeed. - - * transport.h (_stp_transport_write): Change to call - _stp_transport_send() for NETLINK_ONLY. - - * Makefile (KDIR): set to /lib/modules/... instead of - /usr/local/src/... - - - diff --git a/runtime/transport/control.c b/runtime/transport/control.c index 7d78cca4..edde244d 100644 --- a/runtime/transport/control.c +++ b/runtime/transport/control.c @@ -1,7 +1,7 @@ /* -*- linux-c -*- * - * debugfs control channel - * Copyright (C) 2007-2008 Red Hat Inc. + * control channel + * Copyright (C) 2007-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 @@ -9,12 +9,9 @@ * later version. */ -#define STP_DEFAULT_BUFFERS 50 -static int _stp_current_buffers = STP_DEFAULT_BUFFERS; - static _stp_mempool_t *_stp_pool_q; static struct list_head _stp_ctl_ready_q; -DEFINE_SPINLOCK(_stp_ctl_ready_lock); +static DEFINE_SPINLOCK(_stp_ctl_ready_lock); static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { @@ -72,13 +69,6 @@ static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, siz return count; /* Pretend that we absorbed the entire message. */ } -struct _stp_buffer { - struct list_head list; - int len; - int type; - char buf[STP_CTL_BUFFER_SIZE]; -}; - static DECLARE_WAIT_QUEUE_HEAD(_stp_ctl_wq); #ifdef DEBUG_TRANS @@ -114,11 +104,16 @@ static int _stp_ctl_write(int type, void *data, unsigned len) { struct _stp_buffer *bptr; unsigned long flags; + unsigned hlen; #ifdef DEBUG_TRANS _stp_ctl_write_dbug(type, data, len); #endif + hlen = _stp_ctl_write_fs(type, data, len); + if (hlen > 0) + return hlen; + /* make sure we won't overflow the buffer */ if (unlikely(len > STP_CTL_BUFFER_SIZE)) return 0; @@ -153,7 +148,8 @@ static int _stp_ctl_send(int type, void *data, int len) return err; } -static ssize_t _stp_ctl_read_cmd(struct file *file, char __user *buf, size_t count, loff_t *ppos) +static ssize_t _stp_ctl_read_cmd(struct file *file, char __user *buf, + size_t count, loff_t *ppos) { struct _stp_buffer *bptr; int len; @@ -178,10 +174,12 @@ static ssize_t _stp_ctl_read_cmd(struct file *file, char __user *buf, size_t cou /* write it out */ len = bptr->len + 4; if (len > count || copy_to_user(buf, &bptr->type, len)) { - /* now what? We took it off the queue then failed to send it */ - /* we can't put it back on the queue because it will likely be out-of-order */ - /* fortunately this should never happen */ - /* FIXME need to mark this as a transport failure */ + /* Now what? We took it off the queue then failed to + * send it. We can't put it back on the queue because + * it will likely be out-of-order. Fortunately, this + * should never happen. + * + * FIXME: need to mark this as a transport failure. */ errk("Supplied buffer too small. count:%d len:%d\n", (int)count, len); return -EFAULT; } @@ -215,47 +213,33 @@ static struct file_operations _stp_ctl_fops_cmd = { .release = _stp_ctl_close_cmd, }; -static struct dentry *_stp_cmd_file = NULL; - static int _stp_register_ctl_channel(void) { - int i; - struct list_head *p, *tmp; - char buf[32]; - - if (_stp_utt == NULL) { - errk("_expected _stp_utt to be set.\n"); - return -1; - } - INIT_LIST_HEAD(&_stp_ctl_ready_q); /* allocate buffers */ - _stp_pool_q = _stp_mempool_init(sizeof(struct _stp_buffer), STP_DEFAULT_BUFFERS); + _stp_pool_q = _stp_mempool_init(sizeof(struct _stp_buffer), + STP_DEFAULT_BUFFERS); if (unlikely(_stp_pool_q == NULL)) goto err0; _stp_allocated_net_memory += sizeof(struct _stp_buffer) * STP_DEFAULT_BUFFERS; - /* create [debugfs]/systemtap/module_name/.cmd */ - _stp_cmd_file = debugfs_create_file(".cmd", 0600, _stp_utt->dir, NULL, &_stp_ctl_fops_cmd); - if (_stp_cmd_file == NULL) + if (_stp_register_ctl_channel_fs() != 0) goto err0; - _stp_cmd_file->d_inode->i_uid = _stp_uid; - _stp_cmd_file->d_inode->i_gid = _stp_gid; return 0; err0: _stp_mempool_destroy(_stp_pool_q); - errk("Error creating systemtap debugfs entries.\n"); + errk("Error creating systemtap control channel.\n"); return -1; } static void _stp_unregister_ctl_channel(void) { struct list_head *p, *tmp; - if (_stp_cmd_file) - debugfs_remove(_stp_cmd_file); + + _stp_unregister_ctl_channel_fs(); /* Return memory to pool and free it. */ list_for_each_safe(p, tmp, &_stp_ctl_ready_q) { diff --git a/runtime/transport/control.h b/runtime/transport/control.h new file mode 100644 index 00000000..5e7204ee --- /dev/null +++ b/runtime/transport/control.h @@ -0,0 +1,42 @@ +/* -*- linux-c -*- + * + * control channel header + * 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. + */ + +#ifndef _CONTROL_H_ +#define _CONTROL_H_ + +#include <linux/spinlock.h> +#include <linux/list.h> + +static _stp_mempool_t *_stp_pool_q; +static struct list_head _stp_ctl_ready_q; +static spinlock_t _stp_ctl_ready_lock; +static wait_queue_head_t _stp_ctl_wq; + +struct _stp_buffer { + struct list_head list; + int len; + int type; + char buf[STP_CTL_BUFFER_SIZE]; +}; + +static struct file_operations _stp_ctl_fops_cmd; + +static int _stp_ctl_send(int type, void *data, int len); + +static int _stp_ctl_write_fs(int type, void *data, unsigned len); + +static int _stp_register_ctl_channel(void); +static void _stp_unregister_ctl_channel(void); + +static int _stp_register_ctl_channel_fs(void); +static void _stp_unregister_ctl_channel_fs(void); + +#endif /* _CONTROL_H_ */ diff --git a/runtime/transport/debugfs.c b/runtime/transport/debugfs.c new file mode 100644 index 00000000..dc651a56 --- /dev/null +++ b/runtime/transport/debugfs.c @@ -0,0 +1,45 @@ +/* -*- linux-c -*- + * + * debugfs functions + * 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. + */ + +#define STP_DEFAULT_BUFFERS 50 + +inline static int _stp_ctl_write_fs(int type, void *data, unsigned len) +{ + return 0; +} + +static struct dentry *_stp_cmd_file = NULL; + +static int _stp_register_ctl_channel_fs(void) +{ + if (_stp_utt == NULL) { + errk("_expected _stp_utt to be set.\n"); + return -1; + } + + /* create [debugfs]/systemtap/module_name/.cmd */ + _stp_cmd_file = debugfs_create_file(".cmd", 0600, _stp_utt->dir, + NULL, &_stp_ctl_fops_cmd); + if (_stp_cmd_file == NULL) { + errk("Error creating systemtap debugfs entries.\n"); + return -1; + } + _stp_cmd_file->d_inode->i_uid = _stp_uid; + _stp_cmd_file->d_inode->i_gid = _stp_gid; + + return 0; +} + +static void _stp_unregister_ctl_channel_fs(void) +{ + if (_stp_cmd_file) + debugfs_remove(_stp_cmd_file); +} diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c index ca33e0fd..6afbdea1 100644 --- a/runtime/transport/procfs.c +++ b/runtime/transport/procfs.c @@ -1,7 +1,7 @@ /* -*- linux-c -*- * * /proc transport and control - * Copyright (C) 2005-2008 Red Hat Inc. + * Copyright (C) 2005-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 @@ -9,12 +9,9 @@ * later version. */ -#define STP_DEFAULT_BUFFERS 256 -static int _stp_current_buffers = STP_DEFAULT_BUFFERS; +#include "../procfs.c" // for _stp_mkdir_proc_module() -static _stp_mempool_t *_stp_pool_q; -static struct list_head _stp_ctl_ready_q; -DEFINE_SPINLOCK(_stp_ctl_ready_lock); +#define STP_DEFAULT_BUFFERS 256 #ifdef STP_BULKMODE extern int _stp_relay_flushing; @@ -60,112 +57,19 @@ static struct file_operations _stp_proc_fops = { }; #endif /* STP_BULKMODE */ - -static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, size_t count, loff_t *ppos) -{ - int type; - static int started = 0; - - if (count < sizeof(int)) - return 0; - - if (get_user(type, (int __user *)buf)) - return -EFAULT; - -#if DEBUG_TRANSPORT > 0 - if (type < STP_MAX_CMD) - _dbug("Got %s. len=%d\n", _stp_command_name[type], (int)count); -#endif - - count -= sizeof(int); - buf += sizeof(int); - - switch (type) { - case STP_START: - if (started == 0) { - struct _stp_msg_start st; - if (count < sizeof(st)) - return 0; - if (copy_from_user(&st, buf, sizeof(st))) - return -EFAULT; - _stp_handle_start(&st); - started = 1; - } - break; - - case STP_EXIT: - _stp_exit_flag = 1; - break; - - case STP_RELOCATION: - _stp_do_relocation (buf, count); - break; - - case STP_READY: - break; - - default: - errk("invalid command type %d\n", type); - return -EINVAL; - } - - return count; -} - -struct _stp_buffer { - struct list_head list; - int len; - int type; - char buf[STP_CTL_BUFFER_SIZE]; -}; - -static DECLARE_WAIT_QUEUE_HEAD(_stp_ctl_wq); - -#if DEBUG_TRANSPORT > 0 -static void _stp_ctl_write_dbug(int type, void *data, int len) -{ - char buf[64]; - switch (type) { - case STP_START: - _dbug("sending STP_START\n"); - break; - case STP_EXIT: - _dbug("sending STP_EXIT\n"); - break; - case STP_OOB_DATA: - snprintf(buf, sizeof(buf), "%s", (char *)data); - _dbug("sending %d bytes of STP_OOB_DATA: %s\n", len, buf); - break; - case STP_SYSTEM: - snprintf(buf, sizeof(buf), "%s", (char *)data); - _dbug("sending STP_SYSTEM: %s\n", buf); - break; - case STP_TRANSPORT: - _dbug("sending STP_TRANSPORT\n"); - break; - default: - _dbug("ERROR: unknown message type: %d\n", type); - break; - } -} -#endif - -static int _stp_ctl_write(int type, void *data, int len) +inline static int _stp_ctl_write_fs(int type, void *data, unsigned len) { struct _stp_buffer *bptr; unsigned long flags; -#if DEBUG_TRANSPORT > 0 - _stp_ctl_write_dbug(type, data, len); -#endif - #define WRITE_AGG #ifdef WRITE_AGG - spin_lock_irqsave(&_stp_ctl_ready_lock, flags); if (!list_empty(&_stp_ctl_ready_q)) { bptr = (struct _stp_buffer *)_stp_ctl_ready_q.prev; - if (bptr->len + len <= STP_BUFFER_SIZE && type == STP_REALTIME_DATA && bptr->type == STP_REALTIME_DATA) { + if ((bptr->len + len) <= STP_CTL_BUFFER_SIZE + && type == STP_REALTIME_DATA + && bptr->type == STP_REALTIME_DATA) { memcpy(bptr->buf + bptr->len, data, len); bptr->len += len; spin_unlock_irqrestore(&_stp_ctl_ready_lock, flags); @@ -174,121 +78,9 @@ static int _stp_ctl_write(int type, void *data, int len) } spin_unlock_irqrestore(&_stp_ctl_ready_lock, flags); #endif - - /* make sure we won't overflow the buffer */ - if (unlikely(len > STP_BUFFER_SIZE)) - return 0; - - /* get a buffer from the free pool */ - bptr = _stp_mempool_alloc(_stp_pool_q); - if (unlikely(bptr == NULL)) - return -1; - - bptr->type = type; - memcpy(bptr->buf, data, len); - bptr->len = len; - - /* put it on the pool of ready buffers */ - spin_lock_irqsave(&_stp_ctl_ready_lock, flags); - list_add_tail(&bptr->list, &_stp_ctl_ready_q); - spin_unlock_irqrestore(&_stp_ctl_ready_lock, flags); - - return len; -} - - -/* send commands with timeout and retry */ -static int _stp_ctl_send(int type, void *data, int len) -{ - int err, trylimit = 50; - dbug_trans(1, "ctl_send: type=%d len=%d\n", type, len); - while ((err = _stp_ctl_write(type, data, len)) < 0 && trylimit--) - msleep(5); - if (err > 0) - wake_up_interruptible(&_stp_ctl_wq); - dbug_trans(1, "returning %d\n", err); - return err; -} - - -static ssize_t _stp_ctl_read_cmd(struct file *file, char __user *buf, size_t count, loff_t *ppos) -{ - struct _stp_buffer *bptr; - int len; - unsigned long flags; - - /* wait for nonempty ready queue */ - spin_lock_irqsave(&_stp_ctl_ready_lock, flags); - while (list_empty(&_stp_ctl_ready_q)) { - spin_unlock_irqrestore(&_stp_ctl_ready_lock, flags); - if (file->f_flags & O_NONBLOCK) - return -EAGAIN; - if (wait_event_interruptible(_stp_ctl_wq, !list_empty(&_stp_ctl_ready_q))) - return -ERESTARTSYS; - spin_lock_irqsave(&_stp_ctl_ready_lock, flags); - } - - /* get the next buffer off the ready list */ - bptr = (struct _stp_buffer *)_stp_ctl_ready_q.next; - list_del_init(&bptr->list); - spin_unlock_irqrestore(&_stp_ctl_ready_lock, flags); - - /* write it out */ - len = bptr->len + 4; - if (len > count || copy_to_user(buf, &bptr->type, len)) { - /* now what? We took it off the queue then failed to send it */ - /* we can't put it back on the queue because it will likely be out-of-order */ - /* fortunately this should never happen */ - /* FIXME need to mark this as a transport failure */ - errk("Supplied buffer too small. count:%d len:%d\n", (int)count, len); - return -EFAULT; - } - - /* put it on the pool of free buffers */ - _stp_mempool_free(bptr); - - return len; -} - -static int _stp_ctl_open_cmd(struct inode *inode, struct file *file) -{ - if (_stp_attached) - return -1; - - _stp_attach(); return 0; } -static int _stp_ctl_close_cmd(struct inode *inode, struct file *file) -{ - if (_stp_attached) - _stp_detach(); - return 0; -} - -static struct file_operations _stp_proc_fops_cmd = { - .owner = THIS_MODULE, - .read = _stp_ctl_read_cmd, - .write = _stp_ctl_write_cmd, - .open = _stp_ctl_open_cmd, - .release = _stp_ctl_close_cmd, -}; - -/* copy since proc_match is not MODULE_EXPORT'd */ -static int my_proc_match(int len, const char *name, struct proc_dir_entry *de) -{ - if (de->namelen != len) - return 0; - return !memcmp(name, de->name, len); -} - -/* set the number of buffers to use to 'num' */ -static int _stp_set_buffers(int num) -{ - dbug_trans(1, "stp_set_buffers %d\n", num); - return _stp_mempool_resize(_stp_pool_q, num); -} - static int _stp_ctl_read_bufsize(char *page, char **start, off_t off, int count, int *eof, void *data) { int len = sprintf(page, "%d,%d\n", _stp_nsubbufs, _stp_subbuf_size); @@ -303,25 +95,15 @@ static int _stp_ctl_read_bufsize(char *page, char **start, off_t off, int count, return len; } -static int _stp_register_ctl_channel(void) +static int _stp_register_ctl_channel_fs(void) { - int i; - const char *dirname = "systemtap"; - char buf[32]; #ifdef STP_BULKMODE + int i; int j; + char buf[32]; + struct proc_dir_entry *bs = NULL; #endif - - struct proc_dir_entry *de, *bs = NULL; - struct list_head *p, *tmp; - - INIT_LIST_HEAD(&_stp_ctl_ready_q); - - /* allocate buffers */ - _stp_pool_q = _stp_mempool_init(sizeof(struct _stp_buffer), STP_DEFAULT_BUFFERS); - if (unlikely(_stp_pool_q == NULL)) - goto err0; - _stp_allocated_net_memory += sizeof(struct _stp_buffer) * STP_DEFAULT_BUFFERS; + struct proc_dir_entry *de; if (!_stp_mkdir_proc_module()) goto err0; @@ -352,11 +134,10 @@ static int _stp_register_ctl_channel(void) goto err1; de->uid = _stp_uid; de->gid = _stp_gid; - de->proc_fops = &_stp_proc_fops_cmd; + de->proc_fops = &_stp_ctl_fops_cmd; return 0; -err2: - remove_proc_entry(".cmd", _stp_proc_root); + err1: #ifdef STP_BULKMODE for (de = _stp_proc_root->subdir; de; de = de->next) @@ -373,18 +154,16 @@ err1: #endif /* STP_BULKMODE */ _stp_rmdir_proc_module(); err0: - _stp_mempool_destroy(_stp_pool_q); - errk("Error creating systemtap /proc entries.\n"); return -1; } -static void _stp_unregister_ctl_channel(void) +static void _stp_unregister_ctl_channel_fs(void) { - struct list_head *p, *tmp; - char buf[32]; #ifdef STP_BULKMODE + char buf[32]; int i; struct proc_dir_entry *de; + dbug_trans(1, "unregistering procfs\n"); for (de = _stp_proc_root->subdir; de; de = de->next) _stp_kfree(de->data); @@ -396,14 +175,6 @@ static void _stp_unregister_ctl_channel(void) remove_proc_entry("bufsize", _stp_proc_root); #endif /* STP_BULKMODE */ - remove_proc_entry(".symbols", _stp_proc_root); remove_proc_entry(".cmd", _stp_proc_root); _stp_rmdir_proc_module(); - - /* Return memory to pool and free it. */ - list_for_each_safe(p, tmp, &_stp_ctl_ready_q) { - list_del(p); - _stp_mempool_free(p); - } - _stp_mempool_destroy(_stp_pool_q); } diff --git a/runtime/transport/relayfs.c b/runtime/transport/relayfs.c index 6c516d66..6eefda8d 100644 --- a/runtime/transport/relayfs.c +++ b/runtime/transport/relayfs.c @@ -68,16 +68,16 @@ static void _stp_remove_relay_dir(struct dentry *dir) static void _stp_remove_relay_root(struct dentry *root) { if (root) { - if (!_stp_lock_debugfs()) { + if (!_stp_lock_transport_dir()) { errk("Unable to lock transport directory.\n"); return; } _stp_remove_relay_dir(root); - _stp_unlock_debugfs(); + _stp_unlock_transport_dir(); } } -struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts) +static struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts) { struct utt_trace *utt; int i; @@ -122,13 +122,13 @@ err: return NULL; } -void utt_set_overwrite(int overwrite) +static void utt_set_overwrite(int overwrite) { if (_stp_utt) _stp_utt->rchan->overwrite = overwrite; } -int utt_trace_startstop(struct utt_trace *utt, int start, +static int utt_trace_startstop(struct utt_trace *utt, int start, unsigned int *trace_seq) { int ret; @@ -163,7 +163,7 @@ int utt_trace_startstop(struct utt_trace *utt, int start, } -int utt_trace_remove(struct utt_trace *utt) +static int utt_trace_remove(struct utt_trace *utt) { dbug_trans(1, "removing relayfs files. %d\n", utt->trace_state); if (utt && (utt->trace_state == Utt_trace_setup || utt->trace_state == Utt_trace_stopped)) { diff --git a/runtime/transport/relayfs.h b/runtime/transport/relayfs.h index c47f4b98..c33e9b08 100644 --- a/runtime/transport/relayfs.h +++ b/runtime/transport/relayfs.h @@ -16,11 +16,11 @@ # include <linux/namei.h> -struct rchan *_stp_relayfs_open(unsigned n_subbufs, +static struct rchan *_stp_relayfs_open(unsigned n_subbufs, unsigned subbuf_size, int pid, struct dentry **outdir); -void _stp_relayfs_close(struct rchan *chan, struct dentry *dir); +static void _stp_relayfs_close(struct rchan *chan, struct dentry *dir); #endif /* _TRANSPORT_RELAYFS_H_ */ diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 72f9ad80..a329effe 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -1,26 +1,18 @@ /* -*- linux-c -*- * symbols.c - stp symbol and module functions * - * Copyright (C) Red Hat Inc, 2006-2008 + * Copyright (C) Red Hat Inc, 2006-2009 * * 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. - * - * The u32_swap(), generic_swap(), and sort() functions were adapted from - * lib/sort.c of kernel 2.6.22-rc5. It was written by Matt Mackall. */ #ifndef _STP_SYMBOLS_C_ #define _STP_SYMBOLS_C_ #include "../sym.h" - - -static void _stp_create_unwind_hdr(struct _stp_module *m); - - static void _stp_do_relocation(const char __user *buf, size_t count) { struct _stp_msg_relocation msg; @@ -68,89 +60,4 @@ static void _stp_do_relocation(const char __user *buf, size_t count) } /* loop over modules */ } - -static void u32_swap(void *a, void *b, int size) -{ - u32 t = *(u32 *)a; - *(u32 *)a = *(u32 *)b; - *(u32 *)b = t; -} - -static void generic_swap(void *a, void *b, int size) -{ - char *aa = a; - char *bb = b; - do { - char t = *aa; - *aa++ = *bb; - *bb++ = t; - } while (--size > 0); -} - -/** - * sort - sort an array of elements - * @base: pointer to data to sort - * @num: number of elements - * @size: size of each element - * @cmp_func: pointer to comparison function - * @swap_func: pointer to swap function or NULL - * - * This function does a heapsort on the given array. You may provide a - * swap function optimized to your element type. - * - * Sorting time is O(n log n) both on average and worst-case. While - * qsort is about 20% faster on average, it suffers from exploitable - * O(n*n) worst-case behavior and extra memory requirements that make - * it less suitable for kernel use. -*/ -void _stp_sort(void *_base, size_t num, size_t size, - int (*cmp_func) (const void *, const void *), void (*swap_func) (void *, void *, int size)) -{ - char *base = (char*) _base; - /* pre-scale counters for performance */ - int i = (num / 2 - 1) * size, n = num * size, c, r; - - if (!swap_func) - swap_func = (size == 4 ? u32_swap : generic_swap); - - /* heapify */ - for (; i >= 0; i -= size) { - for (r = i; r * 2 + size < n; r = c) { - c = r * 2 + size; - if (c < n - size && cmp_func(base + c, base + c + size) < 0) - c += size; - if (cmp_func(base + r, base + c) >= 0) - break; - swap_func(base + r, base + c, size); - } - } - - /* sort */ - for (i = n - size; i >= 0; i -= size) { - swap_func(base, base + i, size); - for (r = 0; r * 2 + size < i; r = c) { - c = r * 2 + size; - if (c < i - size && cmp_func(base + c, base + c + size) < 0) - c += size; - if (cmp_func(base + r, base + c) >= 0) - break; - swap_func(base + r, base + c, size); - } - } -} - -/* filter out section names we don't care about */ -static int _stp_section_is_interesting(const char *name) -{ - int ret = 1; - if (!strncmp("__", name, 2) - || (!strncmp(".note", name, 5) - && strncmp(".note.gnu.build-id", name, 18)) - || !strncmp(".gnu", name, 4) - || !strncmp(".mod", name, 4)) - ret = 0; - return ret; -} - - #endif /* _STP_SYMBOLS_C_ */ diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index f5ee2c36..0755781e 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -20,21 +20,22 @@ #include "time.c" #include "../mempool.c" #include "symbols.c" -#include "../procfs.c" static struct utt_trace *_stp_utt = NULL; static unsigned int utt_seq = 1; static int _stp_probes_started = 0; -pid_t _stp_target = 0; +static pid_t _stp_target = 0; static int _stp_exit_called = 0; -int _stp_exit_flag = 0; +static int _stp_exit_flag = 0; +#include "control.h" #ifdef STP_OLD_TRANSPORT #include "relayfs.c" #include "procfs.c" #else #include "utt.c" -#include "control.c" +#include "debugfs.c" #endif +#include "control.c" /* module parameters */ static int _stp_bufsize; @@ -42,9 +43,9 @@ module_param(_stp_bufsize, int, 0); MODULE_PARM_DESC(_stp_bufsize, "buffer size"); /* forward declarations */ -void probe_exit(void); -int probe_start(void); -void _stp_exit(void); +static void probe_exit(void); +static int probe_start(void); +static void _stp_exit(void); /* check for new workqueue API */ #ifdef DECLARE_DELAYED_WORK @@ -61,9 +62,18 @@ static struct workqueue_struct *_stp_wq; * _stp_handle_start - handle STP_START */ -void _stp_handle_start(struct _stp_msg_start *st) +static void _stp_handle_start(struct _stp_msg_start *st) { dbug_trans(1, "stp_handle_start\n"); + +#ifdef STAPCONF_VM_AREA + { /* PR9740: workaround for kernel valloc bug. */ + void *dummy; + dummy = alloc_vm_area (PAGE_SIZE); + free_vm_area (dummy); + } +#endif + _stp_target = st->target; st->res = probe_start(); if (st->res >= 0) @@ -170,7 +180,7 @@ static void _stp_work_queue(void *data) * This is called automatically when the module is unloaded. * */ -void _stp_transport_close() +static void _stp_transport_close() { dbug_trans(1, "%d: ************** transport_close *************\n", current->pid); _stp_cleanup_and_exit(0); @@ -205,10 +215,8 @@ static struct utt_trace *_stp_utt_open(void) * _stp_transport_init() is called from the module initialization. * It does the bare minimum to exchange commands with staprun */ -int _stp_transport_init(void) +static int _stp_transport_init(void) { - int ret; - dbug_trans(1, "transport_init\n"); _stp_init_pid = current->pid; #ifdef STAPCONF_TASK_UID @@ -247,7 +255,7 @@ int _stp_transport_init(void) goto err0; #endif - /* create debugfs/procfs control channel */ + /* create control channel */ if (_stp_register_ctl_channel() < 0) goto err1; @@ -302,7 +310,7 @@ static inline void _stp_unlock_inode(struct inode *inode) static struct dentry *_stp_lockfile = NULL; -static int _stp_lock_debugfs(void) +static int _stp_lock_transport_dir(void) { int numtries = 0; #ifdef STP_OLD_TRANSPORT @@ -317,7 +325,7 @@ static int _stp_lock_debugfs(void) return 1; } -static void _stp_unlock_debugfs(void) +static void _stp_unlock_transport_dir(void) { if (_stp_lockfile) { #ifdef STP_OLD_TRANSPORT @@ -350,7 +358,7 @@ static struct dentry *_stp_get_root_dir(const char *name) return NULL; } - if (!_stp_lock_debugfs()) { + if (!_stp_lock_transport_dir()) { errk("Couldn't lock transport directory.\n"); return NULL; } @@ -372,7 +380,7 @@ static struct dentry *_stp_get_root_dir(const char *name) errk("Could not create or find transport directory.\n"); } } - _stp_unlock_debugfs(); + _stp_unlock_transport_dir(); return root; } diff --git a/runtime/transport/transport.h b/runtime/transport/transport.h index 421a65c2..7d249c45 100644 --- a/runtime/transport/transport.h +++ b/runtime/transport/transport.h @@ -26,20 +26,24 @@ static unsigned _stp_nsubbufs = 8; static unsigned _stp_subbuf_size = 65536*4; -void _stp_warn (const char *fmt, ...); -extern void _stp_transport_close(void); -extern int _stp_print_init(void); -extern void _stp_print_cleanup(void); +static int _stp_transport_init(void); +static void _stp_transport_close(void); + +static void _stp_warn (const char *fmt, ...); +static int _stp_print_init(void); +static void _stp_print_cleanup(void); static struct dentry *_stp_get_root_dir(const char *name); -static int _stp_lock_debugfs(void); -static void _stp_unlock_debugfs(void); + +static int _stp_lock_transport_dir(void); +static void _stp_unlock_transport_dir(void); + static void _stp_attach(void); static void _stp_detach(void); -void _stp_handle_start(struct _stp_msg_start *st); +static void _stp_handle_start(struct _stp_msg_start *st); -int _stp_pid = 0; -uid_t _stp_uid = 0; -gid_t _stp_gid = 0; -pid_t _stp_init_pid = 0; -int _stp_attached = 0; +static int _stp_pid = 0; +static uid_t _stp_uid = 0; +static gid_t _stp_gid = 0; +static pid_t _stp_init_pid = 0; +static int _stp_attached = 0; #endif /* _TRANSPORT_TRANSPORT_H_ */ diff --git a/runtime/transport/utt.c b/runtime/transport/utt.c index 21d2ab8a..915662b2 100644 --- a/runtime/transport/utt.c +++ b/runtime/transport/utt.c @@ -37,7 +37,7 @@ static int utt_overwrite_flag = 0; * * Most of this function is deadcopy of relay_switch_subbuf. */ -size_t utt_switch_subbuf(struct utt_trace *utt, struct rchan_buf *buf, +static size_t utt_switch_subbuf(struct utt_trace *utt, struct rchan_buf *buf, size_t length) { char *old, *new; @@ -122,7 +122,7 @@ static void __utt_timer_init(struct utt_trace * utt) add_timer(&utt->timer); } -void utt_set_overwrite(int overwrite) +static void utt_set_overwrite(int overwrite) { utt_overwrite_flag = overwrite; } @@ -130,13 +130,13 @@ void utt_set_overwrite(int overwrite) static void utt_remove_root(struct utt_trace *utt) { if (utt->utt_tree_root) { - if (!_stp_lock_debugfs()) { + if (!_stp_lock_transport_dir()) { errk("Unable to lock transport directory.\n"); return; } if (simple_empty(utt->utt_tree_root)) debugfs_remove(utt->utt_tree_root); - _stp_unlock_debugfs(); + _stp_unlock_transport_dir(); utt->utt_tree_root = NULL; } } @@ -170,7 +170,7 @@ err: } -void utt_trace_cleanup(struct utt_trace *utt) +static void utt_trace_cleanup(struct utt_trace *utt) { if (utt == NULL) return; @@ -182,7 +182,7 @@ void utt_trace_cleanup(struct utt_trace *utt) _stp_kfree(utt); } -int utt_trace_remove(struct utt_trace *utt) +static int utt_trace_remove(struct utt_trace *utt) { if (utt->trace_state == Utt_trace_setup || utt->trace_state == Utt_trace_stopped) @@ -288,7 +288,7 @@ static struct rchan_callbacks utt_relay_callbacks_global = { /* * Setup everything required to start tracing */ -struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts) +static struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts) { struct utt_trace *utt = NULL; struct dentry *dir = NULL; @@ -373,7 +373,7 @@ err: return NULL; } -int utt_trace_startstop(struct utt_trace *utt, int start, +static int utt_trace_startstop(struct utt_trace *utt, int start, unsigned int *trace_seq) { int ret; diff --git a/runtime/transport/utt.h b/runtime/transport/utt.h index df225b3c..40e54919 100644 --- a/runtime/transport/utt.h +++ b/runtime/transport/utt.h @@ -40,14 +40,14 @@ struct utt_trace_setup { }; -extern struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts); -extern int utt_trace_startstop(struct utt_trace *utt, int start, +static struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts); +static int utt_trace_startstop(struct utt_trace *utt, int start, unsigned int *trace_seq); -extern void utt_trace_cleanup(struct utt_trace *utt); -extern int utt_trace_remove(struct utt_trace *utt); +static void utt_trace_cleanup(struct utt_trace *utt); +static int utt_trace_remove(struct utt_trace *utt); #ifndef STP_OLD_TRANSPORT -extern size_t utt_switch_subbuf(struct utt_trace *utt, struct rchan_buf *buf, +static size_t utt_switch_subbuf(struct utt_trace *utt, struct rchan_buf *buf, size_t length); /** * utt_reserve - reserve slot in channel buffer diff --git a/runtime/unwind.c b/runtime/unwind.c index bc8a93dc..9c704e28 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * kernel stack unwinding - * Copyright (C) 2008 Red Hat Inc. + * Copyright (C) 2008-2009 Red Hat Inc. * * Based on old kernel code that is * Copyright (C) 2002-2006 Novell, Inc. @@ -42,129 +42,6 @@ static void swap_eh_frame_hdr_table_entries(void *p1, void *p2, int size) e2->fde = v; } -/* Build a binary-searchable unwind header. Also do some - * validity checks. In the future we might use */ -/* .eh_frame_hdr if it is already present. */ -static void _stp_create_unwind_hdr(struct _stp_module *m) -{ - const u8 *ptr; - unsigned long tableSize, hdrSize, last; - unsigned n = 0; - const u32 *fde; - int bad_order = 0; - struct { - u8 version; - u8 eh_frame_ptr_enc; - u8 fde_count_enc; - u8 table_enc; - unsigned long eh_frame_ptr; - unsigned int fde_count; - struct eh_frame_hdr_table_entry table[]; - } __attribute__ ((__packed__)) * header = NULL; - - /* already did this or no data? */ - if (m->unwind_hdr || m->unwind_data_len == 0) - return; - - tableSize = m->unwind_data_len; - if (tableSize & (sizeof(*fde) - 1)) { - dbug_unwind(1, "tableSize=0x%x not a multiple of 0x%x\n", (int)tableSize, (int)sizeof(*fde)); - goto bad; - } - - /* count the FDEs */ - for (fde = m->unwind_data; - tableSize > sizeof(*fde) && tableSize - sizeof(*fde) >= *fde; - tableSize -= sizeof(*fde) + *fde, fde += 1 + *fde / sizeof(*fde)) { - signed ptrType; - const u32 *cie; - - /* check for extended length */ - if ((*fde & 0xfffffff0) == 0xfffffff0) { - dbug_unwind(1, "Module %s has extended-length CIE or FDE."); - dbug_unwind(1, "This is not supported at this time."); - goto bad; - } - cie = cie_for_fde(fde, m); - if (cie == ¬_fde) - continue; /* fde was a CIE. That's OK, just skip it. */ - if (cie == NULL || cie == &bad_cie || (ptrType = fde_pointer_type(cie)) < 0) - goto bad; - /* we have a real FDE */ - ptr = (const u8 *)(fde + 2); - if (!read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType)) - goto bad; - ++n; - } - - if (tableSize || !n) { - dbug_unwind(1, "%s: tableSize=%ld, n=%d\n", m->name, tableSize, n); - goto bad; - } - - hdrSize = 4 + sizeof(unsigned long) + sizeof(unsigned int) + 2 * n * sizeof(unsigned long); - header = _stp_kmalloc(hdrSize); - if (header == NULL) { - header = _stp_vmalloc(hdrSize); - if (header == NULL) - return; - } - - header->version = 1; - header->eh_frame_ptr_enc = DW_EH_PE_absptr; - header->fde_count_enc = DW_EH_PE_data4; - header->table_enc = DW_EH_PE_absptr; - _stp_put_unaligned((unsigned long)m->unwind_data, &header->eh_frame_ptr); - - BUILD_BUG_ON(offsetof(typeof(*header), fde_count) - % __alignof(typeof(header->fde_count))); - header->fde_count = n; - - BUILD_BUG_ON(offsetof(typeof(*header), table) % __alignof(typeof(*header->table))); - - n = 0; - last = 0; - tableSize = m->unwind_data_len; - for (fde = m->unwind_data; tableSize; tableSize -= sizeof(*fde) + *fde, fde += 1 + *fde / sizeof(*fde)) { - const u32 *cie = cie_for_fde(fde, m); - if (cie == ¬_fde) - continue; - if (cie == NULL || cie == &bad_cie) - goto bad; - /* we have a real FDE */ - ptr = (const u8 *)(fde + 2); - header->table[n].start = read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, fde_pointer_type(cie)); - header->table[n].fde = (unsigned long)fde; - if (header->table[n].start < last) - bad_order++; - last = header->table[n].start; - ++n; - } - WARN_ON(n != header->fde_count); - - /* Is sort ever necessary? */ - if (bad_order) - _stp_sort(header->table, n, sizeof(*header->table), cmp_eh_frame_hdr_table_entries, - swap_eh_frame_hdr_table_entries); - - m->unwind_hdr_len = hdrSize; - m->unwind_hdr = header; - return; - - /* unwind data is not acceptable. free it and return */ -bad: - dbug_unwind(1, "unwind data for %s is unacceptable. Freeing.", m->name); - if (header) { - _stp_vfree(header); - } - if (m->unwind_data) { - _stp_vfree(m->unwind_data); - m->unwind_data = NULL; - m->unwind_data_len = 0; - } - return; -} - static uleb128_t get_uleb128(const u8 **pcur, const u8 *end) { const u8 *cur = *pcur; @@ -655,7 +532,7 @@ static const char *_stp_enc_lo_name[] = { "DW_EH_PE_sdata4", "DW_EH_PE_sdata8" }; -char *_stp_eh_enc_name(signed type) +static char *_stp_eh_enc_name(signed type) { static char buf[64]; int hi, low; @@ -685,7 +562,7 @@ char *_stp_eh_enc_name(signed type) /* Unwind to previous to frame. Returns 0 if successful, negative * number in case of an error. A positive return means unwinding is finished; * don't try to fallback to dumping addresses on the stack. */ -int unwind(struct unwind_frame_info *frame) +static int unwind(struct unwind_frame_info *frame) { #define FRAME_REG(r, t) (((t *)frame)[reg_info[r].offs]) const u32 *fde, *cie = NULL; diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index 2c3067cf..bd58d760 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -131,7 +131,7 @@ static int check_binary_precision (int precision) { return precision; } -int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) +static int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) { int len; uint64_t num; diff --git a/scripts/kernel-doc b/scripts/kernel-doc index dd18ed69..add4ba3c 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -976,13 +976,13 @@ sub output_probe_xml(%) { print "<refentry id=\"$id\">\n"; print "<refentryinfo>\n"; print " <title>LINUX</title>\n"; - print " <productname>Kernel Hackers Manual</productname>\n"; + print " <productname>SystemTap Tapset Reference</productname>\n"; print " <date>$man_date</date>\n"; print "</refentryinfo>\n"; print "<refmeta>\n"; print " <refentrytitle><phrase>".$args{'probe'}."</phrase></refentrytitle>\n"; print " <manvolnum>5</manvolnum>\n"; - print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n"; +# print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n"; print "</refmeta>\n"; print "<refnamediv>\n"; print " <refname>".$args{'probe'}."</refname>\n"; @@ -1034,13 +1034,13 @@ sub output_sfunction_xml(%) { print "<refentry id=\"$id\">\n"; print "<refentryinfo>\n"; print " <title>LINUX</title>\n"; - print " <productname>Kernel Hackers Manual</productname>\n"; + print " <productname>SystemTap Tapset Reference</productname>\n"; print " <date>$man_date</date>\n"; print "</refentryinfo>\n"; print "<refmeta>\n"; print " <refentrytitle><phrase>".$args{'sfunction'}."</phrase></refentrytitle>\n"; print " <manvolnum>5</manvolnum>\n"; - print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n"; +# print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n"; print "</refmeta>\n"; print "<refnamediv>\n"; print " <refname>".$args{'sfunction'}."</refname>\n"; @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-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 @@ -45,6 +45,7 @@ struct translator_output; struct unparser; struct semantic_error; struct module_cache; +struct update_visitor; // XXX: a generalized form of this descriptor could be associated with @@ -86,6 +87,7 @@ struct systemtap_session std::string runtime_path; std::string data_path; std::string module_name; + std::string stapconf_name; std::string output_file; std::string cmd; int target_pid; @@ -112,6 +114,7 @@ struct systemtap_session bool use_cache; std::string cache_path; std::string hash_path; + std::string stapconf_path; // dwarfless operation bool consult_symtab; @@ -131,6 +134,10 @@ struct systemtap_session stapfile* user_file; std::vector<stapfile*> library_files; + // filters to run over all code before symbol resolution + // e.g. @cast expansion + std::vector<update_visitor*> code_filters; + // resolved globals/functions/probes for the run as a whole std::vector<stapfile*> files; std::vector<vardecl*> globals; @@ -192,3 +199,5 @@ struct systemtap_session extern int pending_interrupts; #endif // SESSION_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/stap-add-server-cert b/stap-add-server-cert index 976f323f..a94c5955 100755 --- a/stap-add-server-cert +++ b/stap-add-server-cert @@ -25,21 +25,21 @@ if test "X$2" = "X"; then echo "Certificate database directory must be specified" >&2 exit 1 fi -if ! test -d $2/client; then - if ! mkdir -p $2/client; then - echo "Unable to find or create the client certificate database directory: $2/client" >&2 +if ! test -d $2; then + if ! mkdir -p -m 755 $2; then + echo "Unable to find or create the client certificate database directory: $2" >&2 exit 1 fi fi # Add the certificate -if ! certutil -A -n stap-server -d $2/client -i $1 -t "P,P,P" > /dev/null; then +if ! certutil -A -n stap-server -d $2 -i $1 -t "P,P,P" > /dev/null; then echo "Unable to add $1 to the client certificate database $2" >&2 exit 1 fi # Ensure that the database is readable by others -if ! chmod +r $2/client/*.db; then +if ! chmod +r $2/*.db; then echo "Warning: unable to make the client certificate database $2 readable by others" >&2 fi diff --git a/stap-client b/stap-client index 09ee60bf..e2d95ada 100755 --- a/stap-client +++ b/stap-client @@ -26,6 +26,13 @@ trap 'ignore_signal' SIGHUP SIGPIPE #----------------------------------------------------------------------------- # function: configuration function configuration { + # INSTALL-HOOK These settings work for running the client from the source tree + # INSTALL-HOOK using the dejagnu test harness and will be overridden at install + # INSTALL-HOOK time. + exec_prefix= + sysconfdir=`pwd`/net + + # General configuration tmpdir_prefix_client=stap.client tmpdir_prefix_server=stap.server avahi_service_tag=_stap._tcp @@ -33,33 +40,32 @@ function configuration { # function: initialization function initialization { + our_host_name=`expr "$HOSTNAME" : "\\\([a-zA-Z0-9-]*\\\).*"` + our_domain_name=`expr "$HOSTNAME" : "$our_host_name\\\(.*\\\)"` + rc=0 wd=`pwd` umask 0 staprun_running=0 - # Where are we installed? - if test "`basename $0`" = "stap" -a "$0" = `which stap`; then - # The dejagnu test harness may invoke us as 'stap' relying on $PATH to - # find us. If so, then use the $PATH to find the rest of the systemtap - # tools. - exec_prefix="" - # Also, set the prefix to point to where we were found. - prefix=`which stap` - prefix=`dirname $prefix` - else - # Assume we were installed normally - exec_prefix=`dirname $0` - exec_prefix=`cd $exec_prefix && pwd`/ - prefix=`dirname $exec_prefix` - fi - # Default location for server certificates if we're not root + # Must be owned by us. + local uid uname if test $EUID != 0; then - local_ssl_dbs="$HOME/.systemtap/ssl/client" + if test -e $HOME/.systemtap/ssl/client; then + if check_db $HOME/.systemtap/ssl/client $EUID $USER; then + local_ssl_dbs=$HOME/.systemtap/ssl/client + fi + fi + fi + # Additional location for all users. Must be owned by root. + if test "X$sysconfdir" != "X"; then + if test -e $sysconfdir/systemtap/ssl/client; then + if check_db $sysconfdir/systemtap/ssl/client 0 root; then + public_ssl_dbs=$sysconfdir/systemtap/ssl/client + fi + fi fi - # Additional location for all users. - public_ssl_dbs=$prefix/etc/systemtap/ssl/client # Default options settings p_phase=5 @@ -67,11 +73,14 @@ function initialization { keep_temps=0 b_specified=0 + # Default variable settings + find_all= + # Create a temporary directory to package things in # Do this before parsing the command line so that there is a place # to put -I and -R directories. tmpdir_client=`mktemp -dt $tmpdir_prefix_client.XXXXXX` || \ - fatal "ERROR: cannot create temporary directory " $tmpdir_client + fatal "Cannot create temporary directory " $tmpdir_client tmpdir_env=`dirname $tmpdir_client` } @@ -111,6 +120,9 @@ function parse_options { ssl) process_ssl $first_token ;; + server) + process_server $first_token + ;; *) # An unknown or unimportant option. # Ignore it, but pass it on to the server. @@ -245,7 +257,18 @@ function parse_options { cmdline="$cmdline1 $cmdline2" fi + # Processing based on final options settings + # Complete the list of local certificate databases local_ssl_dbs="$additional_local_ssl_dbs $local_ssl_dbs" + + # We must have at least one usable certificate database. + test "X$local_ssl_dbs" != "X " -o "X$public_ssl_dbs" != "X" || \ + fatal "No usable certificate databases found" + + # We can use any server if the phase is less than 5 + if test $p_phase -lt 5; then + find_all="--all" + fi } # function: get_arg FIRSTWORD SECONDWORD @@ -278,10 +301,24 @@ function process_ssl { test "X$db" != "X" || \ fatal "Missing argument to --ssl" - + + check_db $db || return + additional_local_ssl_dbs="$additional_local_ssl_dbs $db" } +# function: process_server ARGUMENT +# +# Process the --server option. +function process_server { + local spec=`expr "$1" : '--server=\(.*\)'` + + test "X$spec" != "X" || \ + fatal "Missing argument to --server" + + specified_servers="$specified_servers $spec" +} + # function: process_c ARGUMENT # # Process the -c flag. @@ -357,9 +394,9 @@ function include_file_or_directory { # Add a symbolic link of the named file or directory to our temporary directory local local_name=`generate_client_temp_name $2` mkdir -p $tmpdir_client/$1/`dirname $local_name` || \ - fatal "ERROR: could not create $tmpdir_client/$1/`dirname $local_name`" + fatal "Could not create $tmpdir_client/$1/`dirname $local_name`" ln -s /$local_name $tmpdir_client/$1/$local_name || \ - fatal "ERROR: could not link $tmpdir_client/$1/$local_name to /$local_name" + fatal "Could not link $tmpdir_client/$1/$local_name to /$local_name" echo "$local_name" } @@ -388,7 +425,7 @@ function create_request { if test "X$script_file" != "X"; then if test "$script_file" = "-"; then mkdir -p $tmpdir_client/script || \ - fatal "ERROR: cannot create temporary directory " $tmpdir_client/script + fatal "Cannot create temporary directory " $tmpdir_client/script cat > $tmpdir_client/script/$script_file else include_file_or_directory script $script_file > /dev/null @@ -421,61 +458,61 @@ function package_request { local tmpdir_client_base=`basename $tmpdir_client` zip_client=$tmpdir_env/`mktemp $tmpdir_client_base.zip.XXXXXX` || \ - fatal "ERROR: cannot create temporary file " $zip_client + fatal "Cannot create temporary file " $zip_client (rm $zip_client && zip -r $zip_client $tmpdir_client_base > /dev/null) || \ - fatal "ERROR: zip of request tree, $tmpdir_client, failed" + fatal "zip of request tree, $tmpdir_client, failed" } # function: unpack_response # -# Unpack the jar file received from the server and make the contents available +# Unpack the zip file received from the server and make the contents available # for printing the results and/or running 'staprun'. function unpack_response { tmpdir_server=`mktemp -dt $tmpdir_prefix_client.server.XXXXXX` || \ - fatal "ERROR: cannot create temporary file " $tmpdir_server - - # Unpack and verify the digitally signed server output directory - if ! signtool -d $ssl_db -v $jar_server > /dev/null 2>&1; then - # Run the verification again to get the reason - fatal "ERROR: Verification of server response, $jar_server, failed. -"`signtool -d $ssl_db -v $jar_server | grep "reported reason"` - fi + fatal "Cannot create temporary file " $tmpdir_server # Unpack the server output directory - unzip -d $tmpdir_server $jar_server > /dev/null || \ - fatal "ERROR: Cannot unpack server response, $jar_server" + unzip -d $tmpdir_server $zip_server > /dev/null || \ + fatal "Cannot unpack server response, $zip_server" - # Check the contents of the expanded directory. It should contain: + # Check the contents of the expanded directory. It should contain a + # single directory whose name matches stap.server.?????? + local num_files=`ls $tmpdir_server | wc -l` + test $num_files = 1 || \ + fatal "Wrong number of files in server's temp directory" + test -d $tmpdir_server/stap.server.?????? || \ + fatal "`ls $tmpdir_server` does not match the expected name or is not a directory" + # Move the contents of the directory down one level. + mv $tmpdir_server/stap.server.??????/* $tmpdir_server + rm -fr $tmpdir_server/stap.server.?????? + + # Check the contents of the directory. It should contain: # 1) a file called stdout # 2) a file called stderr # 3) a file called rc - # 4) a directory called META-INF - # 5) optionally a directory named to match stap?????? - local num_files=`ls $tmpdir_server | wc -l` - test $num_files = 5 -o $num_files = 4 || \ - fatal "ERROR: Wrong number of files in server's temp directory" + # 4) optionally a directory named to match stap?????? + num_files=`ls $tmpdir_server | wc -l` + test $num_files = 4 -o $num_files = 3 || \ + fatal "Wrong number of files in server's temp directory" test -f $tmpdir_server/stdout || \ - fatal "ERROR: `pwd`/$tmpdir_server/stdout does not exist or is not a regular file" + fatal "`pwd`/$tmpdir_server/stdout does not exist or is not a regular file" test -f $tmpdir_server/stderr || \ - fatal "ERROR: `pwd`/$tmpdir_server/stderr does not exist or is not a regular file" + fatal "`pwd`/$tmpdir_server/stderr does not exist or is not a regular file" test -f $tmpdir_server/rc || \ - fatal "ERROR: `pwd`/$tmpdir_server/rc does not exist or is not a regular file" - test -d $tmpdir_server/META-INF || \ - fatal "ERROR: `pwd`/$tmpdir_server/META-INF does not exist or is not a directory" + fatal "`pwd`/$tmpdir_server/rc does not exist or is not a regular file" # See if there is a systemtap temp directory - tmpdir_stap=`ls $tmpdir_server | grep stap` - tmpdir_stap=`expr "$tmpdir_stap" : "\\\(stap......\\\)"` + tmpdir_stap=`cd $tmpdir_server && ls | grep stap......\$ 2>/dev/null` if test "X$tmpdir_stap" != "X"; then test -d $tmpdir_server/$tmpdir_stap || \ - fatal "ERROR: `pwd`/$tmpdir_server/$tmpdir_stap is not a directory" + fatal "$tmpdir_server/$tmpdir_stap is not a directory" # Move the systemtap temp directory to a local temp location, if -k # was specified. if test $keep_temps = 1; then local local_tmpdir_stap=`mktemp -dt stapXXXXXX` || \ - fatal "ERROR: cannot create temporary directory " $local_tmpdir_stap + fatal "Cannot create temporary directory " $local_tmpdir_stap mv $tmpdir_server/$tmpdir_stap/* $local_tmpdir_stap 2>/dev/null rm -fr $tmpdir_server/$tmpdir_stap @@ -493,97 +530,175 @@ function unpack_response { # # Find and establish connection with a compatible stap server. function find_and_connect_to_server { - # Use a temp file here instead of a pipeline so that the side effects - # of choose_server are seen by the rest of this script. - cd $tmpdir_client - ${exec_prefix}stap-find-servers > servers - choose_server < servers - rm -fr servers + local num_servers=0 + + # Make a place to receive the response file. + zip_server=`mktemp -t $tmpdir_prefix_client.server.zip.XXXXXX` || \ + fatal "Cannot create temporary file " $zip_server + + # Make a place to record connection errors + touch $tmpdir_client/connect + + # If servers were specified on the command line, then try them + # in sequence. Don't try any other servers. + if test "X$specified_servers" != "X"; then + for server in $specified_servers; do + num_servers=$(($num_servers + 1)) + + # If the server is completely specified, (i.e. server:port), + # then try it directly. + port=`expr "$server" : '.\+:\([0-9]\+\)'` + if test "X$port" != "X"; then + name=`expr "$server" : '\(.\+\):[0-9]\+'` + + # If we have been given an ip address, then try to resolve it to a name. + # If we have been given a name, try to resolve the full name. + # The full name is needed in order to validate the server's certificate. + address=`expr "$name" : '\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)'` + if test "X$address" = "X"; then + # We've been given a host name + full_name=`nslookup $name | awk '/^Name\:/ {print $2}'` + if test "X$full_name" != "X"; then + name=$full_name + fi + else + # We've been given an ip address. + name=`nslookup $address | awk '/in-addr\.arpa/ {print $4}'` + name=`expr "$name" : '\(.*\)\.'` + if test "X$name" = "X"; then + echo "Cannot resolve ip address $address" >> $tmpdir_client/connect + continue + fi + fi + + # Now try to contact the given server. + ssl_db=`send_receive $name $port` + test "X$ssl_db" != "X" && return + continue + fi + + # Otherwise select the matching server from the available servers + # and use the port it is advertizing. + # + # Have we been given an ip address? If so, just use it. + address=`expr "$server" : '\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)'` + if test "X$address" = "X"; then + # We have not been given an ip address. Try to resolve it as a host name. + if test "X$server" = "Xlocalhost"; then + # We don't want the address of the loopback interface here. Avahi will present + # the actual ip address. + server=$our_host_name$our_domain_name + fi + address=`nslookup $server | awk '/^Address\:[ \t][0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/ {print $2}'` + if test "X$address" = "X"; then + echo "Cannot resolve server $server" >> $tmpdir_client/connect + continue + fi + fi + + if test `${exec_prefix}stap-find-servers $find_all | grep $address | wc -l` = "0"; then + warning "No server is available on $server" 2>> $tmpdir_client/connect + continue + fi + + ssl_db=`${exec_prefix}stap-find-servers $find_all | grep $address | choose_server` + test "X$ssl_db" != "X" && return + done + else + # No servers specified. Find available servers and choose one of them. + # Remember which ssl certificate database was used to authenticate the chosen + # server. + ssl_db=`${exec_prefix}stap-find-servers $find_all | choose_server` + test "X$ssl_db" != "X" && return + + num_servers=`${exec_prefix}stap-find-servers $find_all | wc -l` + fi + + if test $num_servers = 0; then + fatal "Unable to find a server" + fi + + cat $tmpdir_client/connect >&2 + fatal "Unable to connect to a server" } # function: choose_server # # Examine each line from stdin and attempt to connect to each server # specified until successful. +# echo the name of the ssl certificate database used to successfully authenticate +# the server. function choose_server { - local num_servers=0 - local name - while read name server port remain - do - num_servers=$(($num_servers + 1)) + local name ip port remain - # The server must match the dns name on the certificate - # and must be 'localhost' if the server is on the local host. - local server_host_name=`expr "$name" : "\\\([a-zA-Z0-9-]*\\\).*"` - local server_domain_name=`expr "$name" : "$server_host_name\\\(.*\\\)"` - local our_host_name=`expr "$HOSTNAME" : "\\\([a-zA-Z0-9-]*\\\).*"` - local our_domain_name=`expr "$HOSTNAME" : "$our_host_name\\\(.*\\\)"` - - if test "X$server_domain_name" = "X.local"; then - server_domain_name=$our_domain_name - fi - if test "X$server_host_name$server_domain_name" = "X$our_host_name$our_domain_name"; then - server=localhost - else - server=$server_host_name$server_domain_name + while read name ip port remain + do + if test "X$name" = "X"; then + fatal "Server name not provided by avahi" fi - if test "X$server" = "X"; then - fatal "ERROR: server ip address not provided" - fi +# if test "X$ip" = "X"; then +# fatal "Server ip address not provided by avahi" +# fi if test "X$port" = "X"; then - fatal "ERROR: server port not provided" + fatal "Server port not provided by avahi" fi - if send_receive; then - return 0 - fi + ssl_db=`send_receive $name $port` + test "X$ssl_db" != "X" && echo $ssl_db && return done - - if test $num_servers = 0; then - fatal "ERROR: unable to find a server" - fi - - cat $tmpdir_client/connect >&2 - fatal "ERROR: unable to connect to a server" } -# function: send_receive +# function: send_receive SERVER PORT # # Connect to the server, send the request and receive the response +# echo the name of the ssl certificate database used to successfully authenticate +# the server. function send_receive { - # Make a place to receive the response file. - jar_server=`mktemp -t $tmpdir_prefix_client.server.jar.XXXXXX` || \ - fatal "ERROR: cannot create temporary file " $jar_server + local server=$1 + local port=$2 - # If the server is local, try to connect using each of the given local - # certificate databases in turn for verification. - if test "X$server" = "Xlocalhost"; then - for db in $local_ssl_dbs - do - # Send the request and receive the response using stap-client-connect - echo "Attempting connection with $server using certificate database in '$db'" >> $tmpdir_client/connect - ${exec_prefix}stap-client-connect -i $zip_client -o $jar_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & - wait '%${exec_prefix}stap-client-connect' - test $? = 0 && ssl_db=$db && return 0 - sleep 1 - done + # The server must match the dns name on the certificate + # and must be 'localhost' if the server is on the local host. + local server_host_name=`expr "$server" : "\\\([a-zA-Z0-9-]*\\\).*"` + local server_domain_name=`expr "$server" : "$server_host_name\\\(.*\\\)"` + + if test "X$server_domain_name" = "X.local"; then + server_domain_name=$our_domain_name + fi + if test "X$server_host_name$server_domain_name" = "Xlocalhost$our_domain_name"; then + server=localhost + elif test "X$server_host_name$server_domain_name" = "X$our_host_name$our_domain_name"; then + server=localhost + else + server=$server_host_name$server_domain_name fi - # We can try the public certificate databases for all servers. + # Try to connect using each of the given local certificate databases in turn + # for verification. + for db in $local_ssl_dbs + do + # Send the request and receive the response using stap-client-connect + echo "Attempting connection with $server:$port using certificate database in '$db'" >> $tmpdir_client/connect + ${exec_prefix}stap-client-connect -i $zip_client -o $zip_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & + wait '%${exec_prefix}stap-client-connect' + test $? = 0 && echo $db && return + sleep 1 + done + + # Next, try the public certificate databases. for db in $public_ssl_dbs do # Send the request and receive the response using stap-client-connect - echo "Attempting connection with $server using certificate database in '$db'" >> $tmpdir_client/connect - ${exec_prefix}stap-client-connect -i $zip_client -o $jar_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & + echo "Attempting connection with $server:$port using certificate database in '$db'" >> $tmpdir_client/connect + ${exec_prefix}stap-client-connect -i $zip_client -o $zip_server -d $db -p $port -h $server >> $tmpdir_client/connect 2>&1 & wait '%${exec_prefix}stap-client-connect' - test $? = 0 && ssl_db=$db && return 0 + test $? = 0 && echo $db && return sleep 1 done # Could not connect using any of the certificate databases - return 1 } # function: process_response @@ -631,7 +746,7 @@ function maybe_call_staprun { if test "X$tmpdir_stap" = "X"; then # OK if no script specified if test "X$e_script" != "X" -o "X$script_file" != "X"; then - fatal "ERROR: systemtap temporary directory is missing in server response" + fatal "systemtap temporary directory is missing in server response" fi return fi @@ -639,7 +754,7 @@ function maybe_call_staprun { # There should be a module. local mod_name=`ls $tmpdir_stap | grep '.ko$'` if test "X$mod_name" = "X"; then - fatal "ERROR: no module was found in $tmpdir_stap" + fatal "No module was found in $tmpdir_stap" fi if test $p_phase = 5; then @@ -713,12 +828,168 @@ function staprun_PATH { echo "PATH=$PATH staprun" | sed "s,$PATH_component,,g" } +# function: check_db DBNAME [ EUID USER ] +# +# Check the security of the given database directory. +function check_db { + local dir=$1 + local euid=$2 + local user=$3 + local rc=0 + + # Check that we have been given a directory + if ! test -e $dir; then + warning "Certificate database '$dir' does not exist" + return 1 + fi + if ! test -d $dir; then + warning "Certificate database '$dir' is not a directory" + return 1 + fi + + # If euid has been specified, then this directory must be owned by that + # user. + if test "X$euid" != "X"; then + local ownerid=`stat -c "%u" $dir` + if test "X$ownerid" != "X$euid"; then + warning "Certificate database '$dir' must be owned by $user" + rc=1 + fi + fi + + # Check that we can read the directory + if ! test -r $dir; then + warning "Certificate database '$dir' is not readble" + rc=1 + fi + + # Check the access permissions of the directory + local perm=0`stat -c "%a" $dir` + if test $((($perm & 0400) == 0400)) = 0; then + warning "Certificate database '$dir' should be readable by the owner" + fi + if test $((($perm & 0200) == 0200)) = 0; then + warning "Certificate database '$dir' should be writeable by the owner" + fi + if test $((($perm & 0100) == 0100)) = 0; then + warning "Certificate database '$dir' should be searchable by the owner" + fi + if test $((($perm & 0040) == 0040)) = 0; then + warning "Certificate database '$dir' should be readable by the group" + fi + if test $((($perm & 0020) == 0020)) = 1; then + warning "Certificate database '$dir' must not be writable by the group" + rc=1 + fi + if test $((($perm & 0010) == 0010)) = 0; then + warning "Certificate database '$dir' should be searchable by the group" + fi + if test $((($perm & 0004) == 0004)) = 0; then + warning "Certificate database '$dir' should be readable by others" + fi + if test $((($perm & 0002) == 0002)) = 1; then + warning "Certificate database '$dir' must not be writable by others" + rc=1 + fi + if test $((($perm & 0001) == 0001)) = 0; then + warning "Certificate database '$dir' should be searchable by others" + fi + + # Now check the permissions of the critical files. + check_db_file $dir/cert8.db $euid $user || rc=1 + check_db_file $dir/key3.db $euid $user || rc=1 + check_db_file $dir/secmod.db $euid $user || rc=1 + + test $rc = 1 && warning "Unable to use certificate database '$dir' due to errors" + + return $rc +} + +# function: check_db_file FILENAME [ EUID USER ] +# +# Check the security of the given database file. +function check_db_file { + local file=$1 + local rc=0 + + # Check that we have been given a file + if ! test -e $file; then + warning "Certificate database file '$file' does not exist" + return 1 + fi + if ! test -f $file; then + warning "Certificate database file '$file' is not a regular file" + return 1 + fi + + # If euid has been specified, then this directory must be owned by that + # user. + if test "X$euid" != "X"; then + local ownerid=`stat -c "%u" $file` + if test "X$ownerid" != "X$euid"; then + warning "Certificate database file '$file' must be owned by $user" + rc=1 + fi + fi + + # Check that we can read the file + if ! test -r $file; then + warning "Certificate database file '$file' is not readble" + rc=1 + fi + + # Check the access permissions of the file + local perm=0`stat -c "%a" $file` + if test $((($perm & 0400) == 0400)) = 0; then + warning "Certificate database file '$file' should be readable by the owner" + fi + if test $((($perm & 0200) == 0200)) = 0; then + warning "Certificate database file '$file' should be writeable by the owner" + fi + if test $((($perm & 0100) == 0100)) = 1; then + warning "Certificate database file '$file' must not be executable by the owner" + rc=1 + fi + if test $((($perm & 0040) == 0040)) = 0; then + warning "Certificate database file '$file' should be readable by the group" + fi + if test $((($perm & 0020) == 0020)) = 1; then + warning "Certificate database file '$file' must not be writable by the group" + rc=1 + fi + if test $((($perm & 0010) == 0010)) = 1; then + warning "Certificate database file '$file' must not be executable by the group" + rc=1 + fi + if test $((($perm & 0004) == 0004)) = 0; then + warning "Certificate database file '$file' should be readable by others" + fi + if test $((($perm & 0002) == 0002)) = 1; then + warning "Certificate database file '$file' must not be writable by others" + rc=1 + fi + if test $((($perm & 0001) == 0001)) = 1; then + warning "Certificate database file '$file' must not be executable by others" + rc=1 + fi + + return $rc +} + +# function: warning [ MESSAGE ] +# +# Warning error +# Prints its arguments to stderr +function warning { + echo "$0: WARNING:" "$@" >&2 +} + # function: fatal [ MESSAGE ] # # Fatal error # Prints its arguments to stderr and exits function fatal { - echo "$0:" "$@" >&2 + echo "$0: ERROR:" "$@" >&2 cleanup exit 1 } @@ -732,7 +1003,7 @@ function cleanup { if test $keep_temps != 1; then rm -fr $tmpdir_client rm -f $zip_client - rm -f $jar_server + rm -f $zip_server rm -fr $tmpdir_server fi } diff --git a/stap-client-connect.c b/stap-client-connect.c index 9466b566..fd3b950c 100644 --- a/stap-client-connect.c +++ b/stap-client-connect.c @@ -27,6 +27,7 @@ #include <nss.h> #include <prerror.h> #include <secerr.h> +#include <sslerr.h> #define READ_BUFFER_SIZE (60 * 1024) static char *hostName = NULL; @@ -74,6 +75,12 @@ errWarn(char *function) case SEC_ERROR_CA_CERT_INVALID: fputs ("The issuer's certificate is invalid\n", stderr); break; + case SEC_ERROR_BAD_DATABASE: + fputs ("The specified certificate database does not exist or is not valid\n", stderr); + break; + case SSL_ERROR_BAD_CERT_DOMAIN: + fputs ("The requested domain name does not match the server's certificate\n", stderr); + break; case PR_CONNECT_RESET_ERROR: fputs ("Connection reset by peer\n", stderr); break; @@ -307,10 +314,12 @@ static SECStatus do_connect(PRNetAddr *addr) { PRFileDesc *sslSocket; + PRStatus prStatus; +#if 0 PRHostEnt hostEntry; char buffer[PR_NETDB_BUF_SIZE]; - PRStatus prStatus; PRIntn hostenum; +#endif SECStatus secStatus; secStatus = SECSuccess; @@ -338,7 +347,7 @@ do_connect(PRNetAddr *addr) errWarn("SSL_SetURL"); goto done; } - +#if 0 /* Already done? */ /* Prepare and setup network connection. */ prStatus = PR_GetHostByName(hostName, buffer, sizeof(buffer), &hostEntry); if (prStatus != PR_SUCCESS) @@ -355,7 +364,7 @@ do_connect(PRNetAddr *addr) secStatus = SECFailure; goto done; } - +#endif prStatus = PR_Connect(sslSocket, addr, PR_INTERVAL_NO_TIMEOUT); if (prStatus != PR_SUCCESS) { @@ -397,7 +406,7 @@ do_connect(PRNetAddr *addr) } static void -client_main(unsigned short port, const char *hostName) +client_main(unsigned short port) { SECStatus secStatus; PRStatus prStatus; @@ -479,10 +488,12 @@ main(int argc, char **argv) /* All cipher suites except RSA_NULL_MD5 are enabled by Domestic Policy. */ NSS_SetDomesticPolicy(); - client_main(port, hostName); + client_main(port); NSS_Shutdown(); PR_Cleanup(); return 0; } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/stap-find-or-start-server b/stap-find-or-start-server index efe23558..97e7caca 100755 --- a/stap-find-or-start-server +++ b/stap-find-or-start-server @@ -17,15 +17,16 @@ # # Otherwise, it echoes -1 and exits with 1 -# Where are we installed? -exec_prefix=`dirname $0` -exec_prefix=`cd $exec_prefix && pwd` +# INSTALL-HOOK These settings work for running the client from the source tree +# INSTALL-HOOK using the dejagnu test harness and will be overridden at install +# INSTALL-HOOK time. +exec_prefix= # Is there a server available? -$exec_prefix/stap-find-servers >/dev/null 2>&1 && echo 0 && exit 0 +${exec_prefix}stap-find-servers >/dev/null 2>&1 && echo 0 && exit 0 # No server available, try to start one. -pid=`$exec_prefix/stap-start-server "$@"` +pid=`${exec_prefix}stap-start-server "$@"` if test $? = 0; then echo $pid exit 0 diff --git a/stap-gen-server-cert b/stap-gen-server-cert index f6445d8d..9b4a776b 100755 --- a/stap-gen-server-cert +++ b/stap-gen-server-cert @@ -43,7 +43,7 @@ rm -fr $1 # Create the server's certificate database directory. serverdb=$1/server -if ! mkdir -p $serverdb; then +if ! mkdir -p -m 755 $serverdb; then echo "Unable to create the server certificate database directory: $serverdb" >&2 exit 1 fi @@ -73,6 +73,12 @@ dd bs=123 count=1 < /dev/urandom > $1/noise 2> /dev/null certutil -R -d $serverdb -f $serverdb/pw -s "CN=Systemtap Compile Server, OU=Systemtap, O=Red Hat, C=US" -o $1/stap-server.req -z $1/noise 2> /dev/null rm -fr $1/noise +# Create the certificate file first so that it always has the proper access permissions. +if ! (touch $serverdb/stap-server.cert && chmod 644 $serverdb/stap-server.cert); then + echo "Unable to create the server certificate file: $serverdb/stap-server.cert" >&2 + exit 1 +fi + # Now generate the actual certificate. certutil -C -i $1/stap-server.req -o $serverdb/stap-server.cert -x -d $serverdb -f $serverdb/pw -5 -8 "$HOSTNAME,localhost" >/dev/null <<-EOF 1 @@ -83,10 +89,5 @@ y EOF rm -fr $1/stap-server.req -# Ensure that the certificate is readable by others. -if ! chmod +r $serverdb/stap-server.cert; then - echo "Warning: unable to make the server's certificate $serverdb/stap-server.cert readable by others" >&2 -fi - # Add the certificate to the server's certificate/key database as a trusted peer, ssl server and object signer certutil -A -n stap-server -t "PCu,,PCu" -i $serverdb/stap-server.cert -d $serverdb -f $serverdb/pw diff --git a/stap-server b/stap-server index 4f1ccf9b..ec827a09 100755 --- a/stap-server +++ b/stap-server @@ -21,6 +21,12 @@ trap 'terminate' SIGTERM SIGINT #----------------------------------------------------------------------------- # function: configuration function configuration { + # INSTALL-HOOK These settings work for running the client from the source tree + # INSTALL-HOOK using the dejagnu test harness and will be overridden at install + # INSTALL-HOOK time. + exec_prefix= + sysconfdir=`pwd`/net + # Configuration tmpdir_prefix_client=stap.client tmpdir_prefix_server=stap.server @@ -36,29 +42,42 @@ function initialization { p_phase=5 keep_temps=0 - # Where are we installed? - exec_prefix=`dirname $0` - exec_prefix=`cd $exec_prefix && pwd` - # Request file name. zip_client=$1 + test "X$zip_client" != "X" || \ + fatal "Client request file not specified" test -f $zip_client || \ - fatal "ERROR: Unable to find request file $zip_client" + fatal "Unable to find request file $zip_client" # Temp directory we will be working in tmpdir_server=$2 + test "X$tmpdir_server" != "X" || \ + fatal "Server temporary directory not specified" test -d $tmpdir_server || \ - fatal "ERROR: Cannot find temporary directory $tmpdir_server" + fatal "Unable to find temporary directory $tmpdir_server" tmpdir_env=`dirname $tmpdir_server` # Signed reponse file name. - jar_server=$3 + zip_server=$3 + test "X$zip_server" != "X" || \ + fatal ".zip archive file not specified" + # Make sure the specified .zip file exists. + test -f $zip_server || \ + fatal "Unable to find .zip archive file $zip_server" # Where is the ssl certificate/key database? ssl_db=$4 - test "X$ssl_db" = "X" && ssl_db=/etc/systemtap/ssl/server + test "X$ssl_db" != "X" || \ + fatal "SSL certificate database not specified" + test -d $ssl_db || \ + fatal "Unable to find SSL certificate database $ssl_db" nss_pw=$ssl_db/pw + test -f $nss_pw || \ + fatal "Unable to find SSL certificate database password file $nss_pw" nss_cert=stap-server + + touch $tmpdir_server/stdout + touch $tmpdir_server/stderr } # function: unpack_request @@ -70,23 +89,22 @@ function unpack_request { # Unpack the zip file. unzip $zip_client > /dev/null || \ - fatal "ERROR: cannot unpack zip archive $zip_client" + fatal "Cannot unpack zip archive $zip_client" # Identify the client's request tree. The zip file should have expanded # into a single directory named to match $tmpdir_prefix_client.?????? # which should now be the only item in the current directory. - test "`ls | wc -l`" = 1 || \ - fatal "ERROR: Wrong number of files after expansion of client's zip file" + test "`ls | wc -l`" = 3 || \ + fatal "Wrong number of files after expansion of client's zip file" - tmpdir_client=`ls` - tmpdir_client=`expr "$tmpdir_client" : "\\\($tmpdir_prefix_client\\\\.......\\\)"` + tmpdir_client=`ls | grep $tmpdir_prefix_client.......\$` test "X$tmpdir_client" != "X" || \ - fatal "ERROR: client zip file did not expand as expected" + fatal "Client zip file did not expand as expected" # Move the client's temp directory to a local temp location local local_tmpdir_client=`mktemp -dt $tmpdir_prefix_server.client.XXXXXX` || \ - fatal "ERROR: cannot create temporary zip file " $local_tmpdir_client + fatal "Cannot create temporary client request directory " $local_tmpdir_client mv $tmpdir_client/* $local_tmpdir_client rm -fr $tmpdir_client tmpdir_client=$local_tmpdir_client @@ -102,6 +120,9 @@ function check_request { # Add the necessary info from files in our temporary directory. cmdline=`read_data_file cmdline` test "X$cmdline" != "X" || exit 1 + + eval parse_options "$cmdline" + client_sysinfo=`read_data_file sysinfo` test "X$client_sysinfo" != "X" || exit 1 @@ -123,13 +144,16 @@ function server_sysinfo { # # Make sure that systemtap as described by SYSINFO1 and SYSINFO2 are compaible function check_compatibility { + # Compatibility is irrelevant if the request is not for phase 5 activity. + test $p_phase -lt 5 && return + # TODO: This needs work # - Make sure the linux kernel matches exactly local sysinfo1=$1 local sysinfo2=$2 if test "$sysinfo1" != "$sysinfo2"; then - error "ERROR: system configuration mismatch" + error "System configuration mismatch" error " client: $sysinfo1" fatal " server: $sysinfo2" fi @@ -141,7 +165,7 @@ function check_compatibility { # contents are '$1: .*'. Read and echo the data. function read_data_file { test -f $1 || \ - fatal "ERROR: Data file $1 not found" + fatal "Data file $1 not found" # Open the file exec 3< $1 @@ -151,7 +175,7 @@ function read_data_file { line="$REPLY" data=`expr "$line" : "$1: \\\(.*\\\)"` if test "X$data" = "X"; then - fatal "ERROR: Data in file $1 is incorrect" + fatal "Data in file $1 is incorrect" return fi @@ -316,7 +340,7 @@ function call_stap { server_p_phase=$p_phase fi - eval $exec_prefix/stap "$cmdline" -k -p $server_p_phase \ + eval ${exec_prefix}stap "$cmdline" -k -p $server_p_phase \ >> $tmpdir_server/stdout \ 2>> $tmpdir_server/stderr @@ -361,17 +385,9 @@ function create_response { function package_response { cd $tmpdir_env - # We will be digitally signing the server's temporary directory. This - # will sign the entire directory and compress it into a .jar - # archive. - # - # Make sure the specified .jar file exists. - test -f $jar_server || \ - fatal "ERROR: Could not find .jar archive file $jar_server" - #chmod +r $jar_server - - # Generate the jar file - signtool -d $ssl_db -k $nss_cert -p `cat $nss_pw` -Z $jar_server $tmpdir_server >/dev/null + # Compress the server's temporary directory into a .zip archive. + (rm $zip_server && zip -r $zip_server `basename $tmpdir_server` > /dev/null) || \ + fatal "zip of request tree, $tmpdir_server, failed" } # function: fatal [ MESSAGE ] @@ -379,7 +395,9 @@ function package_response { # Fatal error # Prints its arguments to stderr and exits function fatal { - echo "`basename $0`:" "$@" >> $tmpdir_server/stderr + echo "$0: ERROR:" "$@" >> $tmpdir_server/stderr + echo -n 1 > $tmpdir_server/rc + package_response cleanup exit 1 } @@ -387,7 +405,7 @@ function fatal { # Non fatal error # Prints its arguments to stderr but does not exit function error { - echo "`basename $0`:" "$@" >> $tmpdir_server/stderr + echo "$0: ERROR:" "$@" >> $tmpdir_server/stderr } # function cleanup @@ -419,7 +437,6 @@ configuration initialization "$@" unpack_request check_request -eval parse_options "$cmdline" call_stap create_response package_response diff --git a/stap-server-connect.c b/stap-server-connect.c index 37b44a9b..8263a3d5 100644 --- a/stap-server-connect.c +++ b/stap-server-connect.c @@ -40,7 +40,7 @@ static SECKEYPrivateKey *privKey = NULL; static char *dbdir = NULL; static char requestFileName[] = "/tmp/stap.server.client.zip.XXXXXX"; static char responseDirName[] = "/tmp/stap.server.XXXXXX"; -static char responseJarName[] = "/tmp/stap.server.XXXXXX.jar.XXXXXX"; +static char responseZipName[] = "/tmp/stap.server.XXXXXX.zip.XXXXXX"; static void Usage(const char *progName) @@ -325,17 +325,17 @@ writeDataToSocket(PRFileDesc *sslSocket) /* Try to open the local file named. * If successful, then write it to the client. */ - prStatus = PR_GetFileInfo(responseJarName, &info); + prStatus = PR_GetFileInfo(responseZipName, &info); if (prStatus != PR_SUCCESS || info.type != PR_FILE_FILE || info.size < 0) { - fprintf (stderr, "Input file %s not found\n", responseJarName); + fprintf (stderr, "Input file %s not found\n", responseZipName); return SECFailure; } - local_file_fd = PR_Open(responseJarName, PR_RDONLY, 0); + local_file_fd = PR_Open(responseZipName, PR_RDONLY, 0); if (local_file_fd == NULL) { - fprintf (stderr, "Could not open input file %s\n", responseJarName); + fprintf (stderr, "Could not open input file %s\n", responseZipName); return SECFailure; } @@ -355,7 +355,7 @@ writeDataToSocket(PRFileDesc *sslSocket) #if DEBUG /* Transmitted bytes successfully. */ fprintf(stderr, "PR_TransmitFile wrote %d bytes from %s\n", - numBytes, responseJarName); + numBytes, responseZipName); #endif PR_Close(local_file_fd); @@ -428,12 +428,12 @@ handle_connection(PRFileDesc *tcpSocket) goto cleanup; } - memcpy (responseJarName, responseDirName, sizeof (responseDirName) - 1); - memcpy (responseJarName + sizeof (responseJarName) - 1 - 6, "XXXXXX", 6); - rc = mkstemp(responseJarName); + memcpy (responseZipName, responseDirName, sizeof (responseDirName) - 1); + memcpy (responseZipName + sizeof (responseZipName) - 1 - 6, "XXXXXX", 6); + rc = mkstemp(responseZipName); if (rc == -1) { - fprintf (stderr, "Could not create temporary file %s\n", responseJarName); + fprintf (stderr, "Could not create temporary file %s\n", responseZipName); perror (""); secStatus = SECFailure; @@ -468,7 +468,7 @@ handle_connection(PRFileDesc *tcpSocket) cmdline = PORT_Alloc(sizeof ("stap-server") + sizeof (requestFileName) + sizeof (responseDirName) + - sizeof (responseJarName) + + sizeof (responseZipName) + strlen (dbdir) + 1); if (! cmdline) { errWarn ("PORT_Alloc"); @@ -477,7 +477,7 @@ handle_connection(PRFileDesc *tcpSocket) } sprintf (cmdline, "stap-server %s %s %s %s", - requestFileName, responseDirName, responseJarName, dbdir); + requestFileName, responseDirName, responseZipName, dbdir); rc = system (cmdline); PR_Free (cmdline); @@ -501,7 +501,7 @@ cleanup: prStatus = PR_Delete (requestFileName); if (prStatus != PR_SUCCESS) errWarn ("PR_Delete"); - prStatus = PR_Delete (responseJarName); + prStatus = PR_Delete (responseZipName); if (prStatus != PR_SUCCESS) errWarn ("PR_Delete"); } @@ -769,3 +769,5 @@ main(int argc, char **argv) return 0; } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/stap-server.8.in b/stap-server.8.in index ffee8dfa..1976b6ea 100644 --- a/stap-server.8.in +++ b/stap-server.8.in @@ -18,8 +18,16 @@ stap-server \- systemtap server and related utilities .B stap\-stop\-server .I PID .br +.B stap\-add\-server\-cert \fICERTFILE\fR \fIDIRNAME\fR +.br .B stap\-client [ +.B \-\-server=\fIHOSTNAME\fR|\fIIP_ADDRESS\fR[\fB:\fIPORT\fR] +] +[ +.B \-\-ssl=\fIDIRNAME +] +[ .I ARGUMENTS ] @@ -27,7 +35,7 @@ stap-server \- systemtap server and related utilities The systemtap server listens for connections from .I stap\-client -on the local network and accepts requests to run the +on a secure SLL network port and accepts requests to run the .I stap front end. @@ -40,7 +48,8 @@ successful startup, the server listens for connections on a random port and advertises its presence on the local network using the .I avahi daemon. If the server is successfully started, its process id is -echoed to stdout and the exit code is 0. Otherwise, nothing is echoed and the exit code is 1. +echoed to stdout and the exit code is 0. Otherwise, nothing is echoed and the +exit code is 1. .PP The @@ -57,12 +66,12 @@ using .IR stap\-find\-servers . If a compatible server is found, .I stap\-find\-or\-start\-server -echos '0' to stdout and the exit code is 0. Otherwise +echoes \[aq]0\[aq] to stdout and the exit code is 0. Otherwise .I stap\-find\-or\-start\-server attempts to start a server on the local network using .IR stap\-start\-server . If successful, the process id of the new server is echoed to stdout and the -exit code is 0. If no server can be found or started, nothing is echoed +exit code is 0. If no server can be found or started, \[aq]-1\[aq] is echoed to stdout and the exit code is 1. .PP @@ -77,13 +86,19 @@ does not verify that the server actually shuts down. .PP The +.I stap\-add\-server\-cert +program adds the given server certificate to the given client\-side +certificate database, making that server a trusted server for clients using that database. + +.PP +The .I stap\-client program is analagous to the .I stap front end except that it attempts to find a compatible systemtap server on the local network and then attempts to use that server for actions related to -passes 1 through 4. Pass 5 actions, if requested, are performed on the localhost -using +passes 1 through 4. Pass 5 actions, if requested, are performed on the local +host using .IR staprun . Upon successful completion, the exit code is 0. Otherwise the exit code is 1. @@ -101,6 +116,51 @@ to report all systemtap servers on the local network regardless of compatibility The default behavior is to report only servers which are compatible with systemtap on the local host. +.PP +In addition to the options accepted by the +.I stap +front end, +.I stap\-client +accepts the following: + +.TP +.B \-\-server=\fIHOSTNAME\fR|\fIIP_ADDRESS\fR[\fB:\fIPORT\fR] +This option intructs +.I stap\-client +to use the named server instead of looking for one automatically. The server may +be specified using a valid host name or ip address. If no port is specified, then +.I stap\-client +searches for the server among the servers advertizing their presence on the +local network and uses the port which is being advertized. This is useful for +connecting to a specific server on the local network. If a port is specified, +then +.I stap\-client +will attempt to connect to the named host on the specified port. This is useful +for connecting to non\-local servers. If +.B \-\-server +is specified, +.I stap\-client +will make no attempt to contact other servers. If more than one +.B \-\-server +option is specified, +.I stap\-client +will attempt to use the servers in the order specified. + +.TP +.B \-\-ssl=\fIDIRNAME +.I stap\-client +uses certificate databases in default locations (see +.I SERVER MANAGEMENT +below) in order to authenticate each server which is contacted. The +.B \-\-ssl +option is used to specify additional databases to search. Databases specified +using +.B \-\-ssl +are searched before the default databases. If more than one +.B \-\-ssl +option is specified, then the databases are searched in the order specified on +the command line followed by the default locations. + .SH ARGUMENTS The .I stap\-stop\-server @@ -108,10 +168,100 @@ program requires a process id argument which identifies the server to be stopped .PP The +.I stap\-add\-server\-cert +program accepts two arguments: + +.TP +.B CERTFILE +This is the name of the file containing the certificate of the new trusted +server. This is the file named \fIstap-server.cert\fR which can be found in the +server\[aq]s certificate database. + +.TP +.B DIRNAME +This is the name of the directory containing the client\-side certificate database to which +the certificate is to be added. + +.PP +The .I stap\-client -program accepts the same arguments and options as the -.I stap -front end. +program accepts the same arguments as +.I stap\fP. +See \fIstap\fP(1) for details. + +.SH SERVER MANAGEMENT +The security of the SSL network connection between the client and server and +of the signing and verification of the server\[aq]s response depend on the proper +management of server certificates and the public and private key pairs with which +they are signed and verified. + +.PP +The trustworthiness of a given systemtap server can not be determined +automatically without a trusted certificate authority issuing systemtap server +certificates. This is +not practical in everyday use and so, clients must authenticate servers +against their own databases of trusted server certificates. In this context, +establishing a given server as trusted by a given client means adding +that server\[aq]s certificate to the +client\[aq]s database of trusted servers. + +.PP +The implementation of the client and server have automated many of the tasks +required. In particular: + +.IP \(bu 4 +When a user starts a server for the first time, the server will generate its +own certificate and add it to a database local to that user. For non\-root users, +this database will be created in +.I $HOME/.systemtap/ssl/server\fP. +For root users (EUID=0), it will be created in +.I $sysconfdir/systemtap/ssl/server\fP. + +.IP \(bu 4 +At this time the +server will also create a local client\-side certificate database and add the +server\[aq]s certificate to it. For non\-root users, +this database will be created in +.I $HOME/.systemtap/ssl/client\fP. +For root users (EUID=0), it will be created in +.I $sysconfdir/systemtap/ssl/client\fP. + +In this way, a server started by a given user is automatically trusted by +clients run by that user. + +.IP \(bu 4 +The client\-side certificate database created for root users is also +the global client\-side database for all clients on the host. In this way, +a server started by root is automatically trusted by clients run by any +user on that host. + +.PP +The trustworthiness of other servers may be asserted in one of two ways: + +.IP \(bu 4 +Other existing client\-side certificate databases may be searched by using the +.B \-\-ssl +option one or more times when running the client (see +.I OPTIONS +above). Servers whose certificates are contained in the additional databases +will be considered to be trusted for that invocation of the client. + +.IP \(bu 4 +A user may add the certificate of a new trusted server to his own local +client\-side certificate database using +\[aq]\fBstap-add-server-cert \fICERTFILE\fR \fIDIRNAME\fR\[aq] +(see above), where \fICERTFILE\fP is the server\[aq]s certificate file +(\fIstap\-server.cert\fP) from the servers certificate database directory and +\fIDIRNAME\fP is the +directory containing the user\[aq]s client\-side certificate database. + +The server will trusted by clients run by that user from then on. + +.PP +When a root (EUID=0) user adds a server\[aq]s certificate to their client\-side +certificate database, which is also the global database for all users on that +host, they assert the trustworthiness of that server for all users on that +host. .SH EXAMPLES See the @@ -123,32 +273,60 @@ Here is a very basic example of how to use .PP To find out if a compatible systemtap server is running on your local network .PP -\& $ stap\-find\-servers +.B \& $ stap\-find\-servers .PP If no servers are reported, you can start one using .PP -\& $ stap\-start\-server +.B \& $ stap\-start\-server .PP You could also have accomplished both of the previous two steps using .PP -\& $ stap\-find\-or\-start\-server +.B \& $ stap\-find\-or\-start\-server .PP -To compile and execute a simple example using the server +To compile and execute a simple example using an automatically discovered +server on the local network .PP -\& $ stap\-client \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] +.B \& $ stap\-client \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] .br \& Hello World! .PP +To compile and execute a simple example using a server on a specific host +on the local network +.PP +.B \& $ stap\-client \-\-server=\fIHOSTNAME\fP \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] +.br +\& Hello World! +.PP +To compile and execute a simple example using a specific server +.PP +.B \& $ stap\-client \-\-server=\fIHOSTNAME\fP:\fIPORT\fP \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] +.br +\& Hello World! +.PP +To search additional certificate databases in order to compile and execute a +simple example +.PP +.B \& $ stap\-client \-\-ssl=\fIDIRNAME\fP \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq] +.br +\& Hello World! +.PP +To permanently trust a given server for your own use +.PP +.B \& $ stap\-add\-server\-cert \fICERTFILE\fP $HOME/.systemtap/ssl/client +.PP +As root, to permanently trust a given server for all users on your host +.PP +.B \& $ stap\-add\-server\-cert \fICERTFILE\fP $sysconfdir/systemtap/ssl/client +.PP If a process id was echoed by .I stap\-start\-server or .I stap\-find\-or\-start\-server then you can stop the server using .PP -\& $ stap\-stop\-server PID +.B \& $ stap\-stop\-server \fIPID\fP .PP -where PID is the process id that was echoed. - +where \fIPID\fR is the process id that was echoed. .SH SAFETY AND SECURITY Systemtap is an administrative tool. It exposes kernel internal data @@ -157,9 +335,18 @@ structures and potentially private user information. See the manual page for additional information on safety and security. .PP -The systemtap server and its related utilities are prototypes only. NO NETWORK -SECURITY OF ANY KIND IS CURRENTLY PROVIDED. These programs should only be used -among trusted hosts on a trusted network. +The systemtap server and its related utilities use the Secure Socket Layer +(SSL) as implemented by Network Security Services (NSS) +for network security and the NSS tools +.I certutil +and +.I signtool +for the generation of certificates and for signing respectively. The related +certificate databases must be protected in order to maintain the security of +the system. +Use of the utilities provided will help to ensure that the proper protection +is maintained. The systemtap client and server will both check for proper +access permissions before making use of any certificate database. .SH SEE ALSO .IR stap (1), @@ -167,6 +354,9 @@ among trusted hosts on a trusted network. .IR stapprobes (5), .IR stapfuncs (5), .IR stapex (5), +.IR NSS , +.IR certutil , +.IR signtool .SH BUGS Use the Bugzilla link off of the project web page or our mailing list. diff --git a/stap-serverd b/stap-serverd index 1c227e6c..6467ec55 100755 --- a/stap-serverd +++ b/stap-serverd @@ -21,14 +21,15 @@ trap 'terminate' SIGTERM SIGINT #----------------------------------------------------------------------------- # function: initialization PORT function initialization { + # INSTALL-HOOK These settings work for running the server from the source tree + # INSTALL-HOOK using the dejagnu test harness and will be overridden at install + # INSTALL-HOOK time. + exec_prefix= + sysconfdir=`pwd`/net + # Default settings. avahi_type=_stap._tcp - # Where are we installed? - exec_prefix=`dirname $0` - exec_prefix=`cd $exec_prefix && pwd` - prefix=`dirname $exec_prefix` - # What port will we listen on? port=$1 test "X$port" = "X" && port=65000 @@ -45,19 +46,23 @@ function initialization { # If no certificate/key database has been specified, then find/create # a local one. if test $EUID = 0; then - ssl_db=$prefix/etc/systemtap/ssl/server + ssl_db=$sysconfdir/systemtap/ssl/server else ssl_db=$HOME/.systemtap/ssl/server fi if ! test -f $ssl_db/stap-server.cert; then - $exec_prefix/stap-gen-server-cert `dirname $ssl_db` || exit 1 + ${exec_prefix}stap-gen-server-cert `dirname $ssl_db` || exit 1 # Now add the server's certificate to the client's database, # making it a trusted peer. Do this only if the client has been installed. - if test -f $exec_prefix/stap-add-server-cert -a -f $exec_prefix/stap-add-server-cert; then - $exec_prefix/stap-add-server-cert $ssl_db/stap-server.cert `dirname $ssl_db` + if test -f `which ${exec_prefix}stap-add-server-cert` -a -x `which ${exec_prefix}stap-add-server-cert`; then + ${exec_prefix}stap-add-server-cert $ssl_db/stap-server.cert `dirname $ssl_db`/client fi fi fi + + # Check the security of the database. + check_db $ssl_db + nss_pw=$ssl_db/pw nss_cert=stap-server } @@ -84,8 +89,222 @@ function advertise_presence { function listen { # The stap-server-connect program will listen forever # accepting requests. - $exec_prefix/stap-server-connect -p $port -n $nss_cert -d $ssl_db -w $nss_pw 2>&1 & - wait '%$exec_prefix/stap-server-connect' >/dev/null 2>&1 + ${exec_prefix}stap-server-connect -p $port -n $nss_cert -d $ssl_db -w $nss_pw 2>&1 & + wait '%${exec_prefix}stap-server-connect' >/dev/null 2>&1 +} + +# function: check_db DBNAME +# +# Check the security of the given database directory. +function check_db { + local dir=$1 + local rc=0 + + # Check that we have been given a directory + if ! test -e $dir; then + warning "Certificate database '$dir' does not exist" + return 1 + fi + if ! test -d $dir; then + warning "Certificate database '$dir' is not a directory" + return 1 + fi + + # Check that we can read the directory + if ! test -r $dir; then + warning "Certificate database '$dir' is not readble" + rc=1 + fi + + # We must be the owner of the database. + local ownerid=`stat -c "%u" $dir` + if test "X$ownerid" != "X$EUID"; then + warning "Certificate database '$dir' must be owned by $USER" + rc=1 + fi + + # Check the access permissions of the directory + local perm=0`stat -c "%a" $dir` + if test $((($perm & 0400) == 0400)) = 0; then + warning "Certificate database '$dir' should be readable by the owner" + fi + if test $((($perm & 0200) == 0200)) = 0; then + warning "Certificate database '$dir' should be writeable by the owner" + fi + if test $((($perm & 0100) == 0100)) = 0; then + warning "Certificate database '$dir' should be searchable by the owner" + fi + if test $((($perm & 0040) == 0040)) = 0; then + warning "Certificate database '$dir' should be readable by the group" + fi + if test $((($perm & 0020) == 0020)) = 1; then + warning "Certificate database '$dir' must not be writable by the group" + rc=1 + fi + if test $((($perm & 0010) == 0010)) = 0; then + warning "Certificate database '$dir' should be searchable by the group" + fi + if test $((($perm & 0004) == 0004)) = 0; then + warning "Certificate database '$dir' should be readable by others" + fi + if test $((($perm & 0002) == 0002)) = 1; then + warning "Certificate database '$dir' must not be writable by others" + rc=1 + fi + if test $((($perm & 0001) == 0001)) = 0; then + warning "Certificate database '$dir' should be searchable by others" + fi + + # Now check the permissions of the critical files. + check_db_file $dir/cert8.db || rc=1 + check_db_file $dir/key3.db || rc=1 + check_db_file $dir/secmod.db || rc=1 + check_db_file $dir/pw || rc=1 + check_cert_file $dir/stap-server.cert || rc=1 + + test $rc = 1 && fatal "Unable to use certificate database '$dir' due to errors" + + return $rc +} + +# function: check_db_file FILENAME +# +# Check the security of the given database file. +function check_db_file { + local file=$1 + local rc=0 + + # Check that we have been given a file + if ! test -e $file; then + warning "Certificate database file '$file' does not exist" + return 1 + fi + if ! test -f $file; then + warning "Certificate database file '$file' is not a regular file" + return 1 + fi + + # We must be the owner of the file. + local ownerid=`stat -c "%u" $file` + if test "X$ownerid" != "X$EUID"; then + warning "Certificate database file '$file' must be owned by $USER" + rc=1 + fi + + # Check that we can read the file + if ! test -r $file; then + warning "Certificate database file '$file' is not readble" + rc=1 + fi + + # Check the access permissions of the file + local perm=0`stat -c "%a" $file` + if test $((($perm & 0400) == 0400)) = 0; then + warning "Certificate database file '$file' should be readable by the owner" + fi + if test $((($perm & 0200) == 0200)) = 0; then + warning "Certificate database file '$file' should be writeable by the owner" + fi + if test $((($perm & 0100) == 0100)) = 1; then + warning "Certificate database file '$file' must not be executable by the owner" + rc=1 + fi + if test $((($perm & 0040) == 0040)) = 1; then + warning "Certificate database file '$file' must not be readable by the group" + rc=1 + fi + if test $((($perm & 0020) == 0020)) = 1; then + warning "Certificate database file '$file' must not be writable by the group" + rc=1 + fi + if test $((($perm & 0010) == 0010)) = 1; then + warning "Certificate database file '$file' must not be executable by the group" + rc=1 + fi + if test $((($perm & 0004) == 0004)) = 1; then + warning "Certificate database file '$file' must not be readable by others" + rc=1 + fi + if test $((($perm & 0002) == 0002)) = 1; then + warning "Certificate database file '$file' must not be writable by others" + rc=1 + fi + if test $((($perm & 0001) == 0001)) = 1; then + warning "Certificate database file '$file' must not be executable by others" + rc=1 + fi + + return $rc +} + +# function: check_db_file FILENAME +# +# Check the security of the given database file. +function check_cert_file { + local file=$1 + local rc=0 + + # Check that we have been given a file + if ! test -e $file; then + warning "Certificate database file '$file' does not exist" + return 1 + fi + if ! test -f $file; then + warning "Certificate database file '$file' is not a regular file" + return 1 + fi + + # We must be the owner of the file. + local ownerid=`stat -c "%u" $file` + if test "X$ownerid" != "X$EUID"; then + warning "Certificate file '$file' must be owned by $USER" + rc=1 + fi + + # Check the access permissions of the file + local perm=0`stat -c "%a" $file` + if test $((($perm & 0400) == 0400)) = 0; then + warning "Certificate file '$file' should be readable by the owner" + fi + if test $((($perm & 0200) == 0200)) = 0; then + warning "Certificate file '$file' should be writeable by the owner" + fi + if test $((($perm & 0100) == 0100)) = 1; then + warning "Certificate file '$file' must not be executable by the owner" + rc=1 + fi + if test $((($perm & 0040) == 0040)) = 0; then + warning "Certificate file '$file' should be readable by the group" + fi + if test $((($perm & 0020) == 0020)) = 1; then + warning "Certificate file '$file' must not be writable by the group" + rc=1 + fi + if test $((($perm & 0010) == 0010)) = 1; then + warning "Certificate file '$file' must not be executable by the group" + rc=1 + fi + if test $((($perm & 0004) == 0004)) = 0; then + warning "Certificate file '$file' should be readable by others" + fi + if test $((($perm & 0002) == 0002)) = 1; then + warning "Certificate file '$file' must not be writable by others" + rc=1 + fi + if test $((($perm & 0001) == 0001)) = 1; then + warning "Certificate file '$file' must not be executable by others" + rc=1 + fi + + return $rc +} + +# function: warning [ MESSAGE ] +# +# Warning error +# Prints its arguments to stderr +function warning { + echo "$0: WARNING:" "$@" >&2 } # function: fatal [ MESSAGE ] @@ -93,7 +312,7 @@ function listen { # Fatal error # Prints its arguments to stderr and exits function fatal { - echo "$@" >&2 + echo "$0: ERROR:" "$@" >&2 terminate exit 1 } @@ -109,8 +328,8 @@ function terminate { wait '%avahi-publish-service' >/dev/null 2>&1 # Kill any running 'stap-server-connect' job. - kill -s SIGTERM '%$exec_prefix/stap-server-connect' 2> /dev/null - wait '%$exec_prefix/stap-server-connect' >/dev/null 2>&1 + kill -s SIGTERM '%${exec_prefix}stap-server-connect' 2> /dev/null + wait '%${exec_prefix}stap-server-connect' >/dev/null 2>&1 exit } diff --git a/stap-start-server b/stap-start-server index c8ea8178..f1f02d2f 100755 --- a/stap-start-server +++ b/stap-start-server @@ -12,20 +12,21 @@ # This script attempts to start a systemtap server and echoes the # process id, if successful. -# Where are we installed? -exec_prefix=`dirname $0` -exec_prefix=`cd $exec_prefix && pwd` -prefix=`dirname $exec_prefix` +# INSTALL-HOOK These settings work for running the client from the source tree +# INSTALL-HOOK using the dejagnu test harness and will be overridden at install +# INSTALL-HOOK time. +exec_prefix= +sysconfdir=`pwd`/net # start the server -$exec_prefix/stap-serverd "$@" </dev/null >/dev/null 2>&1 & +${exec_prefix}stap-serverd "$@" </dev/null >/dev/null 2>&1 & server_pid=$! # Make sure the server is started -for ((attempt=0; $attempt < 5; ++attempt)) +for ((attempt=0; $attempt < 10; ++attempt)) do if test $EUID = 0; then - if ! test -f $prefix/etc/systemtap/ssl/server/stap-server.cert; then + if ! test -f $sysconfdir/systemtap/ssl/server/stap-server.cert; then sleep 1 continue; fi diff --git a/stap-stop-server b/stap-stop-server index 5afcf705..48c8a450 100755 --- a/stap-stop-server +++ b/stap-stop-server @@ -20,7 +20,7 @@ if test "X$pid" = "X"; then fi # Verify that it is a systemtap server -(ps -a | grep stap-serverd | grep -q $pid) +(ps -e | grep stap-serverd | grep -q $pid) if test $? != 0; then echo "$pid is not a systemtap server" exit 1 @@ -755,6 +755,46 @@ probe end { } .ESAMPLE +.SS TYPECASTING +Once a pointer has been saved into a script integer variable, the +translator loses the type information necessary to access members from +that pointer. Using the +.I @cast() +operator tells the translator how to read a pointer. +.SAMPLE +@cast(p, "type_name"[, "module"])->member +.ESAMPLE +.PP +This will interpret +.I p +as a pointer to a struct/union named +.I type_name +and dereference the +.I member +value. The optional +.I module +tells the translator where to look for information about that type. If +the module is not specified, it will default either to the probe module +for dwarf probes, or to "kernel" for functions and all other probes +types. +.PP +When in guru mode, the translator will also allow scripts to assign new +values to members of typecasted pointers. +.PP +Typecasting is also useful in the case of +.I void* +members whose type may be determinable at runtime. +.SAMPLE +probe foo { + if ($var->type == 1) { + value = @cast($var->data, "type1")->bar + } else { + value = @cast($var->data, "type2")->baz + } + print(value) +} +.ESAMPLE + .SS EMBEDDED C When in guru mode, the translator accepts embedded code in the script. Such code is enclosed between @@ -1076,6 +1116,8 @@ probe specifications that refer to inline functions .IP \(bu 4 statements that refer to $target variables .IP \(bu 4 +statements that refer to @cast() variables +.IP \(bu 4 tapset-defined variables defined using any of the above constructs. In particular, at this writing, the prologue blocks for certain aliases in the syscall tapset diff --git a/stapprobes.5.in b/stapprobes.5.in index b50adc9d..0854be53 100644 --- a/stapprobes.5.in +++ b/stapprobes.5.in @@ -263,6 +263,8 @@ kernel.function(PATTERN).return .br kernel.function(PATTERN).inline .br +kernel.function(PATTERN).label(LPATTERN) +.br module(MPATTERN).function(PATTERN) .br module(MPATTERN).function(PATTERN).call @@ -280,8 +282,10 @@ module(MPATTERN).statement(PATTERN) .ESAMPLE In the above list, MPATTERN stands for a string literal that aims to -identify the loaded kernel module of interest. It may include "*", "[]", -and "?" wildcards. PATTERN stands for a string literal that +identify the loaded kernel module of interest and LPATTERN stands for +a source program label. Both MPATTERN and LPATTERN may include the "*" +"[]", and "?" wildcards. +PATTERN stands for a string literal that aims to identify a point in the program. It is made up of three parts: .IP \(bu 4 @@ -445,14 +449,13 @@ A .B .mark probe gets called via a static probe which is defined in the application by -STAP_PROBE1(handle,LABEL,arg1). The handle is an application handle, +STAP_PROBE1(handle,LABEL,arg1), which is defined in sdt.h. The handle is an application handle, LABEL corresponds to the .mark argument, and arg1 is the argument. STAP_PROBE1 is used for probes with 1 argument, STAP_PROBE2 is used for probes with 2 arguments, and so on. The arguments of the probe are available in the context variables -$arg1, $arg2, ... -The application should be compiled with ../share/systemtap/runtime/sduprobes.h -and should be linked with libsduprobes.a. +$arg1, $arg2, ... An alternative to using the STAP_PROBE macros is to +use the dtrace script to create custom macros. .PP Note that .I PATH diff --git a/staptree.cxx b/staptree.cxx index fafefc4e..8d251731 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -1,5 +1,5 @@ // parse tree functions -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-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 @@ -277,6 +277,28 @@ void target_symbol::print (std::ostream& o) const } +void cast_op::print (std::ostream& o) const +{ + o << base_name << '(' << *operand; + o << ", " << lex_cast_qstring (type); + if (module.length() > 0) + o << ", " << lex_cast_qstring (module); + o << ')'; + for (unsigned i = 0; i < components.size(); ++i) + { + switch (components[i].first) + { + case comp_literal_array_index: + o << '[' << components[i].second << ']'; + break; + case comp_struct_member: + o << "->" << components[i].second; + break; + } + } +} + + void vardecl::print (ostream& o) const { o << name; @@ -1220,6 +1242,12 @@ target_symbol::visit (visitor* u) } void +cast_op::visit (visitor* u) +{ + u->visit_cast_op(this); +} + +void arrayindex::visit (visitor* u) { u->visit_arrayindex (this); @@ -1586,6 +1614,12 @@ traversing_visitor::visit_target_symbol (target_symbol*) } void +traversing_visitor::visit_cast_op (cast_op* e) +{ + e->operand->visit (this); +} + +void traversing_visitor::visit_arrayindex (arrayindex* e) { for (unsigned i=0; i<e->indexes.size(); i++) @@ -1680,6 +1714,17 @@ varuse_collecting_visitor::visit_target_symbol (target_symbol *e) } void +varuse_collecting_visitor::visit_cast_op (cast_op *e) +{ + // As with target_symbols, unresolved cast assignments need to preserved + // for later error handling. + if (is_active_lvalue (e)) + embedded_seen = true; + + functioncall_traversing_visitor::visit_cast_op (e); +} + +void varuse_collecting_visitor::visit_print_format (print_format* e) { // NB: Instead of being top-level statements, "print" and "printf" @@ -2064,6 +2109,12 @@ throwing_visitor::visit_target_symbol (target_symbol* e) } void +throwing_visitor::visit_cast_op (cast_op* e) +{ + throwone (e->tok); +} + +void throwing_visitor::visit_arrayindex (arrayindex* e) { throwone (e->tok); @@ -2098,413 +2149,478 @@ throwing_visitor::visit_hist_op (hist_op* e) void -deep_copy_visitor::visit_block (block* s) +update_visitor::visit_block (block* s) { - block* n = new block; - n->tok = s->tok; for (unsigned i = 0; i < s->statements.size(); ++i) + s->statements[i] = require (s->statements[i]); + provide (s); +} + +void +update_visitor::visit_embeddedcode (embeddedcode* s) +{ + provide (s); +} + +void +update_visitor::visit_null_statement (null_statement* s) +{ + provide (s); +} + +void +update_visitor::visit_expr_statement (expr_statement* s) +{ + s->value = require (s->value); + provide (s); +} + +void +update_visitor::visit_if_statement (if_statement* s) +{ + s->condition = require (s->condition); + s->thenblock = require (s->thenblock); + s->elseblock = require (s->elseblock); + provide (s); +} + +void +update_visitor::visit_for_loop (for_loop* s) +{ + s->init = require (s->init); + s->cond = require (s->cond); + s->incr = require (s->incr); + s->block = require (s->block); + provide (s); +} + +void +update_visitor::visit_foreach_loop (foreach_loop* s) +{ + for (unsigned i = 0; i < s->indexes.size(); ++i) + s->indexes[i] = require (s->indexes[i]); + s->base = require (s->base); + s->limit = require (s->limit); + s->block = require (s->block); + provide (s); +} + +void +update_visitor::visit_return_statement (return_statement* s) +{ + s->value = require (s->value); + provide (s); +} + +void +update_visitor::visit_delete_statement (delete_statement* s) +{ + s->value = require (s->value); + provide (s); +} + +void +update_visitor::visit_next_statement (next_statement* s) +{ + provide (s); +} + +void +update_visitor::visit_break_statement (break_statement* s) +{ + provide (s); +} + +void +update_visitor::visit_continue_statement (continue_statement* s) +{ + provide (s); +} + +void +update_visitor::visit_literal_string (literal_string* e) +{ + provide (e); +} + +void +update_visitor::visit_literal_number (literal_number* e) +{ + provide (e); +} + +void +update_visitor::visit_binary_expression (binary_expression* e) +{ + e->left = require (e->left); + e->right = require (e->right); + provide (e); +} + +void +update_visitor::visit_unary_expression (unary_expression* e) +{ + e->operand = require (e->operand); + provide (e); +} + +void +update_visitor::visit_pre_crement (pre_crement* e) +{ + e->operand = require (e->operand); + provide (e); +} + +void +update_visitor::visit_post_crement (post_crement* e) +{ + e->operand = require (e->operand); + provide (e); +} + + +void +update_visitor::visit_logical_or_expr (logical_or_expr* e) +{ + e->left = require (e->left); + e->right = require (e->right); + provide (e); +} + +void +update_visitor::visit_logical_and_expr (logical_and_expr* e) +{ + e->left = require (e->left); + e->right = require (e->right); + provide (e); +} + +void +update_visitor::visit_array_in (array_in* e) +{ + e->operand = require (e->operand); + provide (e); +} + +void +update_visitor::visit_comparison (comparison* e) +{ + e->left = require (e->left); + e->right = require (e->right); + provide (e); +} + +void +update_visitor::visit_concatenation (concatenation* e) +{ + e->left = require (e->left); + e->right = require (e->right); + provide (e); +} + +void +update_visitor::visit_ternary_expression (ternary_expression* e) +{ + e->cond = require (e->cond); + e->truevalue = require (e->truevalue); + e->falsevalue = require (e->falsevalue); + provide (e); +} + +void +update_visitor::visit_assignment (assignment* e) +{ + e->left = require (e->left); + e->right = require (e->right); + provide (e); +} + +void +update_visitor::visit_symbol (symbol* e) +{ + provide (e); +} + +void +update_visitor::visit_target_symbol (target_symbol* e) +{ + provide (e); +} + +void +update_visitor::visit_cast_op (cast_op* e) +{ + e->operand = require (e->operand); + provide (e); +} + +void +update_visitor::visit_arrayindex (arrayindex* e) +{ + e->base = require (e->base); + for (unsigned i = 0; i < e->indexes.size(); ++i) + e->indexes[i] = require (e->indexes[i]); + provide (e); +} + +void +update_visitor::visit_functioncall (functioncall* e) +{ + for (unsigned i = 0; i < e->args.size(); ++i) + e->args[i] = require (e->args[i]); + provide (e); +} + +void +update_visitor::visit_print_format (print_format* e) +{ + for (unsigned i = 0; i < e->args.size(); ++i) + e->args[i] = require (e->args[i]); + e->hist = require (e->hist); + provide (e); +} + +void +update_visitor::visit_stat_op (stat_op* e) +{ + e->stat = require (e->stat); + provide (e); +} + +void +update_visitor::visit_hist_op (hist_op* e) +{ + e->stat = require (e->stat); + provide (e); +} + +template <> indexable* +update_visitor::require <indexable*> (indexable* src, bool clearok) +{ + indexable *dst = NULL; + if (src != NULL) { - statement* ns; - require <statement*> (this, &ns, s->statements[i]); - n->statements.push_back(ns); + symbol *array_src=NULL; + hist_op *hist_src=NULL; + + classify_indexable(src, array_src, hist_src); + + if (array_src) + dst = require (array_src); + else + dst = require (hist_src); + assert(clearok || dst); } - provide <block*> (this, n); + return dst; +} + + +// ------------------------------------------------------------------------ + + +void +deep_copy_visitor::visit_block (block* s) +{ + update_visitor::visit_block(new block(*s)); } void deep_copy_visitor::visit_embeddedcode (embeddedcode* s) { - embeddedcode* n = new embeddedcode; - n->tok = s->tok; - n->code = s->code; - provide <embeddedcode*> (this, n); + update_visitor::visit_embeddedcode(new embeddedcode(*s)); } void deep_copy_visitor::visit_null_statement (null_statement* s) { - null_statement* n = new null_statement; - n->tok = s->tok; - provide <null_statement*> (this, n); + update_visitor::visit_null_statement(new null_statement(*s)); } void deep_copy_visitor::visit_expr_statement (expr_statement* s) { - expr_statement* n = new expr_statement; - n->tok = s->tok; - require <expression*> (this, &(n->value), s->value); - provide <expr_statement*> (this, n); + update_visitor::visit_expr_statement(new expr_statement(*s)); } void deep_copy_visitor::visit_if_statement (if_statement* s) { - if_statement* n = new if_statement; - n->tok = s->tok; - require <expression*> (this, &(n->condition), s->condition); - require <statement*> (this, &(n->thenblock), s->thenblock); - require <statement*> (this, &(n->elseblock), s->elseblock); - provide <if_statement*> (this, n); + update_visitor::visit_if_statement(new if_statement(*s)); } void deep_copy_visitor::visit_for_loop (for_loop* s) { - for_loop* n = new for_loop; - n->tok = s->tok; - require <expr_statement*> (this, &(n->init), s->init); - require <expression*> (this, &(n->cond), s->cond); - require <expr_statement*> (this, &(n->incr), s->incr); - require <statement*> (this, &(n->block), s->block); - provide <for_loop*> (this, n); + update_visitor::visit_for_loop(new for_loop(*s)); } void deep_copy_visitor::visit_foreach_loop (foreach_loop* s) { - foreach_loop* n = new foreach_loop; - n->tok = s->tok; - for (unsigned i = 0; i < s->indexes.size(); ++i) - { - symbol* sym; - require <symbol*> (this, &sym, s->indexes[i]); - n->indexes.push_back(sym); - } - - require <indexable*> (this, &(n->base), s->base); - - n->sort_direction = s->sort_direction; - n->sort_column = s->sort_column; - require <expression*> (this, &(n->limit), s->limit); - - require <statement*> (this, &(n->block), s->block); - provide <foreach_loop*> (this, n); + update_visitor::visit_foreach_loop(new foreach_loop(*s)); } void deep_copy_visitor::visit_return_statement (return_statement* s) { - return_statement* n = new return_statement; - n->tok = s->tok; - require <expression*> (this, &(n->value), s->value); - provide <return_statement*> (this, n); + update_visitor::visit_return_statement(new return_statement(*s)); } void deep_copy_visitor::visit_delete_statement (delete_statement* s) { - delete_statement* n = new delete_statement; - n->tok = s->tok; - require <expression*> (this, &(n->value), s->value); - provide <delete_statement*> (this, n); + update_visitor::visit_delete_statement(new delete_statement(*s)); } void deep_copy_visitor::visit_next_statement (next_statement* s) { - next_statement* n = new next_statement; - n->tok = s->tok; - provide <next_statement*> (this, n); + update_visitor::visit_next_statement(new next_statement(*s)); } void deep_copy_visitor::visit_break_statement (break_statement* s) { - break_statement* n = new break_statement; - n->tok = s->tok; - provide <break_statement*> (this, n); + update_visitor::visit_break_statement(new break_statement(*s)); } void deep_copy_visitor::visit_continue_statement (continue_statement* s) { - continue_statement* n = new continue_statement; - n->tok = s->tok; - provide <continue_statement*> (this, n); + update_visitor::visit_continue_statement(new continue_statement(*s)); } void deep_copy_visitor::visit_literal_string (literal_string* e) { - literal_string* n = new literal_string(e->value); - n->tok = e->tok; - provide <literal_string*> (this, n); + update_visitor::visit_literal_string(new literal_string(*e)); } void deep_copy_visitor::visit_literal_number (literal_number* e) { - literal_number* n = new literal_number(e->value); - n->tok = e->tok; - provide <literal_number*> (this, n); + update_visitor::visit_literal_number(new literal_number(*e)); } void deep_copy_visitor::visit_binary_expression (binary_expression* e) { - binary_expression* n = new binary_expression; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->left), e->left); - require <expression*> (this, &(n->right), e->right); - provide <binary_expression*> (this, n); + update_visitor::visit_binary_expression(new binary_expression(*e)); } void deep_copy_visitor::visit_unary_expression (unary_expression* e) { - unary_expression* n = new unary_expression; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->operand), e->operand); - provide <unary_expression*> (this, n); + update_visitor::visit_unary_expression(new unary_expression(*e)); } void deep_copy_visitor::visit_pre_crement (pre_crement* e) { - pre_crement* n = new pre_crement; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->operand), e->operand); - provide <pre_crement*> (this, n); + update_visitor::visit_pre_crement(new pre_crement(*e)); } void deep_copy_visitor::visit_post_crement (post_crement* e) { - post_crement* n = new post_crement; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->operand), e->operand); - provide <post_crement*> (this, n); + update_visitor::visit_post_crement(new post_crement(*e)); } void deep_copy_visitor::visit_logical_or_expr (logical_or_expr* e) { - logical_or_expr* n = new logical_or_expr; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->left), e->left); - require <expression*> (this, &(n->right), e->right); - provide <logical_or_expr*> (this, n); + update_visitor::visit_logical_or_expr(new logical_or_expr(*e)); } void deep_copy_visitor::visit_logical_and_expr (logical_and_expr* e) { - logical_and_expr* n = new logical_and_expr; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->left), e->left); - require <expression*> (this, &(n->right), e->right); - provide <logical_and_expr*> (this, n); + update_visitor::visit_logical_and_expr(new logical_and_expr(*e)); } void deep_copy_visitor::visit_array_in (array_in* e) { - array_in* n = new array_in; - n->tok = e->tok; - require <arrayindex*> (this, &(n->operand), e->operand); - provide <array_in*> (this, n); + update_visitor::visit_array_in(new array_in(*e)); } void deep_copy_visitor::visit_comparison (comparison* e) { - comparison* n = new comparison; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->left), e->left); - require <expression*> (this, &(n->right), e->right); - provide <comparison*> (this, n); + update_visitor::visit_comparison(new comparison(*e)); } void deep_copy_visitor::visit_concatenation (concatenation* e) { - concatenation* n = new concatenation; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->left), e->left); - require <expression*> (this, &(n->right), e->right); - provide <concatenation*> (this, n); + update_visitor::visit_concatenation(new concatenation(*e)); } void deep_copy_visitor::visit_ternary_expression (ternary_expression* e) { - ternary_expression* n = new ternary_expression; - n->tok = e->tok; - require <expression*> (this, &(n->cond), e->cond); - require <expression*> (this, &(n->truevalue), e->truevalue); - require <expression*> (this, &(n->falsevalue), e->falsevalue); - provide <ternary_expression*> (this, n); + update_visitor::visit_ternary_expression(new ternary_expression(*e)); } void deep_copy_visitor::visit_assignment (assignment* e) { - assignment* n = new assignment; - n->op = e->op; - n->tok = e->tok; - require <expression*> (this, &(n->left), e->left); - require <expression*> (this, &(n->right), e->right); - provide <assignment*> (this, n); + update_visitor::visit_assignment(new assignment(*e)); } void deep_copy_visitor::visit_symbol (symbol* e) { - symbol* n = new symbol; - n->tok = e->tok; - n->name = e->name; - n->referent = NULL; - provide <symbol*> (this, n); + symbol* n = new symbol(*e); + n->referent = NULL; // don't copy! + update_visitor::visit_symbol(n); } void deep_copy_visitor::visit_target_symbol (target_symbol* e) { - target_symbol* n = new target_symbol; - n->tok = e->tok; - n->base_name = e->base_name; - n->components = e->components; - provide <target_symbol*> (this, n); + target_symbol* n = new target_symbol(*e); + n->referent = NULL; // don't copy! + update_visitor::visit_target_symbol(n); } void -deep_copy_visitor::visit_arrayindex (arrayindex* e) +deep_copy_visitor::visit_cast_op (cast_op* e) { - arrayindex* n = new arrayindex; - n->tok = e->tok; - - require <indexable*> (this, &(n->base), e->base); + update_visitor::visit_cast_op(new cast_op(*e)); +} - for (unsigned i = 0; i < e->indexes.size(); ++i) - { - expression* ne; - require <expression*> (this, &ne, e->indexes[i]); - n->indexes.push_back(ne); - } - provide <arrayindex*> (this, n); +void +deep_copy_visitor::visit_arrayindex (arrayindex* e) +{ + update_visitor::visit_arrayindex(new arrayindex(*e)); } void deep_copy_visitor::visit_functioncall (functioncall* e) { - functioncall* n = new functioncall; - n->tok = e->tok; - n->function = e->function; - n->referent = NULL; - for (unsigned i = 0; i < e->args.size(); ++i) - { - expression* na; - require <expression*> (this, &na, e->args[i]); - n->args.push_back(na); - } - provide <functioncall*> (this, n); + functioncall* n = new functioncall(*e); + n->referent = NULL; // don't copy! + update_visitor::visit_functioncall(n); } void deep_copy_visitor::visit_print_format (print_format* e) { - print_format* n = new print_format; - n->tok = e->tok; - n->print_to_stream = e->print_to_stream; - n->print_with_format = e->print_with_format; - n->print_with_delim = e->print_with_delim; - n->print_with_newline = e->print_with_newline; - n->print_char = e->print_char; - n->raw_components = e->raw_components; - n->components = e->components; - n->delimiter = e->delimiter; - for (unsigned i = 0; i < e->args.size(); ++i) - { - expression* na; - require <expression*> (this, &na, e->args[i]); - n->args.push_back(na); - } - if (e->hist) - require <hist_op*> (this, &n->hist, e->hist); - provide <print_format*> (this, n); + update_visitor::visit_print_format(new print_format(*e)); } void deep_copy_visitor::visit_stat_op (stat_op* e) { - stat_op* n = new stat_op; - n->tok = e->tok; - n->ctype = e->ctype; - require <expression*> (this, &(n->stat), e->stat); - provide <stat_op*> (this, n); + update_visitor::visit_stat_op(new stat_op(*e)); } void deep_copy_visitor::visit_hist_op (hist_op* e) { - hist_op* n = new hist_op; - n->tok = e->tok; - n->htype = e->htype; - n->params = e->params; - require <expression*> (this, &(n->stat), e->stat); - provide <hist_op*> (this, n); -} - -block* -deep_copy_visitor::deep_copy (block* b) -{ - block* n; - deep_copy_visitor v; - require <block*> (&v, &n, b); - return n; -} - -statement* -deep_copy_visitor::deep_copy (statement* s) -{ - statement* n; - deep_copy_visitor v; - require <statement*> (&v, &n, s); - return n; -} - -expression* -deep_copy_visitor::deep_copy (expression* s) -{ - expression* n; - deep_copy_visitor v; - require <expression*> (&v, &n, s); - return n; -} - -template <> void -require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src) -{ - if (src != NULL) - { - symbol *array_src=NULL, *array_dst=NULL; - hist_op *hist_src=NULL, *hist_dst=NULL; - - classify_indexable(src, array_src, hist_src); - - *dst = NULL; - - if (array_src) - { - require <symbol*> (v, &array_dst, array_src); - *dst = array_dst; - } - else - { - require <hist_op*> (v, &hist_dst, hist_src); - *dst = hist_dst; - } - assert (*dst); - } + update_visitor::visit_hist_op(new hist_op(*e)); } +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-2009 Red Hat Inc. // Copyright (C) 2006 Intel Corporation. // // This file is part of systemtap, and is free software. You can @@ -238,6 +238,15 @@ struct target_symbol: public symbol }; +struct cast_op: public target_symbol +{ + expression *operand; + std::string type, module; + void print (std::ostream& o) const; + void visit (visitor* u); +}; + + struct arrayindex: public expression { std::vector<expression*> indexes; @@ -680,6 +689,7 @@ struct visitor virtual void visit_print_format (print_format* e) = 0; virtual void visit_stat_op (stat_op* e) = 0; virtual void visit_hist_op (hist_op* e) = 0; + virtual void visit_cast_op (cast_op* e) = 0; }; @@ -720,6 +730,7 @@ struct traversing_visitor: public visitor void visit_print_format (print_format* e); void visit_stat_op (stat_op* e); void visit_hist_op (hist_op* e); + void visit_cast_op (cast_op* e); }; @@ -759,6 +770,7 @@ struct varuse_collecting_visitor: public functioncall_traversing_visitor void visit_pre_crement (pre_crement *e); void visit_post_crement (post_crement *e); void visit_foreach_loop (foreach_loop *s); + void visit_cast_op (cast_op* e); bool side_effect_free (); bool side_effect_free_wrt (const std::set<vardecl*>& vars); @@ -808,21 +820,34 @@ struct throwing_visitor: public visitor void visit_print_format (print_format* e); void visit_stat_op (stat_op* e); void visit_hist_op (hist_op* e); + void visit_cast_op (cast_op* e); }; -// A visitor which performs a deep copy of the root node it's applied -// to. NB: It does not copy any of the variable or function -// declarations; those fields are set to NULL, assuming you want to -// re-infer the declarations in a new context (the one you're copying -// to). +// A visitor similar to a traversing_visitor, but with the ability to rewrite +// parts of the tree through require/provide. -struct deep_copy_visitor: public visitor +struct update_visitor: public visitor { - std::stack<void *> targets; + template <typename T> T require (T src, bool clearok=false) + { + T dst = NULL; + if (src != NULL) + { + src->visit(this); + assert(!targets.empty()); + dst = static_cast<T>(targets.top()); + targets.pop(); + assert(clearok || dst); + } + return dst; + } + + template <typename T> void provide (T src) + { + targets.push(static_cast<void*>(src)); + } - static expression *deep_copy (expression *s); - static statement *deep_copy (statement *s); - static block *deep_copy (block *s); + virtual ~update_visitor() { assert(targets.empty()); } virtual void visit_block (block *s); virtual void visit_embeddedcode (embeddedcode *s); @@ -856,29 +881,64 @@ struct deep_copy_visitor: public visitor virtual void visit_print_format (print_format* e); virtual void visit_stat_op (stat_op* e); virtual void visit_hist_op (hist_op* e); + virtual void visit_cast_op (cast_op* e); + +private: + std::stack<void *> targets; }; -template <typename T> void -require (deep_copy_visitor* v, T* dst, T src) -{ - *dst = NULL; - if (src != NULL) - { - v->targets.push(static_cast<void* >(dst)); - src->visit(v); - v->targets.pop(); - assert(*dst); - } -} +template <> indexable* +update_visitor::require <indexable*> (indexable* src, bool clearok); -template <> void -require <indexable *> (deep_copy_visitor* v, indexable** dst, indexable* src); +// A visitor which performs a deep copy of the root node it's applied +// to. NB: It does not copy any of the variable or function +// declarations; those fields are set to NULL, assuming you want to +// re-infer the declarations in a new context (the one you're copying +// to). -template <typename T> void -provide (deep_copy_visitor* v, T src) +struct deep_copy_visitor: public update_visitor { - assert(!v->targets.empty()); - *(static_cast<T*>(v->targets.top())) = src; -} + template <typename T> static T deep_copy (T e) + { + deep_copy_visitor v; + return v.require (e); + } + + virtual void visit_block (block *s); + virtual void visit_embeddedcode (embeddedcode *s); + virtual void visit_null_statement (null_statement *s); + virtual void visit_expr_statement (expr_statement *s); + virtual void visit_if_statement (if_statement* s); + virtual void visit_for_loop (for_loop* s); + virtual void visit_foreach_loop (foreach_loop* s); + virtual void visit_return_statement (return_statement* s); + virtual void visit_delete_statement (delete_statement* s); + virtual void visit_next_statement (next_statement* s); + virtual void visit_break_statement (break_statement* s); + virtual void visit_continue_statement (continue_statement* s); + virtual void visit_literal_string (literal_string* e); + virtual void visit_literal_number (literal_number* e); + virtual void visit_binary_expression (binary_expression* e); + virtual void visit_unary_expression (unary_expression* e); + virtual void visit_pre_crement (pre_crement* e); + virtual void visit_post_crement (post_crement* e); + virtual void visit_logical_or_expr (logical_or_expr* e); + virtual void visit_logical_and_expr (logical_and_expr* e); + virtual void visit_array_in (array_in* e); + virtual void visit_comparison (comparison* e); + virtual void visit_concatenation (concatenation* e); + virtual void visit_ternary_expression (ternary_expression* e); + virtual void visit_assignment (assignment* e); + virtual void visit_symbol (symbol* e); + virtual void visit_target_symbol (target_symbol* e); + virtual void visit_arrayindex (arrayindex* e); + virtual void visit_functioncall (functioncall* e); + virtual void visit_print_format (print_format* e); + virtual void visit_stat_op (stat_op* e); + virtual void visit_hist_op (hist_op* e); + virtual void visit_cast_op (cast_op* e); +}; #endif // STAPTREE_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/systemtap.spec b/systemtap.spec index 2586b85a..7277f92a 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -7,7 +7,7 @@ Name: systemtap # for version, see also configure.ac -Version: 0.8 +Version: 0.9 Release: %{release}%{?dist} Summary: Instrumentation System Group: Development/System @@ -116,6 +116,16 @@ Requires: systemtap %description sdt-devel Support tools to allow applications to use static probes. +%package initscript +Summary: Systemtap Initscript +Group: Development/System +License: GPLv2+ +URL: http://sourceware.org/systemtap/ +Requires: systemtap-runtime, initscripts + +%description initscript +Initscript for Systemtap scripts. + %prep %setup -q %{?setup_elfutils} @@ -203,6 +213,15 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/ mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/ %endif +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d/ +install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sysconfdir}/init.d/ +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d +install -m 644 initscript/config $RPM_BUILD_ROOT%{_sysconfdir}/systemtap +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap + %clean rm -rf ${RPM_BUILD_ROOT} @@ -211,6 +230,15 @@ getent group stapdev >/dev/null || groupadd -r stapdev getent group stapusr >/dev/null || groupadd -r stapusr exit 0 +%post initscript +chkconfig --add systemtap +exit 0 + +%preun initscript +chkconfig --del systemtap +exit 0 + + %files %defattr(-,root,root) @@ -276,7 +304,22 @@ exit 0 %{_bindir}/dtrace %{_includedir}/sys/sdt.h +%files initscript +%defattr(-,root,root) +%{_sysconfdir}/init.d/systemtap +%dir %{_sysconfdir}/systemtap +%dir %{_sysconfdir}/systemtap/conf.d +%dir %{_sysconfdir}/systemtap/script.d +%config(noreplace) %{_sysconfdir}/systemtap/config +%dir %{_localstatedir}/cache/systemtap +%dir %{_localstatedir}/run/systemtap +%doc initscript/README.initscript + + %changelog +* Tue Feb 17 2009 Frank Ch. Eigler <fche@redhat.com> - 0.9-1 +- Upstream release. + * Thu Nov 13 2008 Frank Ch. Eigler <fche@redhat.com> - 0.8-1 - Upstream release. diff --git a/tapset/ChangeLog b/tapset/ChangeLog deleted file mode 100644 index d473a797..00000000 --- a/tapset/ChangeLog +++ /dev/null @@ -1,2105 +0,0 @@ -2008-12-15 Mark Wielaard <mjw@redhat.com> - - * context-symbols.stp (probefunc): Call _stp_symbol_snprint with - current task. - -2008-12-10 Mark Wielaard <mjw@redhat.com> - - * context-symbols.stp: Define STP_NEED_TASK_FINDER_VMA. - (symbolname): New function. - * context-unwind.stp (caller): Pass current task to - _stp_symbol_snprint. - -2009-01-06 Frank Ch. Eigler <fche@elastic.org> - - PR 9699. - * context.stp, task.stp: Adapt to STAPCONF_TASK_UID. - -2008-12-09 Frank Ch. Eigler <fche@elastic.org> - - PR 6961. - * context-unwind.stp (print_backtrace, backtrace): WARN_ON !regs. - -2008-11-28 Frank Ch. Eigler <fche@elastic.org> - - PR 6965. - * context-{symbols,unwind}.h: Tweak control symbols to - STP_NEED_{SYMBOL,UNWIND}_DATA. - -2008-11-28 Elliott Baron <ebaron@redhat.com> - - PR 6965. - * tapsets/context.stp: moved functions requiring symbols - to tapsets/context-symbols.stp and those requiring both - symbols and unwinder to tapsets/context-unwind.stp. - * tapsets/context-symbols.h: New file. - * tapsets/context-unwind.h: New file. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * scsi.stp: Add kernel-doc notation. - -2008-11-26 Will Cohen <wcohen@redhat.com> - - * process.stp: Add kernel-doc notation. - -2008-11-25 Will Cohen <wcohen@redhat.com> - - * ioscheduler.stp: - * socket.stp: - * tcp.stp: - * udp.stp: Add kernel-doc notation. - -2008-11-24 Will Cohen <wcohen@redhat.com> - - * context.stp: - * memory.stp: - * networking.stp: - * timestamp.stp: Change to use kernel-doc notation. - -2008-11-19 Jim Keniston <jkenisto@us.ibm.com> - - * s390x/registers.stp: Fixed typo. - -2008-11-19 Ananth Mavinakayanahalli <ananth@us.ibm.com> and Jim Keniston <jkenisto@us.ibm.com> - - * s390x/registers.stp: Added - -2008-11-13 William Cohen <wcohen@redhat.com> - - * networking.stp: Order entries in table. - -2008-11-13 William Cohen <wcohen@redhat.com> - - * memory.stp: Add xml documentation. - -2008-11-12 William Cohen <wcohen@redhat.com> - - * context.stp: Remove cpuid() documentation. - -2008-10-28 William Cohen <wcohen@redhat.com> - - * vfs.stp (vfs.(read|write){.return}): Add inode variable, ino. - -2008-10-28 David Smith <dsmith@redhat.com> - - PR6972 - * vfs.stp (generic.fop.aio_read): Works under 2.6.18 kernels, such - as RHEL5. - (generic.fop.aio_read.return): Ditto. - (vfs.__set_page_dirty_buffers): Fixed small bug. - (_vfs.block_write_begin): Only use for kernels >= 2.6.24. - (_vfs.block_write_begin.return): Ditto. - (_vfs.block_write_end): Ditto. - (_vfs.block_write_end.return): Ditto. - -2008-10-28 Wenji Huang <wenji.huang@oracle.com> - - * ioblock.stp (ioblock.request, ioblock.end): Correct for 2.6.28. - * scsi.stp (scsi_timer_pending): Ditto. - -2008-10-27 William Cohen <wcohen@redhat.com> - - * vfs.stp (vfs.(read|write){.return}): Add dev and devname variables. - -2008-10-23 Mark Wielaard <mjw@redhat.com> - - * syscalls2.stp (syscall.utime): Don't use pointer_arg to fetch - arguments. - (syscall.compat_utime): Likewise. - -2008-10-07 Mark Wielaard <mjw@redhat.com> - - * aux_syscalls.stp (_stp_sigaction_str): New embedded C function. - (_struct_sigaction_u): Call _stp_sigaction_str. - (_struct_sigaction32_u): New function. - * syscalls2.stp (syscall.rt_sigaction32): Call _struct_sigaction32_u. - -2008-09-23 Zhaolei <zhaolei@cn.fujitsu.com> - - * socket.stp (socket.aio_read/write): Fix version-checking method. - -2008-09-22 Zhaolei <zhaolei@cn.fujitsu.com> - - * socket.stp (socket.aio_read/write): Fix the semantic error - caused by the difference of kernel versions. - -2008-09-18 Mark Wielaard <mjw@redhat.com> - - * aux_syscalls.stp (_reboot_magic_str): Moved reboot.h include out. - -2008-09-17 Mark Wielaard <mjw@redhat.com> - - * aux_syscalls.stp: Removed commented out code. Removed unneeded - unpure embedded C-code. - -2008-09-15 Mark Wielaard <mjw@redhat.com> - - * x86_64/syscalls.stp (syscall.vm86_warning): Add argstr. - -2008-09-15 Mark Wielaard <mjw@redhat.com> - - * vfs.stp: Fix 2.6.27 detection. - * syscall.stp: Likewise. - * syscall2.stp: Likewise. - -2008-09-12 Wenji Huang <wenji.huang@oracle.com> - - * signal.stp: Initialize __sig in a function. - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * utrace.stp: Added _utrace_syscall_return(). - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * utrace.stp: Added _utrace_syscall_arg(). - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * marker.stp : New file, including marker context variable accessors. - -2008-09-01 Frank Ch. Eigler <fche@elastic.org> - - PR4225 merge. - * utrace.stp: New file, for use by utrace $var expansions. - -2008-09-01 Zhaolei <zhaolei@cn.fujitsu.com> - * nfs_proc.stp: Fix memory access error in nfs.proc.read_setup, - nfs.proc.write_setup and nfs.proc.commit_setup. - -2008-08-28 Zhaolei <zhaolei@cn.fujitsu.com> - * socket.stp: Make _get_sock_addr return correct address in kernel - before 2.6.16. - -2008-08-04 Wenji Huang <wenji.huang@oracle.com> - - * syscall.stp: Change $path to $pathname for 2.6.27. - * syscall2.stp: Ditto. - -2008-08-03 Wenji Huang <wenji.huang@oracle.com> - - * vfs.stp(add_to_page_cache): Correct for 2.6.27. - -2008-07-25 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp: Add sys_unlinkat. - -2008-07-18 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp: Add sys_symlinkat. - -2008-07-14 David Smith <dsmith@redhat.com> - - * i686/registers.stp: Removed syscall_nr function. - * x86_64/registers.stp: Ditto. - -2008-07-10 Josh Stone <joshua.i.stone@intel.com> - - * vfs.stp (__address_inode): Correct access to the mapping field. - -2008-07-09 Mark Wielaard <mwielaard@redhat.com> - - PR 6732 - * context.stp (ppid): Use STAPCONF_REAL_PARENT. - (pexecname): Likewise. - * task.stp (task_parent): Likewise. - -2008-07-01 Wenji Huang <wenji.huang@oracle.com> - - * vfs.stp : Make _vfs.generic_commit_write only for kernel<=2.6.25 - -2008-06-26 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp: Add sys_renameat. - -2008-06-23 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp: Add sys_mknodat. - -2008-06-20 wcohen <wcohen@redhat.com> - - * dev.stp: New. - -2008-06-19 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp: Output unknown bits in _stp_lookup_or_str. - -2008-06-17 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp: Add sys_linkat. - -2008-06-17 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp (__fork_flags): Add termination signal. - -2008-06-13 Josh Stone <joshua.i.stone@intel.com> - - * aux_syscalls.stp, ctime.stp, inet.stp, memory.stp, - s390x/syscalls.stp, {i686,x86_64,ppc64}/registers.stp: Add - 'pure' to embedded-C functions that deserve it. - -2008-06-13 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp: Add sys_fchownat. - -2008-06-12 Will Cohen <wcohen@redhat.com> - - * tasks.stp: Add user_mode. - -2008-06-11 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp: Add sys_fchmodat. - -2008-06-10 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp: Add sys_faccessat. - -2008-06-10 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp(syscall.mkdirat): Use _dfd_str() to add support - for AT_FDCWD. - -2008-06-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6470. - * argv.stp: New tapset. - -2008-06-09 David Smith <dsmith@redhat.com> - - * x86_64/registers.stp (syscall_nr): Added syscall_nr function. - * i686/registers.stp (syscall_nr): Ditto. - -2008-06-04 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp: Add sys_unshare. - -2008-06-03 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp (__fork_flags): Support for new clone flags - before linux-2.6.25. - -2008-05-26 Mark Wielaard <mwielaard@redhat.com> - - * task.stp : Only include fdtable.h for kernel versions > 2.6.25. - -2008-05-26 Wenji Huang <wenji.huang@oracle.com> - - * task.stp : Include fdtable.h for 2.6.26. - -2008-05-26 Wenji Huang <wenji.huang@oracle.com> - - * signal.stp (send.*): Correct for 2.6.26. - -2008-05-23 Frank Ch. Eigler <fche@elastic.org> - - * nfs.stp (*): Similarly convert kernel?,module? -> kernel!,module. - -2008-05-23 Frank Ch. Eigler <fche@elastic.org> - - * rpc.stp (*): Convert kernel?,module? -> kernel!,module probe points. - (rpc_create_task): Make conditional on kernel <= 2.6.18. - -2008-05-21 Frank Ch. Eigler <fche@elastic.org> - - PR 6538 - * nfs.stp (nfs.aop.readpage): Fix rsize. - -2008-05-20 Frank Ch. Eigler <fche@elastic.org> - - PR 6538 - * signal.stp (_signal.send.part[23]): Initialize dummy sinfo. - * syscalls2.stp (syscall.compat_sys_semtimedop): Fix sops_uaddr. - * vfs.stp (__find_bdevname): Rewrite. - * x86_64/syscalls.stp (syscall.pipe32): Fix argstr. - -2008-05-21 Mark Wielaard <mwielaard@redhat.com> - - * syscalls2.stp (syscall.utime): Use pointer_arg to fetch arguments. - (syscall.compat_utime): Likewise. - -2008-05-20 Mark Wielaard <mwielaard@redhat.com> - - PR 5001 - * aux_syscalls.stp (_stp_ctime): Removed. - (_struct_utimbuf_u): Removed. - (_struct_compat_utimbuf_u): Removed. - (_struct_utimbuf_actime): New function. - (_struct_utimbuf_modtime): New function. - (_struct_compat_utimbuf_actime): New function. - (_struct_compat_utimbuf_modtime): New function. - * syscalls2.stp (syscall.utime): Use new functions and ctime. - (syscall.compat_utime): Likewise. - -2008-05-19 Mark Wielaard <mwielaard@redhat.com> - - PR 6524 - * ctime.stp: Don't try to convert values that won't fit in 32bits. - -2008-05-08 Ananth N Mavinakayanahalli <ananth@in.ibm.com> - - PR 5231 - * ioblock.stp (ioblock.end): Set bytes_done depending on kernel - version. - -2008-04-29 Frank Ch. Eigler <fche@elastic.org> - - PR 6466 - * tcp.stp (tcp_sockstate_str, tcp_sockopt_str): Initialize - number->string lookup tables here, instead of "probe begin(-1)" - block that can be elided/warned. - -2008-04-16 Wenji Huang <wenji.huang@oracle.com> - - * scsi.stp (scsi.iodispatching): Correct for 2.6.25 kernel. - -2008-04-15 Martin Hunt <hunt@monkey> - - * context.stp (print_backtrace, backtrace): Use MAXTRACE. - -2008-03-21 Eugene Teo <eugeneteo@kernel.sg> - - PR 5528 - * conversions.stp (user_string_n, user_string_n2, user_string_n_warn, - user_string_n_quoted, user_short, user_short_warn, user_int, - user_int_warn, user_long, user_long_warn, user_char, user_char_warn): - New user_* functions. - -2008-03-20 Frank Ch. Eigler <fche@elastic.org> - - PR 5956. - * null.stp: New file, defining global NULL=0. - -2008-03-11 Will Cohen <wcohen@redhat.com> - - * syscalls2.stp (syscall.wait{4|id}): Correct for 2.6.24.n kernels. - -2008-03-06 Ananth N Mavinakayanahalli <ananth@in.ibm.com - - * i686/syscalls.stp: Handle sys_sigaltstack parameter after - register unification - -2008-02-28 Will Cohen <wcohen@redhat.com> - - PR433780 - * errno.stp (returnstr): Handle unified i386/x86_64 reg names. - -2008-02-27 Masami Hiramatsu <mhiramat@redhat.com> - - * x86_64/syscalls.stp (syscall.iopl): Use new_iopl instead of level - on xen kernel. - -2008-01-25 Will Cohen <wcohen@redhat.com> - - PR5554 - * syscalls.stp (__is_user_regs): Modify to work with older kernels. - -2008-01-23 Masami Hiramatsu <mhiramat@redhat.com> - - PR5554 - * syscalls.stp (__is_user_regs): Add new function to check whether - pt_regs is user mode registers. - (syscall.fork): Use __is_user_regs() to decide syscall name. - -2008-01-16 Eugene Teo <eteo@redhat.com> - - * signal.stp (get_sa_flags, get_sa_handler): New functions to - return addresses of sa_flags and sa_handler of struct k_sigaction. - (sigset_mask_str): New function. Returns a string containing the - set of signals to be blocked when executing the signal handler. - (is_sig_blocked): New function. Checks task_struct->blocked signal - mask for signals that are currently blocked. - (signal_str): New function. Translates a signal number. - (sa_flags_str): New function. Translates the sa_flags. - (sa_handler_str): New function. Returns the signal action or handler - associated to the signal. - -2008-1-4 Masami Hiramatsu <mhiramat@redhat.com> - - * aux_syscalls.stp (_stp_fork_list): Check kernel version for new - flags. - -2008-1-4 Masami Hiramatsu <mhiramat@redhat.com> - - PR5152 - * scheduler.stp (scheduler.ctxswitch): Change probe point __switch_to - to context_switch on ia64. - -2007-12-27 Zhaolei <zhaolei@cn.fujitsu.com> - - From Yang Zhiguo <yzgcsu@cn.fujitsu.com> - * signal.stp (_signal.send.part3.return): Correct name variable. - -2007-12-25 Zhaolei <zhaolei@cn.fujitsu.com> - - From Yang Zhiguo <yzgcsu@cn.fujitsu.com> - * aux_syscalls.stp (_struct_sigaction_u): Delete overlaped - SA_SIGINFO from _stp_sa_flags_list[]. - -2007-12-21 Zhaolei <zhaolei@cn.fujitsu.com> - - From Yang Zhiguo <yzgcsu@cn.fujitsu.com> - * aux_syscalls.stp (_futex_op_str): Add new futex options. - (_stp_fork_list[]): Add new clone flags. - -2007-12-17 Martin Hunt <hunt@redhat.com> - - * syscalls.stp (get_mempolicy): Fix syntax. Add prototype. - (kexec_load): Ditto. - (mbind): Ditto. - (move_pages): Ditto. - -2007-12-17 Zhaolei <zhaolei@cn.fujitsu.com> - - From Yang Zhiguo <yzgcsu@cn.fujitsu.com> - * Add new address family to _fam_num2str: IUCV and RXRPC. - -2007-12-17 Zhaolei <zhaolei@cn.fujitsu.com> - - From Bai Weidong <baiwd@cn.fujitsu.com> - * syscalls.stp: Add missed compat* probes in syscalls.stp. - -2007-12-12 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp (compat_sys_ptrace): Remove for now. - Utrace-patched kernels have a different compat_sys_ptrace(). - -2007-12-7 Zhaolei <zhaolei@cn.fujitsu.com> - - From Yang Zhiguo <yzgcsu@cn.fujitsu.com> - * syscalls2.stp: Add missed compat* probes in syscalls2.stp. - -2007-12-7 Zhaolei <zhaolei@cn.fujitsu.com> - - From Bai Weidong <baiwd@cn.fujitsu.com> - * aux_syscalls.stp (__sem_flags): Add the missed mode display, - Fix calculation error when string is empty. - -2007-11-21 Zhaolei <zhaolei@cn.fujitsu.com> - - From Bai Weidong <baiwd@cn.fujitsu.com> - * syscalls2.stp (rt_sigsuspend): Fix the semantic error caused by - the difference of kernel versions on IA64. - -2007-11-14 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * signal.stp (signal.do_action): Call __get_action_mask to get mask - to fix semantic error of accessing a struct. - * signal.stp (__get_action_mask): Add. - -2007-11-12 Martin Hunt <hunt@redhat.com> - - * logging.stp (print_char): Remove. Now implemented by - stap. - (log): Add a comment that it is deprecated. - -2007-11-12 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp (sys_remap_file_pages: : Change kernel - version check to >= 2.6.24. - -2007-11-8 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * rpc.stp (clones_from_clnt): Use deref to check, then use - atomic_read to read an atomic_t to avoid compilation error of - type matching. - (tasks_from_clnt): Ditto. - -2007-11-6 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * rpc.stp (sunrpc.clnt.call_sync): Define procname only for - kernel>=2.6.17. - (sunrpc.clnt.call_async): Ditto. - -2007-11-5 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * nfs_proc.stp: Use kread in get_ip and get_prot to avoid kernel - panic. - -2007-11-2 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * nfsd.stp: Fix the semantic error caused by the difference of - kernel versions. - * nfs_proc.stp: Ditto. - -2007-11-1 Will Cohen <wcohen@redhat.com> - - * syscall2.stp (sys_remap_file_pages): Fix compile error with kernel - version greater than 2.6.23. - -2007-11-1 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * rpc.stp (clones_from_clnt): Add CATCH_DEREF_FAULT(). - (tasks_from_clnt): Ditto. - -2007-10-17 Martin Hunt <hunt@redhat.com> - PR5000 - * endian.stp (set_endian): Remove. - -2007-10-15 Dave Wilder <dwilder@us.ibm.com> - - *aux_syscalls.stp:_dfd_str Added test for 32-bit value of AT_FDCWD - -2007-10-15 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * conversions.stp: Add a function kernel_string_n for copy - non-0-terminated string with fixed length from kernel space at - given address. - * stapfuncs.5.in: Add kernel_string_n. - * nfsd.stp: Using kernel_string_n to copy non-0-terminated string - with fixed length from kernel space at given address. - * nfs_proc.stp: Ditto. - -2007-10-12 Zhaolei <zhaolei@cn.fujitsu.com> - - * queue_stats.stp (qsq_start): Fix problem that compile fails when - calling qsq_utilization or other query functions next to qsq_start. - -2007-10-11 Zhaolei <zhaolei@cn.fujitsu.com> - - * queue_stats.stp (qsq_utilization): Update queue account datas - before calculate. - (qsq_blocked): Ditto. - (qsq_wait_queue_length): Ditto. - (qsq_service_time): Ditto. - (qsq_wait_time): Ditto. - (qsq_throughput): Ditto. - -2007-10-11 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * nfs_proc.stp (__nfs_write_data_info): Add data-access code for - count, valid and timestamp. - -2007-10-11 Zhaolei <zhaolei@cn.fujitsu.com> - - * udp.stp: Add name argument for all probes. - -2007-10-10 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_stp_lookup_str): When defaulting - to a numeric value, append, don't overwrite. - -2007-10-10 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * aux_syscalls.stp (_stp_lookup_or_str) redirect to _stp_lookup_str - if val is 0. - -2007-10-09 Mike Mason <mmlnx@us.ibm.com> - - * rpc.stp: Replaced atomic_read()'s with kread()'s - -2007-10-09 Martin Hunt <hunt@redhat.com> - PR5153 - * aux_syscalls.stp (_sighandler_str): No - sa_restorer field for IA64. - -2007-10-09 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp (sys_signal): Call - _sighandler_str(). - - * aux_syscalls.stp (_stp_sigset_str): Don't - include SIG_0. - (_sighandler_str): New. - -2007-10-09 Zhaolei <zhaolei@cn.fujitsu.com> - - * queue_stats.stp (qsq_start): Add destruction for qs_utime. - -2007-10-09 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * memory.stp (addr_to_node): Fix the compilation error of function - addr_to_node on IA64. - -2007-10-05 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp: Put #ifdef CONFIG_COMPAT - around compat code. - - * syscalls2.stp (rt_sigaction, sigaction): Call - _struct_sigaction_u(). - - * aux_syscalls.stp (_struct_timeval): Removed. No longer - necessary now that we have structure access in scripts. - (_struct_timespec): Ditto. - (_struct_itimerval): Ditto. - (_struct_timezone_u): Remove random CATCH_DEREF_FAULT() - line. - (_stp_sigset_str): New. - (_struct_sigaction_u): New. - -2007-10-04 Frank Ch. Eigler <fche@elastic.org> - - * inet.stp: New tapset for htonl and friends. - -2007-10-04 Zhaolei <zhaolei@cn.fujitsu.com> - - * queue_stats.stp (qsq_print): Make value of ops/s output as float - -2007-10-03 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp(_sockopt_level_str): Add support for protocol - number 134~137. - * socket.stp (global define,begin): Ditto. - -2007-10-02 Zhaolei <zhaolei@cn.fujitsu.com> - - * tcp.stp: Add name argument for all probes. - * tcp.stp (tcp.setsockopt.return): Add comment. - -2007-10-01 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_str_lookup_str): Print unmatched - values in hex. - -2007-10-01 Zhaolei <zhaolei@cn.fujitsu.com> - - * socket.stp (_success_check): Fix compare method. - -2007-09-27 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_stp_lookup_str, _stp_lookup_or_str): - New functions to efficiently and safely read arrays of values - and return a string. - (_signal_name): Reimplement using _stp_lookup_str(). - (_semctl_cmd): Ditto. - (__fork_flags): Ditto. - (_mmap_flags): Ditto. - (_mprotect_prot_str): Ditto. - (_shmat_flags_str): Ditto. - (_at_flag_str): Ditto. - (get_mmap_args): Complete rewrite for safety and correctness. - -2007-09-27 Wenji Huang <wenji.huang@oracle.com> - - * rpc.stp (clones_from_clnt, tasks_from_clnt): Fix for kernel >= 2.6.22. - * nfs.stp (__nfsi_ndirty) : Ditto. - * nfs_proc.stp (__nfsv4_bitmask) : Make bitmask valid according to CONFIG. - -2007-09-27 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * rpc.stp (sunrpc.clnt.shutdown_client): Add argument progname's - definition for probe sunrpc.clnt.shutdown_client, because it - is in the man page but not defined in tapset. - -2007-09-27 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * rpc.stp (sunrpc.clnt.call_sync, sunrpc.clnt.call_async): Fix - the output format of flags in argstr from hex to decimal just - to make it same as other probes. - -2007-09-27 Zhaolei <zhaolei@cn.fujitsu.com> - - * tcp.stp (sendmsg.return): Fix description of size variable. - * tcp.stp (recvmsg.return): Ditto. - -2007-09-27 Zhaolei <zhaolei@cn.fujitsu.com> - - * socket.stp (aio_read): Fix compile error with kernel version - less than 2.6.19. - * socket.stp (aio_write): Ditto. - -2007-09-26 Mike Mason <mmlnx@us.ibm.com> - - * vfs.stp: - Specified explicit types for __find_bdevname() parameters - and return value. The types could not be determined correctly - when __find_bdevname() was used in nfs.stp - - Added __page_index() to work around problem dereferencing unions - in stap language. - - Made generic.fop.sendfile conditional on kernel <= 2.6.22. - generic_file_sendfile() was removed in 2.6.23. - -2007-09-26 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * syscall.stp (syscall.brk): Add probe point - kernel.function("ia64_brk"). - * syscall.stp (syscall.mremap): Add probe point - kernel.function("ia64_mremap"). - -2007-09-26 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - modify field-access operator from "." to "->" in all files. - -2007-09-26 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp (adjtimex.return): Improve retstr. - * aux_syscalls.stp: Add a function(_adjtimex_return_str) for - adjtimex.return. - -2007-09-25 Frank Ch. Eigler <fche@elastic.org> - - * socket.stp (sock_flags_num2str): Define SOCK_PASSCRED if needed. - -2007-09-25 Frank Ch. Eigler <fche@elastic.org> - - * nfs_proc.stp (__i2n_ip_proto): Add a cast for 32-bit compatibility. - -2007-09-25 Frank Ch. Eigler <fche@elastic.org> - - * signal.stp (_signal.send.part*): Remove sinfo alias variable, - since it's a struct rather than integral value. - -2007-09-25 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp (sys_readlinkat): Make optional. - - * aux_syscalls.stp (_struct_compat_timeval_u): ifdef - CONFIG_COMPAT so buildok test will pass. - -2007-09-25 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * rpc.stp Fix the wrong calling of returnstr($return) to - returnstr(1) or returnstr(2). - -2007-09-25 Zhaolei <zhaolei@cn.fujitsu.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * rpc.stp Add function for probe point sunrpc.clnt.create_client. - -2007-09-24 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_at_flag_str): Add some more flags. - * syscalls2.stp (openat): Call _dfd_str(). - -2007-09-24 David Smith <dsmith@redhat.com> - - * nfsd.stp (__svc_fh): Added missing semicolon. - -2007-09-24 Frank Ch. Eigler <fche@elastic.org> - - * aux_syscalls.stp: Add missing CATCH_DEREF_FAULT()s. - -2007-09-24 Frank Ch. Eigler <fche@elastic.org> - - * inet_sock.stp, ioblock.stp, rpc.stp, scsi.stp, socket.stp, - tcp.stp: Add /* pure */ to embedded-C functions. - -2007-09-24 Frank Ch. Eigler <fche@elastic.org> - - * conversions.stp (user_string): Redefine in terms of user_string2. - -2007-09-23 Ulrich Drepper <drepper@redhat.com> - - * syscalls2.stp (readlinkat): Add. - -2007-09-21 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * aux_syscalls.stp (_sys_open_flag_str): Fix bug that missing - "O_ASYNC". - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * aux_syscalls.stp: Add a function _mremap_flags. - * syscalls.stp (syscall.mremap): Use _mremap_flags instead of - _mmap_flags. - -2007-09-21 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp(_reboot_magic_str) Fix the problem that - LINUX_REBOOT_MAGIC1 printed as UNKNOWN VALUE. - -2007-09-19 Martin Hunt <hunt@redhat.com> - PR 2295 - * syscalls.stp (sys_bdflush): Make optional. - (sys_madvise): Ditto. - (sys_mincore): Ditto. - (sys_mlock): Ditto. - (sys_mlockall): Ditto. - (sys_mprotect): Ditto. - (sys_mremap): Ditto. - (sys_msync): Ditto. - (sys_munlock): Ditto. - (sys_munlockall): Ditto. - * syscalls2.stp (sys_remap_pages): Make optional. - * ppc64/syscalls.stp (ppc_rtas): Make optional. - -2007-09-19 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscall.stp(getrusage) Fix the output of getrusage's argstr - when who is set to -2. - -2007-09-19 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * ia64/syscalls.stp Add a probe point syscall.sigaltstack for - ia64. - * signal.stp(signal.force_segv) Add a part(force_sigsegv_info) - for signal.force_segv. - -2007-09-13 David Smith <dsmith@redhat.com> - - * task.stp (task_open_file_handles): Fixed for kernels less than - version 2.6.15. - (task_max_file_handles): Ditto. - -2007-09-13 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp: Replace get_user calls with __stp_get_user. - -2007-09-06 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp (_stp_sockaddr_str): Fix memory access error - when calling with addrlen set to 0. - -2007-09-06 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp (_module_flags_str): Modify combination of - flags' values. - -2007-09-04 Zhaolei <zhaolei@cn.fujitsu.com> - - From Lai Jiangshan <laijs@cn.fujitsu.com> - * syscalls2.stp (quotactl): Init special_str before use. - (rt_sigqueueinfo): Change pid's type from %p to %d in argstr. - -2007-08-31 Zhaolei <zhaolei@cn.fujitsu.com> - From Lai Jiangshan <laijs@cn.fujitsu.com> - * aux_syscalls.stp (_mknod_mode_str): Fix file type - judgement error. - -2007-08-30 Wenji Huang <wenji.huang@oracle.com> - - * nfs.stp (__iov_length): Update. - (nfs.fop.aio_read, nfs.fop.aio_write): Update calling __iov_length. - * vfs.stp (generic.fop.aio_read, generic.fop.aio_write): Modify evaluating count,buf. - (generic.fop.readv*, generic.fop.writev*, generic.fop.splice_read*, - generic.fop.splice_write*, generic.fop.read*, generic.fop.write*): Make optional. - (vfs.__set_page_dirty_buffers.return): Add condition. - (vfs.remove_from_page_cache.return): Fix typo. - (vfs.block_sync_page.return): Remove size and units. - -2007-08-30 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp (syslog): Make $buf output as address in argstr. - -2007-08-29 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp (sysfs): Set argstr's format different - by value of option arg. - -2007-08-28 Wenji Huang <wenji.huang@oracle.com> - - * tcp.stp (sockstate): Fix typo. - -2007-08-28 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls.stp (bdflush): Add comma between args in argstr - Set second parameter(data)'s type by first parameter(func)'s - value in argstr. - -2007-08-27 Martin Hunt <hunt@redhat.com> - - * context.stp (module_name): New. Returns the current - module name. - - * tcp.stp (tcp_sendmsg): For 2.6.23, parameters change. - -2007-08-27 Wenji Huang <wenji.huang@oracle.com> - - * signal.stp (signal.do_action): Modify evaluating sa_handler,sa_mask. - -2007-08-27 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp(sendto): Set $addr as content string in argstr. - -2007-08-24 Wenji Huang <wenji.huang@oracle.com> - - * scheduler.stp (scheduler.cpu_on,scheduler.migrate): Make optional. - (scheduler.migrate): Modify evaluating cpu_from with task_cpu. - -2007-08-24 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp(send): Add len argument into argstr. - -2007-08-09 William Cohen <wcohen@redhat.com> - - * syscalls2.stp (compat_sys_utimensat): Correct function arg. - -2007-08-23 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp (sys_tee.return): Make optional - -2007-08-23 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_struct_compat_timeval_u): Fix - array reference. - (_struct_compat_timespec_u): Cast args to long. - -2007-08-23 Martin Hunt <hunt@redhat.com> - - From Cai Fei <caifei@cn.fujitsu.com> - * aux_syscalls.stp (_waitid_opt_str): New. - (_wait4_opt_str): Just handle wait4 options. - * syscalls2.stp (sys_waitid): Use _waitid_opt_str. - -2007-08-23 Wenji Huang <wenji.huang@oracle.com> - - * rpc.stp (sunrpc.svc.process, sunrpc.svc.recv): Modify evaluating - sv_name,sv_prog,sv_nrthreads in kernel>=2.6.19. - (sunrpc.sched.delay,sunrpc.sched.delay): Fix typo. - (sunrpc.*.return): Change name by adding "return". - -2007-08-23 Zhaolei <zhaolei@cn.fujitsu.com> - - * aux_syscalls.stp (_send_flags_str): Add support for MSG_MORE - (used in send, sendto, sendmsg and compat_sys_sendmsg). - Change name of _send_flags_str to _sendflags_str for unify with - _recvflags_str. - - * syscalls2.stp(send, sendto, sendmsg, compat_sys_sendmsg): Change - name of _send_flags_str to _sendflags_str for unify with _recvflags_str. - -2007-08-22 Martin Hunt <hunt@redhat.com> - - * ppc64/syscalls.stp: Remove a bunch of - non-ppc64 specific probes. - - * syscalls.stp (compat_sys_epoll_ctl): New. - (compat_sys_epoll_wait): New. - (sys_epoll_pwait): New. - (compat_sys_epoll_pwait): New. - (compat_sys_keyctl): New. - (compat_sys_mq_open): New. - (compat_sys_futex): New. - (compat_sys_mq_timedsend): New. - (compat_sys_mq_timedreceive): New. - (compat_sys_mq_notify): New. - (compat_sys_mq_getsetattr): New. - (init_module): Make optional and quote args. - (sys_eventfd): New. - - * syscalls2.stp (sys_splice): New. - (sys_vmsplice): New. - (compat_sys_vmsplice): New. - (sys_tee): New. - (sys_signalfd): New. - (compat_sys_signalfd): New. - (sys_timerfd): New. - (compat_sys_timerfd): New. - (old32_readdir): New. - -2007-08-22 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_utimensat_flag_str): New. - (_dfd_str): New. - (_struct_timeval2_u): Deleted. - (_struct_timeval_u): Take a number of structs to decode. - (_struct_compat_timeval2_u): Deleted - (_struct_compat_timeval_u): Take a number of structs to decode. - (_struct_timespec_u): Take a number of structs to decode. - Recognize UTIME_NOW and UTIME_OMIT. - (_struct_compat_timespec_u): Ditto. - - * syscalls.stp (compat_sys_old_getrlimit): Removed. - (sys_migrate_pages): New. - (sys_move_pages): New. - - * syscalls2.stp (compat_sys_sigprocmask): Removed. Calls - sys_sigprocmask. - (compat_sys_sysinfo): New. - (compat_sys_rt_sigtimedwait): New. - (sys_utimensat, compat_sys_utimensat): New. - - * ppc64/syscalls.stp (compat_sys_sigpending): Removed. - Calls sys_ func. - (compat_sys_setrlimit): Ditto. - (compat_sys_getrlimit): Ditto. - (compat_sys_old_getrlimit): Ditto. - (compat_sys_getrusage): Ditto. - (compat_sys_wait4): Ditto. - (compat_sys_sched_setaffinity): Ditto. - (compat_sys_sched_getaffinity): Ditto. - -2007-08-22 Wenji Huang <wenji.huang@oracle.com> - - * nfsd.stp (nfsd.proc?.*): Modify evaluating client_ip - with function addr_from_rqst to make it compatible in kernel>=2.6.19 - (nfsd.proc4.compound,nfsd.read,nfsd.write): Fix typo. - (nfsd.unlink): Fix reference to variable iap. - -2007-08-22 Wenji Huang <wenji.huang@oracle.com> - - * nfs.stp (__iov_length): Updated, Temporary here. - * nfs_proc.stp (__i2n_ip_proto): Add type cast to sockaddr_in. - (nfs.proc?.*): Modify evaluating count and offset. - (nfs.proc?.read.return): Delete evaluating size and units. - (nfs.proc?.write.return): Modify evaluating size. - (nfs.proc?.create): Modify evaluating filename and filelen. - (nfs.proc?.rename): Fix typo. - -2007-08-22 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp (syscall.setdomainname): Add argstr content - (argstr = "" -> argstr = sprintf("%p, %d", $name, $len)). - -2007-08-21 Frank Ch. Eigler <fche@elastic.org> - - From Cai Fei <caifei@cn.fujitsu.com>: - * syscalls2.stp, syscalls.stp: Added several missing argstr/retstr - variables. - -2007-08-21 Zhaolei <zhaolei@cn.fujitsu.com> - - * syscalls2.stp (syscall.select): Fixed variable name error - (timeout_uaddr = $tv->$tvp). - * aux_syscalls.stp (_recvflags_str): Add support for MSG_DONTWAIT - used in recv, recvfrom, recvmsg, compat_sys_recvmsg - -2007-08-20 Masami Hiramatsu <mhiramat@redhat.com> - - * ioblock.stp: Fix __bio_ino() not to access i_ino if the page is not - assigned to any inode. - -2007-08-20 Wenji Huang <wenji.huang@oracle.com> - - * nfs.stp (nfs.fop.aio_read, nfs.fop.aio_write): Modify evaluating count. - (__iov_length): New function. - (nfs.fop.sendfile, nfs.aop.set_page_dirty, nfs.aop.prepare_write, - nfs.aop.release_page): Fix typo. - -2007-08-17 Martin Hunt <hunt@redhat.com> - From Lai Jiangshan <laijs@cn.fujitsu.com> - * syscalls.stp (creat): Fix argstr. - -2007-08-17 Wenji Huang <wenji.huang@oracle.com> - - * ioscheduler.stp (ioscheduler.elv_add_request, - ioscheduler.elv_completed_request): Add checking $rq. - - * memory.stp (_IS_ZERO_PAGE): Modify reference to arguments. - -2007-08-16 Frank Ch. Eigler <fche@elastic.org> - - PR 1315. - * target_set.stp: New tapset file. - -2007-08-16 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_sock_family_str): - Add PF_IUCV, PF_RXRPC, PF_TIPC. - - From zhaolei@cn.fujitsu.com - Remove PF_UNIX. PF_LOCAL is correct. - -2007-08-16 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (__get_argv): Add parameter to - optionally skip the first argv (argv[0]). - (__get_compat_argv): Ditto. - - * syscalls.stp (execve): Set args to the whole argv. - For argstr use filename plus argv starting at [1]. - (compat_execve): Ditto. - * ppc64/syscalls.stp (sys32_exevve): Ditto. - - From Cai Fei <caifei@cn.fujitsu.com> - * syscalls.stp (sts_getpgid): Add pid arg. - -2007-08-16 Wenji Huang <wenji.huang@oracle.com> - - * errno.stp: Fix Typo for EADV. - -2007-08-15 Wenji Huang <wenji.huang@oracle.com> - - * aux_syscalls.stp (_reboot_flag_str,_futex_op_str,_mprotect_prot_str, - _fcntl_cmd_str, _quotaclt_cmd_str, _sock_type_str, _rlimit_resource_str, - _rusage_who_str): Add new entries, modify default return string. - -2007-08-15 Martin Hunt <hunt@redhat.com> - - * x86_64/syscalls.stp: Add support for sys32_mmap[2], - sys32_vm86_warning, and sys32_pipe. - * s390x/syscalls.stp (get_mmap_args): Move to aux_syscalls. - * aux_syscalls.stp (get_mmap_args): Moved here. - * syscalls.stp: Add sys32_alarm. - * syscalls2.stp: Add sys32_uname. - -2007-08-15 Frank Ch. Eigler <fche@elastic.org> - - * context.stp (cpuid, cpu): Use smp_processor_id(). - -2007-08-12 Wenji Huang <wenji.huang@oracle.com> - - * aux_syscalls.stp(_sched_policy_str,_nfsctl_cmd_str): Add SCHED_BATCH to - policy entries, FSCTL_GETFD,NFSCTL_GETFS to nfsctl entries - -2007-08-10 Josh Stone <joshua.i.stone@intel.com> - - * conversions.stp (kernel_string, kernel_long, kernel_int, - kernel_short, kernel_char, user_string_warn): Use the - CONTEXT->error_buffer to create an error message instead of a static - local array. - -2007-08-10 Frank Ch. Eigler <fche@elastic.org> - - From "Zhaolei" zhaolei@cn.fujitsu.com: - * syscalls.stp (msync.return): Correct name variable. - -2007-08-10 Frank Ch. Eigler <fche@elastic.org> - - From "Zhaolei" zhaolei@cn.fujitsu.com: - * aux_syscalls.stp (_sockopt_optname_str): Add SO_SND/RCVBUFFORCE. - -2007-08-09 Frank Ch. Eigler <fche@elastic.org> - - From Cai Fei <caifei@cn.fujitsu.com>: - * aux_syscalls.stp (__fork_flags): Decode CLONE_VM, NEWNS, DETACHED. - -2007-08-09 William Cohen <wcohen@redhat.com> - - * tapset/syscalls.stp (syscall.compat_execve, - syscall.compat_execve.return): - * tapset/syscalls2.stp (syscall.compat_sys_semtimedop, - syscall.compat_sys_semtimedop.return): - * tapset/i686/syscalls.stp (syscall.set_zone_reclaim, - syscall.set_zone_reclaim.return): Make optional. - -2007-08-08 Frank Ch. Eigler <fche@elastic.org> - - From "Zhaolei" zhaolei@cn.fujitsu.com: - * aux_syscalls.stp (_sockopt_level_str): Correct level=1 string. - -2007-08-03 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (__get_compat_argv): Add cast. - -2007-07-31 Martin Hunt <hunt@redhat.com> - - * syscalls*: Move sys32_sysctl to arch dirs. - -2007-07-31 Martin Hunt <hunt@redhat.com> - - * syscalls.stp (clock_nanosleep): Fix flags string. - * syscalls2.stp: Fix typo. - -2007-07-31 Martin Hunt <hunt@redhat.com> - - * */syscalls.stp: Added mmap functions. - Continued moving common compatibility functions to - the main tapset. - - * aux_syscalls.stp (_shmat_flags_str): New. - (__get_compat_argv): New. - - * syscalls.stp (adjtimex): Just print hex argument. - (compat_adjtimex): New. - (clock_getres): Also probe compat_clock_getres. - (clock_gettime): Also probe compat funcs. - (compat_clock_nanosleep): New. - (compat_execve): New. - (fstatat): New. - (get[e][gu]id): Also probe sys32. - (getsockopt): Make optional. Also probe compat. - (mmap, mmap2): These are arch-specific, so move to individual - architecture subdirs. - (compat_sys_msgctl): New. - (compat_sys_msgrcv): New. - (compat_sys_msgsnd): New. - - * syscalls.stp (pread32): Remove. It calls pread64 . - (quotactl): Make optional. - (recv): Probe correct function. - (recvfrom): Fix args. - (compat_sys_recvmsg): New. - (semctl): Make optional. - (compat_sys_semctl): New. - (semget): Make optional. - (semop): Make optional. - (semtimedop): Make optional. - (compat_sys_semtimedop): New. - (send): Make optional. - (sendmsg): Make optional. - (compat_sys_sendmsg): New. - (sendto): Make optional. - (setsockopt): Make optional. Add compat. - (shmat): New. - (compat_sys_shmat): New. - (shmctl): New. - (compat_sys_shmctl): New. - (shmdt): New. - (shmget): New. - (shutdown): Make optional. - (socket): Make optional. - (socketpair): Make optional. - (swapoff): Make optional. - (swapon): Make optional. - (sysctl): Add probe on sys32. - -2007-07-31 Frank Ch. Eigler <fche@elastic.org> - - PR 4793 - * ppc64/syscalls.stp: Remove duplicate sys_request_key{,.return} - aliases. - -2007-07-30 Dave Wilder <dwilder@us.ibm.com> - - PR 4794 - * syscalls2.stp (syscall.pread and syscall.pread32) - For s390x only changed the $buf argument to $ubuf. - Change the format for count and position from %p to %d - to make it consistant with sys_read and sys_write. - -2007-07-25 Mike Mason <mmlnx@us.ibm.com> - - PR 4386 - * memory.stp (vm.pagefault, vm.pagefault.return): - __handle_mm_fault renamed back to handle_mm_fault in 2.6.23. - Changed probes to look for either name in mm/memory.c and removed - kernel version check. - * task.stp (task_cpu): thread_info in task_struct changed - to stack in 2.6.23. Usage appears to be the same as before. - -2007-07-17 Mike Mason <mmlnx@us.ibm.com> - - * socket.stp: changed initialization of *num2str arrays to - foreach loops. - -2007-07-16 Martin Hunt <hunt@redhat.com> - (compat_sys_io_submit): Fix typo. - -2007-07-16 Martin Hunt <hunt@redhat.com> - * syscalls.stp (compat_sys_fcntl64, compat_sys_fcntl): Add. - (compat_sys_fstatfs64): Add. - (compat_sys_getdents, compat_sys_getdents64): Add. - (compat_sys_ioctl): Add. - (compat_sys_io_getevents): Add. - (compat_sys_io_setup): Add. - (compat_sys_io_submit): Add. - - * syscalls2.stp (compat_sys_nfsservctl): Add. - (sys_openat): Add. - (sys_ppoll): Add; - (compat_sys_ppoll): Add. - (sys32_pread64): Add. - (sys32_pwrite32): Add. - (sys_pwrite64): Print quoted string. - (sys_pselect6, compat_sys_pselect6): Add. - (sys_pselect7, compat_sys_pselect7): Add. - (compat_sys_old_readdir): Add. - (sys_select): Don't try to print fd_sets. - (compat_sys_select): Add. - (compat_sys_statfs64): Add. - - * ppc/syscalls.stp: Remove duplicated probes. - - * aux_syscalls.stp (_nfsctl_cmd_str): New. - (_fd_set_u): Removed. Not used. - -2007-07-11 Eugene Teo <eteo@redhat.com> - - * tcp.stp (tcp_sockstate_str, tcp_sockopt_str, - tcp_setsockopt): New. Also added sockopt and sockstate - lookup tables. - -2007-07-10 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_struct_compat_timeval2_u): - Fixes. - -2007-07-10 Martin Hunt <hunt@redhat.com> - * syscall*.stp: Major reorganization work. - * aux_syscalls.stp (_sigprocmask_how_str): Rewrite - in C so real arch-dependent header files - will be used. - (_mlockall_flags_str): Ditto. - -2007-07-09 Martin Hunt <hunt@redhat.com> - * syscalls2.stp (compat_sys_settimeofday): New. - -2007-07-09 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp (compat_sys_utimes): New. - * ppc64/syscalls.stp (compat_sys_utimes): Removed. - - * syscalls.stp (compat_sys_futimesat): Fix arg. - -2007-07-03 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: Add sys_futimesat, compat_sys_futimesat. - * syscalls2.stp (utimes): Use _struct_timeval2_u. - * aux_syscalls.stp (_struct_timeval2_u): New function. - (_struct_compat_timeval2_u): New function. - -2007-07-02 Martin Hunt <hunt@redhat.com> - - * context.stp (print_backtrace): If no regs, just - print the probe point. - -2007-06-22 Frank Ch. Eigler <fche@elastic.org> - - * syscalls_cfg_trunc.stp: New file for configuration global. - * syscalls.stp (add_key, mount), syscalls2.stp (write): - Use parameter. - -2007-06-15 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: Add sys_fcntl64, sys_oabi_fstat64, - sys_oabi_lstat64. - * syscalls2.stp: Fix sys_send. Add sys_sendfile64. - * errno.stp: Add arm support. - -2007-06-14 Mike Mason <mmlnx@us.ibm.com> - - * socket.stp: removed extra assignment to "size" in - socket.aio_write.return - -2007-06-07 Martin Hunt <hunt@redhat.com> - Fallout from PR 3331 fix. Sometimes glibc and the - kernel disagree about signed vs unsigned. - * aux_syscalls.stp: Rename __uid() to __int32(). - * syscalls.stp: Change syscall.chown, syscall.fchown, - syscall.lchown, and syscall.lseek to use __int32(). - * syscalls2.stp: Change syscall.setregid, syscall.resgid, - syscall.resuid, and syscall.setreuid to use __int32(). - -2007-05-17 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: Make optional sys_alarm, sys_fadvise64, - sys_gethostname, sys_getpgrp, and sys_llseek. - (syscall.getrlimit): Add optional calls sys_old_getrlimit, - compat_sys_getrlimit, and compat_sys_old_getrlimit. - - * syscalls2.stp: Make optional sys_nice, sys_rt_sigreturn, - sys_signal, sys_sigprocmask, sys_utime - (syscall.old_getrlimit): Moved into syscall.getrlimit. - -2007-05-16 Will Cohen <wcohen@redhat.com> - PR 4471 - * syscall2.stp: Correct sys_pipe function args for ia64. - -2007-05-16 Will Cohen <wcohen@redhat.com> - - PR 4510 - * scheduler.stp: Correct function argument. - -2007-05-09 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp: Added compat_sys_pause to syscall.pause. - - * syscalls.stp: Added sys_lstat64 to syscall.lstat. - Added compat_sys_gettimeofday to syscall.gettimeofday. - - * ppc64/syscalls.stp: Remove sys_lstat64. - * i686/syscalls.stp: Remove sys_lstat64. - -2007-04-25 David Wilder <dwilder@us.ibm.com> - - * syscall2.stp:syscall.pause added sys32_pause to probe list. - -2007-04-25 David Wilder <dwilder@us.ibm.com> - - * s390x/syscall.stp: Fix bug in syscall.mmap returning the wrong args - for 32-bit versions of mmap calls. - -2007-04-24 Will Cohen <wcohen@redhat.com> - - * memory.stp: Update vm.pagefault.return comment. - -2007-04-24 Mike Mason <mmlnx@us.ibm.com> - - * socket.stp: adapted to changes in 2.6.19 socket routines - -2007-04-24 Will Cohen <wcohen@redhat.com> - - * memory.stp: Add matching vm.pagefault.return - -2007-04-23 Frank Ch. Eigler <fche@elastic.org> - - * scheduler.stp (scheduler.ctxswitch): Since it's marked __kprobes - switch from __switch_to to context_switch on x86-64 in Ipswitch. - -2007-04-04 Sébastien Dugué <sebastien.dugue@bull.net> - - * scsi.stp: Fix for when the scsi driver is built into the kernel. - -2007-04-11 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp: Add in6.h include. - -2007-04-10 Martin Hunt <hunt@redhat.com> - - * logging.stp (print_char): New function. - - * aux_syscalls.stp: Clean up network includes. - -2007-04-09 Mike Mason <mmlnx@us.ibm.com> - - * DEVGUIDE: Added new tapset developer's guide. - -2007-03-30 Frank Ch. Eigler <fche@elastic.org> - - PR 1570. - * memory.stp, scheduler.stp, signal.stp, LKET/signal.stp: Adapt - to .inline -> .function change. - -2007-03-09 Pierre Peiffer <pierre.peiffer@bull.net> - - * nfsd.stp (nfsd.dispatch): Change initialization of variable - client_ip with a call to addr_from_rqst. - * rpc.stp (addr_from_rqst): - update with changes in struct svc_rqst - - __rpc_execute returns void now. struct rpc_xprt modified since - kernel 2.6.19. - * nfs.stp, vfs.stp: Local variables f_dentry renamed, because - conflicting with a new #define in kernel header linux/fs.h in 2.6.20. - -2007-02-29 David Wilder <dwilder@us.ibm.com> - - *conversions.stp (kernel_int) added goto success; (PR 4419) - -2007-02-22 David Wilder <dwilder@us.ibm.com> - - * syscalls.stp, s390x/syscall.stp: Created an s390x version of - syscall.mmap, syscall.mmap2, syscall.mmap.return, syscall.mmap2.return. - -2007-02-09 Fr ank Ch. Eigler <fche@elastic.org> - - * conversions.stp (*): Make errmsg usage uniform. - -2007-02-06 Josh Stone <joshua.i.stone@intel.com> - - * aux_syscalls.stp, inet_sock.stp, ioblock.stp, ioscheduler.stp, - nfs.stp, nfs_proc.stp, nfsd.stp, rpc.stp, scsi.stp, signal.stp, - socket.stp, task.stp, tcp.stp, vfs.stp: Protect pointer dereferences - with kread wherever possible. Some places still have hazards, as - marked with FIXMEs. - - * errno.stp (returnstr): Don't use return in tapset C functions. - * aux_syscalls.stp (__uget_timex_m): Ditto. - * nfsd.stp (__get_fh): Ditto. - * nfs.stp, vfs.stp (<many functions>): Ditto. - * string.stp (substr): Ditto. Also make sure start index is valid. - - * syscalls.stp (syscall.execve): Change __string to kernel_string. - -2007-02-06 Frank Ch. Eigler <fche@elastic.org> - - * conversions.stp (kernel_long/int/short/char): New functions. - -2007-01-31 Martin Hunt <hunt@redhat.com> - - * context.stp (print_backtrace): Modify for new - _stp_stack_print. - (backtrace): Just use _stp_stack_snprint(). - (print_stack): Use new _stp_print* functions. - (probefunc): Use _stp_symbol_snprint. - -2007-01-26 Josh Stone <joshua.i.stone@intel.com> - - * vfs.stp (ppos_pos): Change deref() to kread() so i686 passes. - -2007-01-25 Mike Mason <mmlnx@us.ibm.com> - - * socket.stp: Fix for missing SOCK_PASSSEC in kernels earlier - than 2.6.18. - -2007-01-25 Martin Hunt <hunt@localhost.localdomain> - - * syscalls2.stp: Add sys32_ustat probe. - -2007-01-23 Mike Mason <mmlnx@us.ibm.com> - - * socket.stp: Fixed bit checking method in sock_flags_num2str() - to match how it's done in the kernel. - -2007-01-23 Mike Mason <mmlnx@us.ibm.com> - - * socket.stp: New sockets tapset. - -2007-01-23 Mike Mason <mmlnx@us.ibm.com> - - * string.stp: Added tokenize() and strtol() functions. - -2007-01-17 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: Add syscall.creat. - * syscalls2.stp: Add compat_sys_open. - -2007-01-13 Mike Mason <mmlnx@us.ibm.com> - - * ioblock.stp: renamed __bio_direction() to bio_rw_num() - -2007-01-12 Mike Mason <mmlnx@us.ibm.com> - - * x86_64/syscalls.stp: added ? to request_key aliases - to prevent syscall.* failures on some kernels - -2006-12-29 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guij@cn.ibm.com> - * ioscheduler.stp, nfsd.stp, nfs.stp, nfs_proc.stp, - rpc.stp, vfs.stp: patch for 2.6.19 kernel - -2006-12-18 Frank Ch. Eigler <fche@elastic.org> - - * vfs.stp (ppos_pos): Protect contents with deref(), though - this blocks operation on i686 due to bug #3079. - -2006-12-13 Mike Mason <mmlnx@us.ibm.com> - - * scheduler.stp: fixed last line in scheduler.ctxswitch to - reference $prev_p->state instead of $prev_p->pid. - -2006-12-11 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guij@cn.ibm.com> - * nfs.stp, nfs_proc.stp, rpc.stp: patch for 2.6.9 kernel - -2006-11-29 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guij@cn.ibm.com> - * scheduler.stp, vfs.stp: made idle_balance and - buffer_migrate_page optinal. - -2006-11-20 Frank Ch. Eigler <fche@elastic.org> - - * context.stp (caller_addr): Declare return type. - -2006-11-07 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guij@cn.ibm.com> - * signal.stp, memory.stp: make do_mmap2, copy_cow_page - and signal.handle.return optional since they are obsolete - or failed to probe on 2.6.18.1/ppc64 - -2006-11-02 Frank Ch. Eigler <fche@elastic.org> - - * README: Add a blurb against running these scripts directly. - -2006-10-29 Thang Nguyen <thang.p.nguyen@intel.com> - - * context.stp: Added proper handling of statement - * probe in probefunc() for IA64 (bz# 3423) - -2006-10-16 Li Guanglei <guanglei@cn.ibm.com> - * scsi.stp: check whether rq_disk is empty - * scheduler.stp: revert changes for x86_64 - -2006-10-13 Li Guanglei <guanglei@cn.ibm.com> - * scsi.stp: add some variables - * scheduler.stp: skip __switch_to on x86_64 - -2006-10-12 Martin Hunt <hunt@redhat.com> - * context.stp (print_backtrace): Pass in new - kretprobe instance arg. - (backtrace): Ditto. - (is_return): Rewrite. - (stack_size): New. - (stack_used): New. - (stack_unused): New. - (called_addr): New. - (caller): New. - -2006-10-12 Li Guanglei <guanglei@cn.ibm.com> - * ioscheduler.stp: bugfix to avoid refer to NULL pointer - -2006-10-11 Li Guanglei <guanglei@cn.ibm.com> - * nfs.stp, nfsd.stp: bugfix of pointer conversion on - 32-bit platform. - * i686/syscall.stp: make sys_request_key optional since - it failed to probe on 2.6.18/i386 - -2006-10-04 Frank Ch. Eigler <fche@elastic.org> - - * context.stp (probefunc): Return empty string for - userspace (< PAGE_OFFSET) pointers. - -2006-09-26 David Smith <dsmith@redhat.com> - - * test/run.sh: Changed 'stpd' references to 'staprun'. - -2006-09-20 Josh Stone <joshua.i.stone@intel.com> - - PR 3233 - * timestamp.stp (gettimeofday_ns): New function - (gettimeofday_us, gettimeofday_ms, gettimeofday_s): - Use gettimeofday_ns as the base unit. - -2006-09-19 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guijian@cn.ibm.com> - - * rpc.stp: Some changes and more comments of RPC tapset - -2006-09-18 Martin Hunt <hunt@redhat.com> - - * logging.stp (stp_print_binary): New function. - * string.stp: Fix docs. - -2006-09-12 Li Guanglei <guanglei@cn.ibm.com> - - From Li Xuepeng <xuepengl@cn.ibm.com> - - * nfsd.stp, nfs_proc.stp, nfs.stp: - Change NFS file identifier. Change NFS version data type - from String to INT. Add version variable to nfs_open - and nfs_release. - -2006-09-11 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian(guijian@cn.ibm.com> - * rpc.stp: tapsets for RPC activities. - -2006-08-30 Li Guanglei <guanglei@cn.ibm.com> - - * signal.stp: some changes to arguments and comments - of signal tapset - -2006-08-25 Li Guanglei <guanglei@cn.ibm.com> - - From Li Xuepeng: - * vfs.stp,nfsd.stp,nfs.stp: bug fixes and more error checking - -2006-08-23 Li Guanglei <guanglei@cn.ibm.com> - - * vfs.stp: New tapset from Thomas Zanussi(trz@us.ibm.com) to probe - vfs layer activities. - * nfs.stp: New tapset from Li Xuepeng(xuepengl@cn.ibm.com) to probe - nfs file operations and nfs address space operations on client side. - * nfs_proc.stp: New tapset from Li Xuepeng to probe some nfs RPC - procedure stub functions on client side. - * nfsd.stp: New tapset from Li Xuepeng to probe nfs server side - activities, including some RPC procedure stub functions, nfsd - dispatch routine, and nfsd_* functions - -2006-08-22 Li Guanglei <guanglei@cn.ibm.com> - - * signal.stp: More variables for signal.do_action and - signal.procmask. New function of get_sigset(). Minor - changes to naming of signal.pend and its comments - - -2006-08-21 Martin Hunt <hunt@redhat.com> - - * string.stp (substr): Rewrite. Make the 3rd parameter - be the length. - -2006-08-17 Josh Stone <joshua.i.stone@intel.com> - - * signal.stp: Changes on behalf of Manoj S Pattabhiraman: - 1. As per the suggestions, i have removed the argstr from the - probe points. - 2. Added some checks to find whether the signals generated are - USER or Kernel Mode in signal_handle probe. - -2006-08-17 Li Guanglei <guanglei@cn.ibm.com> - - * signal.stp: update signal tapsets based on the discussion - with Josh Stone on mailinglist: - 1. Added "send2queue" and "name" variable for signal.send.part* - 2. Added signal.send.return probe alias - 3. Added signal.checkperm and signal.checkperm.return probe alias - 4. Commented out signal.handle_stop - 5. Alias all signal syscalls to syscall tapsets. - -2006-08-15 Thang Nguyen <thang.p.nguyen@intel.com> - - * ioblock.stp: Added safety checks for __bio_ino() and - __bio_start_sect(). - -2006-08-09 Thang Nguyen <thang.p.nguyen@intel.com> - - * ioblock.stp: Merged io.stp from Tom Zanussi (IBM) into existing - ioblock.stp. Removed/Renamed duplicate variables and probes. - -2006-08-09 Josh Stone <joshua.i.stone@intel.com> - - * signal.stp: Create a new tapset that addresses process signals. - Much of this was contributed by Manoj Pattabhiraman (IBM). - * process.stp: Remove aliases that now belong in signal tapset - * memory.stp: move pagefault to vm.* namespace, and add many other - virtual-memory themed probes. - -2006-08-09 David Smith <dsmith@redhat.com> - - * syscalls.stp: Fixed typo in syscall.kexec_load argument - handling. - -2006-08-08 Eugene Teo <eteo@redhat.com> - - * context.stp (probemod): New function. - -2006-07-18 Thang Nguyen <thang.p.nguyen@intel.com> - - * context.stp: Modified probefunc() to print the function - name (without the dot) for statement probe on ppc64. - -2006-07-17 David Smith <dsmith@redhat.com> - - * context.stp: Removed returnval() function. Use $return - instead. - * return.stp: Removed. Use $return instead. - -2006-07-17 Tom Zanussi <zanussi@us.ibm.com> - - * ioblock.stp: add null bi_bdev check to bio_devname() - -2006-07-17 Li Guanglei <guanglei@cn.ibm.com> - - * syscalls.stp: make sys_acct, sys_add_key, sys_keyctl - and sys_modify_ldt optional on ppc64 since they are - weak symbol. - * ppc64/syscalls.stp: remove syscall.acct, syscall.add_key - and syscall.umask since they are already defined in - syscalls.stp - -2006-07-04 Martin Hunt <hunt@redhat.com> - - * syscalls.stp, syscalls2.stp: Use user_string_quoted(). - -2006-07-04 Li Guanglei <guanglei@cn.ibm.com> - - * syscalls.stp, syscalls2.stp, ppc64/syscalls.stp: - fix syscall.lstat, syscall.lstat64, syscall.newlstat. - * ppc64/syscalls.stp: fix syscall.compat_sys_statfs and - syscall.sys32_open - -2006-07-04 Li Guanglei <guanglei@cn.ibm.com> - - * memory.stp: add addr_to_node() from Jose R. Santos - (jrs@us.ibm.com) - * syscalls.stp: typo for syscall.lstat - -2006-06-30 Martin Hunt <hunt@redhat.com> - - * conversions.stp (user_string): Don't generate errors - on faults, just return <unknown>. - (user_string2): New function. - (user_string_warn): New function. - -2006-06-26 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_stp_ctime): New function. - (_struct_utimbuf_u): New function. - -2006-06-25 Li Guanglei <guanglei@cn.ibm.com> - - * syscalls.stp: Changes to AIO related syscalls(io_setup, - io_submit, io_getevents, io_cancel, io_destroy) - -2006-06-23 Thang Nguyen <thang.p.nguyen@intel.com> - - * tcp.stp: Refined variables and added more - function descriptions. - * udp.stp: UDP tapset. - * inet_sock.stp: common inet_sock functions - for TCP and UDP tapsets. - -2006-06-22 Thang Nguyen <thang.p.nguyen@intel.com> - - * tcp.stp: TCP tapset (originally from IBM) - -2006-06-21 Josh Stone <joshua.i.stone@intel.com> - - PR 2525 - * timestamp.stp (gettimeofday_us, gettimeofday_ms, gettimeofday_s): - Convert to using the runtime-provided _stp_gettimeofday_us(). - -2006-06-19 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: Make the 16-bit calls optional. - * syscalls2.stp: Ditto. - -2006-06-09 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp: Fix sys_sync. - -2006-06-09 Martin Hunt <hunt@redhat.com> - - * syscalls2.stp: Fixed the uid and gid calls. - -2006-06-09 Li Guanglei <guanglei@cn.ibm.com> - - * syscalls.stp: made sys_ftruncate64 optional since it doesn't - exist on 2.6.16*/ppc64 - -2006-06-08 Thang Nguyen <thang.p.nguyen@intel.com> - - * ioblock.stp: new (block I/O activities) - -2006-06-06 Josh Stone <joshua.i.stone@intel.com> - - * process.stp (create, exec_complete): replace retval() with $return - -2006-06-02 Josh Stone <joshua.i.stone@intel.com> - - * process.stp (exec, exec_complete): conditionally include - compat_do_execve for 64-bit kernels - * process.stp (handle_signal): use optional probes to alternate - between function or inline - -2006-05-30 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_mountflags_str): Rewrite. - (_umountflags_str): New. - - * syscalls.stp (fstatfs.return): Add retstr. - - * syscalls2.stp (sys_write): Use text_strn(). - * syscalls.stp (sys_lseek): Fix. - (sys_llseek): Fix. - - * string.stp (text_str): New. - (text_strn): New. - -2006-05-26 Martin Hunt <hunt@redhat.com> - - * errno.stp: Add octal option for returnstr. - - * [i686,x86_64]/syscalls.stp (umask): Print args and return - in octal. - (add_key): Comment out. This syscall is added by a xen patch - and may not be present. - (tux): Ditto. - - * syscalls.stp (accept): Fix arg name. - -2006-05-25 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: Add sys_fcntl and sys_listen. - - * syscalls2.stp: Commented out sys_socketcall because it only calls - other system calls which are already probed. - -2006-05-25 Martin Hunt <hunt@redhat.com> - - * syscall*.stp: Change "0x%p" to "%p". - -2006-05-25 Li Guanglei <guanglei@cn.ibm.com> - - * scheduler.stp: add prev_task and next_task variable. - -2006-05-24 Josh Stone <joshua.i.stone@intel.com> - - PR 2677 - * context.stp (probefunc): Use _stp_symbol_sprint_basic - -2006-05-19 Li Guanglei <guanglei@cn.ibm.com> - - Patch from Mao Bibo (bibo.mao@intel.com) - * tapset/aux_syscalls.stp: change %lx to %llx in snprintf to - print the address in IA64 - -2006-05-19 Li Guanglei <guanglei@cn.ibm.com> - - * tapset/ioscheduler.stp: change . to -> operator to get the - elevator name - -2006-05-18 Li Guanglei <guanglei@cn.ibm.com> - - * tapset/LKET/*: tracing tapsets of LKET - * tapset/context.stp: add stp_pid() func - * tapset/ppc64/syscalls.stp: add conditional preprocessing - since sys64_time is removed from kernel >= 2.6.16 - -2006-05-18 Li Guanglei <guanglei@cn.ibm.com> - - * tapset/tskschedule.stp: deleted, merge into scheduler.stp - * tapset/scheduler.stp: incorporate tskschedule.stp - -2006-05-17 Josh Stone <joshua.i.stone@intel.com> - - * process.stp: Rename signal.send to signal_send and process.complete - to process_complete, to allow process.* to work properly. - * process.stp (_IS_ERR): declare parameter type - * process.stp (process.create): correct new_pid assignment - * scheduler.stp: New scheduler tapset - -2006-05-18 Li Guanglei <guanglei@cn.ibm.com> - - * tapset/ioscheduler.stp: generic IO scheduler tapsets from LKET - * tapset/memory.stp: generic pagefault tapsets from LKET - * tapset/networking.stp: generic networking tapsets from LKET - * tapset/scsi.stp: generic scsi tapsets from LKET - * tapset/tskschedule.stp: generic task scheduler tapsets from LKET - * tapset/process.stp: changes to process.exec alias - - -2006-05-16 David Smith <dsmith@redhat.com> - - * conversions.stp (hexstring, string): Removed functions. Because - of parser changes, "string" is now a reserved word and cannot be a - function name. Use 'sprintf("0x%x", num)' to replace hexstring() - and either 'sprint(num)' or 'sprintf("%d", num)' to replace - string(). - - * syscalls.stp (syscall.accept, syscall.alarm, syscall.close, - syscall.dup, syscall.epoll_create, syscall.exit, syscall.fchdir, - syscall.fdatasync, syscall.fsync, syscall.getsid) Changed - 'string()' calls to 'sprint()' calls. - * syscalls2.stp (syscall.sched_get_priority_max, - syscall.sched_get_priority_min, syscall.sched_getscheduler, - syscall.setfsgid, syscall.setfsgid16, syscall.setfsuid, - syscall.setfsuid16, syscall.setgid, syscall.setgid16, - syscall.setuid, syscall.setuid16, syscall.ssetmask, - syscall.timer_delete, syscall.timer_getoverrun): Ditto. - * i686/syscalls.stp (syscall.iopl, syscall.rt_sigreturn, - syscall.sigreturn): Ditto. - * ppc64/syscalls.stp (syscall.ppc64_personality): Ditto. - * x86_64/syscalls.stp (kernel.syscall.iopl, kernel.syscall.umask): - Ditto. - - * test/ctostp.sh: Uses 'sprint()' instead of 'string()' in - generated systemtap code. - -2006-05-14 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_sys_open_flag_str): Rewrite in C so it - is complete and works on different archs. - -2006-05-09 Josh Stone <joshua.i.stone@intel.com> - - * context.stp (probefunc): remove use of labels - * task.stp: functions to retrieve task information - * process.stp: tapset for process-related events - -2006-05-08 Josh Stone <joshua.i.stone@intel.com> - - PR 2594 - From Thang P Nguyen <thang.p.nguyen@intel.com> - * context.stp (probefunc): expands ability to detect the function - for different types of probes. - -2006-05-05 Frank Ch. Eigler <fche@elastic.org> - - PR 2643 - * syscalls.stp: Put back some dummy syscall.exit*.return probes. - -2006-05-03 Frank Ch. Eigler <fche@elastic.org> - - * context.stp, errno.stp: Note/eliminate some retval() duplication. - -2006-04-27 Martin Hunt <hunt@redhat.com> - - * endian.stp (set_endian): Remove "pure" to prevent - this from optimizing away. - -2006-04-21 Frank Ch. Eigler <fche@elastic.org> - - * aux_syscalls.stp (_fildes_u): Declare return value type. - -2006-04-18 Frank Ch. Eigler <fche@elastic.org> - - * conversions.stp (string, hex_string): Use snprintf for safety. - -2006-04-18 Martin Hunt <hunt@redhat.com> - - * conversions.stp (user_string): Reenable error message. - -2006-04-17 Martin Hunt <hunt@redhat.com> - - * endian.stp (set_endian): New function. - -2006-03-06 Martin Hunt <hunt@redhat.com> - - * system.stp: New tapset. - -2006-03-01 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_struct_sockaddr_u): Parse sockaddr. - - * syscalls.stp (bind): Call _struct_sockaddr_u(). - - * errno.stp (errno_str): Complete rewrite in C for speed and - accuracy. - (returnstr): New function for syscall tapet. - -2006-02-22 Frank Ch. Eigler <fche@elastic.org> - - * timestamp.stp (get_cycles): New function. - -2006-02-21 Martin Hunt <hunt@redhat.com> - - * context.stp: Fix definition of returnval(). Now the same as retval(). - Cleanup needed. Only one can survive. - -2006-02-17 Frank Ch. Eigler <fche@elastic.org> - - * context.stp (cpu): Clone undocumented cpuid() function. - -2006-02-14 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: More updates. - -2006-02-14 Frank Ch. Eigler <fche@elastic.org> - - * queue_stats.stp: New tapset. - -2006-02-14 Mark McLoughlin <markmc@redhat.com> - - * aux_syscalls.stp: (_sys_open_flag_str): s/O_NDCTTY/O_NOCTTY/ - -2006-02-14 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp (_struct_timeval_u): New function. - (_struct_timeval): New function. - (_struct_timespec_u): New function. - (_struct_timespec): New function. - (_struct_itimerval_u): New function: - (_struct_itimerval): New function: - (_signal_name): New function. - (_module_flags_str): Fixed. - - * syscalls2.stp (syscall.setitimer): Use new function - _struct_itimerval_u(). - - * syscalls.stp: Latest version. Many changes. - -2006-02-08 Martin Hunt <hunt@redhat.com> - - * aux_syscalls.stp(_msync_flag_str): Fix. - (_wait_opt_str): Fix. - * syscalls.stp: Latest. - -2006-02-07 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: Latest. - * syscalls2.stp: Commented out pciconfig calls. Those - need to go in arch-specific directories. - - * aux_syscalls.stp (_access_mode_str): Fix. - (_mmap_flags): New Function. - (_mprotect_prot_str): Fix. - (__string): New. - (__get_argv): New. - (__fork_flags): New. - -2006-02-01 Martin Hunt <hunt@redhat.com> - - * syscalls.stp: New syscall file. - * syscall2.stp: More syscalls. - * i686/syscalls.stp: x86-specific calls. - * x86_64/syscalls.stp: x86_64-specific calls. - -2006-01-30 Martin Hunt <hunt@redhat.com> - - * context.stp (probefunc): New function. - (is_return): New function. - (returnval): New function. - -2006-01-15 Frank Ch. Eigler <fche@elastic.org> - - * logging.stp: Revert. - -2006-01-10 Martin Hunt <hunt@redhat.com> - - * logging.stp: Don't set STAP_SESSION_STOPPING. - That it done in _stp_exit(). - diff --git a/tapset/DEVGUIDE b/tapset/DEVGUIDE index 3d550319..e6bc3fb8 100644 --- a/tapset/DEVGUIDE +++ b/tapset/DEVGUIDE @@ -135,17 +135,66 @@ Comments 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.). Also use comments in areas where your -intent may not be clear from reading the code. +intent may not be clear from reading the code. The comments preceding +the functions and probes should be written in the format described in +the Documentation section to allow automatic generation of the tapset +documentation. Documentation ------------- -Every tapset should have its own man page called stapprobes.<tapset>(5). -See src/man for examples. In addition, the SEE ALSO section in the -stapprobes(5) man page should be updated to refer to your tapset's man -page. - -External functions defined in your tapset should be added to the -stapfuncs(5) man page. +SystemTap now documents the tapset functions and probe points in a +manner similar to the Linux kernel. The tapset files have comments +before each function and probe point that are processed by a modified +kernel-doc script and pulled into an XML document. HTML, PDF, and man +pages are generated from that document during the build process. + +For systemtap functions the structure of the documentation comment is: + +/** + * sfunction function_name(:)? (- short description)? +(* @parameter(space)*: (description of function parameter x)?)* +(* a blank line)? + * (Description:)? (Description of function)? + * (section header: (section description)? )* +(*)?*/ + +For sytemtap probes the structure of the documentation comment is the +following: + +/** + * probe probe_name(:)? (- short description)? +(* @variable(space)*: (description of probe variable x)?)* +(* a blank line)? + * (Description:)? (Description of probe)? + * (section header: (section description)? )* +(*)?*/ + +The document extraction keys off the "/**" at the start of the +comment; normal comments starting with "/*" are ignored. The next +line of the comment describes whether the following code is for a +SystemTap function or a probe and title descript. Following lines that +have an '@' preceding the first word describe the parameters or +variables available in the function or probe. There can be zero or +more "section headers" after the variables or parameters. After each +section there can be multiple lines of text. The comment is closed +with "*/". + +The xml tapsets.tmpl in src/doc/SystemTap_Tapset_Reference makes use +of those special comments. This xml file has place holders to extract +the documentation from the tapsets like the following for +ioscheduler.stp: + +!Itapset/ioscheduler.stp + +When a new tapset file is created you will need make a similar addition +to tapsets.tmpl to pull the documentation in from the new tapset file. +If configured to build reference documentation (--enable-refdocs) and +the needed software is available, the build process will automatic +generated PDF, HTML, and man pages. + +The creation of new man pages for the tapsets and functions is +depricated and all the documentation should be migrated over to the +tapsets.tmpl. Config & Makefiles ------------------ @@ -182,14 +231,7 @@ most important, it validates that the tapset can actually be used for something useful. If you can't write a script that uses the tapset in a meaningful way, perhaps you should rethink what the tapset provides. -Example scripts are stored in src/examples in GIT. - -Change Logs ------------ -Update the appropriate ChangeLog files with a brief description of your -additions and changes. Note that the change description you enter during -a "cvs commit" does not get added to the ChangeLog files. You must edit -the ChangeLog files directly and commit them as well. +Example scripts are stored in testsuite/systemtap.examples/ in GIT. Embedded C & Safety ------------------- @@ -221,7 +263,7 @@ The following documents, web sites and mailing lists will familiarize you with SystemTap: - SystemTap Tutorial. A good introduction to SystemTap. - (html format:http://sourceware.org/systemtap/tutorial/, + (html format: http://sourceware.org/systemtap/tutorial/, PDF format: http://sourceware.org/systemtap/tutorial.pdf) - SystemTap project home page @@ -231,7 +273,7 @@ you with SystemTap: (http://sourceware.org/systemtap/getinvolved.html) - GIT repository - (http://sources.redhat.com/git/?p=systemtap.git;a=summary + (http://sources.redhat.com/git/?p=systemtap.git;a=summary) - HACKING file in the source directory. This file outlines what's expected of project contributors. @@ -242,7 +284,8 @@ you with SystemTap: - Existing tapsets -- SystemTap Language Reference (in development, will be added to wiki - when released) +- SystemTap Language Reference. + (html format: http://sourceware.org/systemtap/langref/, + PDF format: http://sourceware.org/systemtap/langref.pdf) - SystemTap Man Pages (use "man -k stap" to print a list) diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 603d2158..42b2abf8 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1419,7 +1419,7 @@ typedef struct { char *name; } _stp_val_array; -void _stp_lookup_str(const _stp_val_array * const array, long val, char *ptr, int len) +static void _stp_lookup_str(const _stp_val_array * const array, long val, char *ptr, int len) { int i = 0, slen; while (array[i].name) { @@ -1432,7 +1432,7 @@ void _stp_lookup_str(const _stp_val_array * const array, long val, char *ptr, in slen = strlen(ptr); _stp_snprintf(ptr + slen, len - slen, "0x%lx", val); } -void _stp_lookup_or_str(const _stp_val_array * const array, long val, char *ptr, int len) +static void _stp_lookup_or_str(const _stp_val_array * const array, long val, char *ptr, int len) { int i = 0, flag = 0, slen; @@ -1461,7 +1461,7 @@ void _stp_lookup_or_str(const _stp_val_array * const array, long val, char *ptr, %} %{ -const _stp_val_array const _stp_signal_list[] = { +static const _stp_val_array const _stp_signal_list[] = { {0, "SIG_0"}, V(SIGHUP), V(SIGINT), @@ -1493,7 +1493,7 @@ const _stp_val_array const _stp_signal_list[] = { {0, NULL} }; -void _stp_sigset_str(sigset_t *mask, char *ptr, int len) +static void _stp_sigset_str(sigset_t *mask, char *ptr, int len) { const _stp_val_array * const array = _stp_signal_list; int i = 0, flag = 0; @@ -1517,7 +1517,7 @@ function _signal_name:string(sig:long) %} %{ -const _stp_val_array const _stp_semctl_list[] = { +static const _stp_val_array const _stp_semctl_list[] = { V(IPC_INFO), V(SEM_INFO), V(SEM_STAT), @@ -1556,7 +1556,7 @@ function _stp_sigset_u:string(setptr:long) %} %{ -const _stp_val_array const _stp_fork_list[] = { +static const _stp_val_array const _stp_fork_list[] = { V(CLONE_VM), V(CLONE_FS), V(CLONE_FILES), @@ -1604,7 +1604,7 @@ function __fork_flags:string(flags:long) %} %{ -const _stp_val_array const _stp_atflag_list[] = { +static const _stp_val_array const _stp_atflag_list[] = { #ifdef AT_SYMLINK_NOFOLLOW V(AT_SYMLINK_NOFOLLOW), #endif @@ -1626,7 +1626,7 @@ function _at_flag_str:string(f:long) %{ #include <linux/shm.h> -const _stp_val_array const _stp_shmat_list[] = { +static const _stp_val_array const _stp_shmat_list[] = { V(SHM_RDONLY), V(SHM_RND), V(SHM_REMAP), @@ -1643,7 +1643,7 @@ function _shmat_flags_str:string(f:long) %{ #include <linux/mman.h> -const _stp_val_array const _stp_mprotect_list[] = { +static const _stp_val_array const _stp_mprotect_list[] = { {0, "PROT_NONE"}, V(PROT_READ), V(PROT_WRITE), @@ -1660,7 +1660,7 @@ function _mprotect_prot_str:string(prot:long) %{ #include <linux/mman.h> -const _stp_val_array const _stp_mmap_list[] = { +static const _stp_val_array const _stp_mmap_list[] = { V(MAP_SHARED), V(MAP_PRIVATE), V(MAP_FIXED), @@ -1730,7 +1730,7 @@ function _sighandler_str:string(uaddr:long) %} %{ -void _stp_sigaction_str(struct sigaction *act, char *ptr, int len) +static void _stp_sigaction_str(struct sigaction *act, char *ptr, int len) { static const _stp_val_array const _stp_sa_handler_list[] = { {0, "SIG_DFL"}, diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp index 59d111ee..7c96b7e2 100644 --- a/tapset/context-unwind.stp +++ b/tapset/context-unwind.stp @@ -23,10 +23,11 @@ * except that deeper stack nesting may be supported. Return nothing. */ function print_backtrace () %{ - if (! CONTEXT->regs) - WARN_ON (! CONTEXT->regs); - else - _stp_stack_print(CONTEXT->regs, 1, CONTEXT->pi, MAXTRACE); + if (CONTEXT->regs) { + _stp_stack_print(CONTEXT->regs, 1, CONTEXT->pi, MAXTRACE); + } else { + _stp_printf("Systemtap probe: %s\n", CONTEXT->probe_point); + } %} /** @@ -36,10 +37,10 @@ function print_backtrace () %{ * stack. It may be truncated due to maximum string length. */ function backtrace:string () %{ /* pure */ - if (! CONTEXT->regs) - WARN_ON (! CONTEXT->regs); - else - _stp_stack_snprint (THIS->__retvalue, MAXSTRINGLEN, CONTEXT->regs, 0, CONTEXT->pi, MAXTRACE); + if (CONTEXT->regs) + _stp_stack_snprint (THIS->__retvalue, MAXSTRINGLEN, CONTEXT->regs, 0, CONTEXT->pi, MAXTRACE); + else + strlcpy (THIS->__retvalue, "", MAXSTRINGLEN); %} /** diff --git a/tapset/errno.stp b/tapset/errno.stp index 2523d846..eda9bff1 100644 --- a/tapset/errno.stp +++ b/tapset/errno.stp @@ -9,7 +9,7 @@ %{ #define N(a) [a]=#a -const char * const errlist[] = { +static const char * const errlist[] = { /* from asm-generic/errno-base.h */ [1] = "EPERM", [2] = "ENOENT", @@ -340,7 +340,7 @@ const char * const errlist[] = { #endif }; #undef N -const int Maxerrno = sizeof(errlist)/sizeof(char *); +static const int Maxerrno = sizeof(errlist)/sizeof(char *); %} function errno_str:string (err:long) %{ /* pure */ diff --git a/tapset/memory.stp b/tapset/memory.stp index 9370073b..961cca38 100644 --- a/tapset/memory.stp +++ b/tapset/memory.stp @@ -6,14 +6,57 @@ // 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/mm.h> +%} + +global VM_FAULT_OOM=0, VM_FAULT_SIGBUS=1, VM_FAULT_MINOR=2, VM_FAULT_MAJOR=3 +global VM_FAULT_NOPAGE=4, VM_FAULT_LOCKED=5, VM_FAULT_ERROR=6 + +/** + * sfunction vm_fault_contains - Test return value for page fault reason + * @value: The fault_type returned by vm.page_fault.return + * @test: The type of fault to test for (VM_FAULT_OOM or similar) + */ +function vm_fault_contains:long (value:long, test:long) +%{ + int res; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) + switch (THIS->test){ + case 0: res = THIS->value == VM_FAULT_OOM; break; + case 1: res = THIS->value == VM_FAULT_SIGBUS; break; + case 2: res = THIS->value == VM_FAULT_MINOR; break; + case 3: res = THIS->value == VM_FAULT_MAJOR; break; + default: + res = 0; break; + } +#else + switch (THIS->test){ + case 0: res = THIS->value & VM_FAULT_OOM; break; + case 1: res = THIS->value & VM_FAULT_SIGBUS; break; + case 2: /* VM_FAULT_MINOR infered by that flags off */ + res = !((VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_MAJOR) & + THIS->value); + break; + case 3: res = THIS->value & VM_FAULT_MAJOR; break; + case 4: res = THIS->value & VM_FAULT_NOPAGE; break; + case 5: res = THIS->value & VM_FAULT_LOCKED; break; + case 6: res = THIS->value & VM_FAULT_ERROR; break; + default: + res = 0; + } +#endif + THIS->__retvalue = (res != 0); + return; +%} /** * probe vm.pagefault - Records that a page fault occurred. - * @address: The address of the faulting memory access. - * @write_access: Indicates whether this was a write. + * @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, + * while <command>0</command> indicates a read. * * Context: The process which triggered the fault - * */ probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, kernel.function("handle_mm_fault@mm/memory.c") ? @@ -23,9 +66,12 @@ probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?, } /** - * probe vm.pagefault.return - Records type of fault that occurred. - * @fault_type: 0 (VM_FAULT_OOM), 1 (VM_FAULT_SIGBUS), - * 2 (VM_FAULT_MINOR), and 3 (VM_FAULT_MAJOR) + * probe vm.pagefault.return - Indicates what type of fault occurred. + * @fault_type: Returns either + * <command>0</command> (VM_FAULT_OOM) for out of memory faults, + * <command>2</command> (VM_FAULT_MINOR) for minor faults, <command>3</command> (VM_FAULT_MAJOR) for + * major faults, or <command>1</command> (VM_FAULT_SIGBUS) if the fault was neither OOM, minor fault, + * nor major fault. */ probe vm.pagefault.return = kernel.function("__handle_mm_fault@mm/memory.c").return ?, kernel.function("handle_mm_fault@mm/memory.c").return ? @@ -34,7 +80,7 @@ probe vm.pagefault.return = kernel.function("__handle_mm_fault@mm/memory.c").ret } /** - * sfunction addr_to_node - Returns which NUMA node has the given address. + * sfunction addr_to_node - Returns which node a given address belongs to within a NUMA system. * @addr: The address of the faulting memory access. * */ @@ -58,7 +104,7 @@ function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */ /** - * probe vm.write_shared - Write to shared page. + * probe vm.write_shared - Attempts at writing to a shared page. * @address: The address of the shared write. * * Context: @@ -66,7 +112,7 @@ function _IS_ZERO_PAGE:long(from:long, vaddr:long) %{ /* pure */ * * Fires when a process attempts to write to a shared page. * If a copy is necessary, this will be followed by a - * vm.write_shared_copy. + * <command>vm.write_shared_copy</command>. */ probe vm.write_shared = kernel.function("do_wp_page") { address = $address @@ -74,15 +120,15 @@ probe vm.write_shared = kernel.function("do_wp_page") { /** * 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 + * @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 vm.shared_write. + * always preceded by a <command>vm.shared_write</command>. */ probe vm.write_shared_copy = kernel.function("copy_cow_page")? { address = $address @@ -91,12 +137,12 @@ probe vm.write_shared_copy = kernel.function("copy_cow_page")? { /** - * probe vm.mmap - Fires when an mmap is requested. - * @address: the requested address - * @length: the length of the memory segment + * probe vm.mmap - Fires when an <command>mmap</command> is requested. + * @address: The requested address + * @length: The length of the memory segment * * Context: - * The process calling mmap. + * The process calling <command>mmap</command>. */ probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? { address = $addr @@ -105,12 +151,12 @@ probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? { /** - * probe vm.munmap - Fires when an munmap is requested. - * @address: the requested address - * @length: the length of the memory segment + * probe vm.munmap - Fires when an <command>munmap</command> is requested. + * @address: The requested address + * @length: The length of the memory segment * * Context: - * The process calling munmap. + * The process calling <command>munmap</command>. */ probe vm.munmap = kernel.function("do_munmap") { address = $start @@ -118,12 +164,12 @@ probe vm.munmap = kernel.function("do_munmap") { } /** - * probe vm.brk -Fires when a brk is requested (resizing a heap). - * @address - the requested address - * @length - the length of the memory segment + * probe vm.brk - Fires when a <command>brk</command> is requested (i.e. the heap will be resized). + * @address: The requested address + * @length: The length of the memory segment * * Context: - * The process calling brk. + * The process calling <command>brk</command>. */ probe vm.brk = kernel.function("do_brk") { address = $addr @@ -131,12 +177,12 @@ probe vm.brk = kernel.function("do_brk") { } /** - * probe vm.oom_kill - Fires when a thread is targetted by the OOM killer. - * @task: the task being killed + * probe vm.oom_kill - Fires when a thread is selected for termination by the OOM killer. + * @task: The task being killed * * Context: - * The process that tried to consume more memory, and thus - * triggered the OOM. (correct?) + * The process that tried to consume excessive memory, and thus + * triggered the OOM. <remark>(is this correct?)</remark> */ probe vm.oom_kill = kernel.function("__oom_kill_task") { task = $p diff --git a/tapset/nfs_proc.stp b/tapset/nfs_proc.stp index 4f841836..11463e9a 100644 --- a/tapset/nfs_proc.stp +++ b/tapset/nfs_proc.stp @@ -5,18 +5,18 @@ %{ /*Get rpc_clnt from inode, same as kernel function NFS_CLIENT*/ - struct rpc_clnt *_stap_NFS_CLIENT(struct inode *inode, struct context * __restrict__ c); + static struct rpc_clnt *_stap_NFS_CLIENT(struct inode *inode, struct context * __restrict__ c); /*Get ip address from a rpc_clnt*/ - __u32 _get_ip_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c); + static __u32 _get_ip_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c); /*Get protocol types from a rpc_clnt*/ - int _get_prot_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c); + static int _get_prot_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c); /*Get ip address from a rpc_task*/ - __u32 get_ip(struct rpc_task *, struct context * __restrict__); + static __u32 get_ip(struct rpc_task *, struct context * __restrict__); /*Get protocol types from a rpc_task*/ - int get_prot(struct rpc_task *, struct context * __restrict__); + static int get_prot(struct rpc_task *, struct context * __restrict__); %} %{ - struct rpc_clnt *_stap_NFS_CLIENT(struct inode *inode, struct context * __restrict__ c) { + static struct rpc_clnt *_stap_NFS_CLIENT(struct inode *inode, struct context * __restrict__ c) { struct super_block *i_sb; struct nfs_server *server; i_sb = kread(&(inode->i_sb)); @@ -26,7 +26,7 @@ return NULL; } - __u32 _get_ip_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c) { + static __u32 _get_ip_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c) { struct rpc_xprt * cl_xprt; struct sockaddr_in *addr; cl_xprt= kread(&(clnt->cl_xprt)); @@ -39,7 +39,7 @@ return -1; } - int _get_prot_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c) { + static int _get_prot_from_client(struct rpc_clnt *clnt, struct context * __restrict__ c) { struct rpc_xprt * cl_xprt; cl_xprt= kread(&(clnt->cl_xprt)); return kread(&(cl_xprt->prot)); @@ -47,7 +47,7 @@ return -1; } - __u32 get_ip(struct rpc_task * task, struct context * __restrict__ c) { + static __u32 get_ip(struct rpc_task * task, struct context * __restrict__ c) { struct rpc_clnt * clnt; clnt = kread(&(task->tk_client)); return _get_ip_from_client(clnt, c); @@ -55,7 +55,7 @@ return -1; } - int get_prot(struct rpc_task * task, struct context * __restrict__ c) { + static int get_prot(struct rpc_task * task, struct context * __restrict__ c) { struct rpc_clnt * clnt; clnt = kread(&(task->tk_client)); return _get_prot_from_client(clnt, c); diff --git a/tapset/process.stp b/tapset/process.stp index b28a72cd..ca49aa67 100644 --- a/tapset/process.stp +++ b/tapset/process.stp @@ -13,20 +13,19 @@ function _IS_ERR:long(ptr:long) %{ /* pure */ /** - * probe process.create - New process created - * @task: A handle to the newly created process - * @new_pid: PID of the newly created process + * probe process.create - Fires whenever a new process is successfully created + * @new_pid: The PID of the newly created process * * Context: * Parent of the created process. * * Fires whenever a new process is successfully created, either as a result of - * one of the fork syscall variants, or a new kernel thread. + * <command>fork</command> (or one of its syscall variants), or a new kernel thread. */ probe process.create = kernel.function("copy_process").return { task = $return - new_pid = task_pid(task) if (_IS_ERR(task)) next + new_pid = task_pid(task) } @@ -34,9 +33,9 @@ probe process.create = kernel.function("copy_process").return { * probe process.start - Starting new process * * Context: - * Newly created process. + * Newly created process. * - * Fires immediately before a new process begins execution. + * Fires immediately before a new process begins execution. * */ probe process.start = kernel.function("schedule_tail") { } diff --git a/tapset/signal.stp b/tapset/signal.stp index 7f932e77..f40958e6 100644 --- a/tapset/signal.stp +++ b/tapset/signal.stp @@ -16,24 +16,23 @@ // -/* probe signal.send - * - * Fires when a signal is sent to a process. - * +/** + * probe signal.send- Fires when a system call or kernel function sends a signal to a process. + * Arguments: + * @sig: The number of the signal + * @sig_name: A string representation of the signal + * @sig_pid: The PID of the process receiving the signal + * @pid_name: The name of the signal recipient + * @si_code: Indicates the signal type + * @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> + * @name: The name of the function used to send out the signal + * * Context: * The signal's sender. * - * Arguments: - * sig - the number of the signal - * sig_name - a string representation of the signal - * sig_pid - pid of the signal recipient process - * pid_name - name of the signal recipient process - * si_code - indicates the signal type. - * task - a task handle to the signal recipient - * sinfo - the address of siginfo struct. - * shared - indicates whether this signal is shared by the thread group - * send2queue- indicates whether this signal is sent to an existing sigqueue - * name - name of the function used to send out this signal */ probe signal.send = _signal.send.* { @@ -84,21 +83,17 @@ probe _signal.send.part4 = kernel.function("specific_send_sig_info") %( kernel_v > "2.6.25" %? probe _signal.send.part1 = kernel.function("send_signal") { - name = "__group_send_sig_info" - sig = $sig - task = $t - sinfo = $info - shared = 1 - send2queue = 0 -} - -probe _signal.send.part4 = kernel.function("send_signal") -{ - name = "specific_send_sig_info" + if ($group == 1) { + name = "__group_send_sig_info" + shared = 1 + } + else if ($group == 0) { + name = "specific_send_sig_info" + shared = 0 + } sig = $sig task = $t sinfo = $info - shared = 0 send2queue = 0 } %) @@ -118,27 +113,80 @@ probe _signal.send.part3 = kernel.function("send_sigqueue") send2queue = 1 } -/* probe signal.send.return +/** + * probe signal.send.return - Fires when a signal sent to a process returns. + * @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. + * @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. + * + * Context: + * The signal's sender. <remark>(correct?)</remark> + * + * 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, + * 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 + * 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>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> - (<command>send_sigqueue</command> only) The task was marked + * <command>exiting</command>, allowing * <command>posix_timer_event</command> to redirect it to the group + * leader. + * */ probe signal.send.return = _signal.send.*.return { retstr = returnstr(1) } -/* - * Return values for "__group_send_sig_info" and "specific_send_sig_info" - * - * - return 0 if the signal is sucessfully sent to a process, - * which means the following: - * <1> the signal is ignored by receiving process - * <2> this is a non-RT signal and we already have one queued - * <3> the signal is successfully added into the sigqueue of - * receiving process - * - * - return -EAGAIN if the sigqueue is overflow the signal was RT - * and sent by user using something other than kill() - * - */ +// Return values for "__group_send_sig_info" and "specific_send_sig_info" +// +// - return 0 if the signal is sucessfully sent to a process, +// which means the following: +// <1> the signal is ignored by receiving process +// <2> this is a non-RT signal and we already have one queued +// <3> the signal is successfully added into the sigqueue of +// receiving process +// +// - return -EAGAIN if the sigqueue is overflow the signal was RT +// and sent by user using something other than kill() + +%( kernel_v > "2.6.25" %? +probe _signal.send.part1.return = kernel.function("send_signal").return +{ + if ($group == 1) { + name = "__group_send_sig_info" + shared = 1 + } + else if ($group == 0) { + name = "specific_send_sig_info" + shared = 0 + } + send2queue = 0 +} +%) + +%( kernel_v <= "2.6.25" %? probe _signal.send.part1.return = kernel.function("__group_send_sig_info").return { name = "__group_send_sig_info" @@ -153,15 +201,12 @@ probe _signal.send.part4.return = kernel.function("specific_send_sig_info").retu send2queue = 0 } -%( kernel_v <= "2.6.25" %? -/* - * - return 0 if the signal is either sucessfully added into the - * sigqueue of receiving process or a SI_TIMER entry is already - * queued so just increment the overrun count - * - * - return 1 if this signal is ignored by receiving process - * - */ +// - return 0 if the signal is either sucessfully added into the +// sigqueue of receiving process or a SI_TIMER entry is already +// queued so just increment the overrun count +// +// - return 1 if this signal is ignored by receiving process + probe _signal.send.part2.return = kernel.function("send_group_sigqueue").return { name = "send_group_sigqueue" @@ -170,17 +215,14 @@ probe _signal.send.part2.return = kernel.function("send_group_sigqueue").return } %) -/* - * - return 0 if the signal is either sucessfully added into the - * sigqueue of receiving process or a SI_TIMER entry is already - * queued so just increment the overrun count - * - * - return 1 if this signal is ignored by receiving process - * - * - return -1 if the task is marked exiting, so posix_timer_event - * can redirect it to the group leader - * - */ +// - return 0 if the signal is either sucessfully added into the +// sigqueue of receiving process or a SI_TIMER entry is already +// queued so just increment the overrun count +// +// - return 1 if this signal is ignored by receiving process +// +// - return -1 if the task is marked exiting, so posix_timer_event +// can redirect it to the group leader probe _signal.send.part3.return = kernel.function("send_sigqueue").return { @@ -189,10 +231,16 @@ probe _signal.send.part3.return = kernel.function("send_sigqueue").return send2queue = 1 } -/* probe signal.checkperm - * - * check permissions for sending the signal - * +/** + * probe signal.checkperm - Fires when a permission check is 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 + * @pid_name: Name of the process receiving the signal + * @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> */ probe signal.checkperm = kernel.function("check_kill_permission") { @@ -220,17 +268,16 @@ probe signal.checkperm.return = kernel.function("check_kill_permission").return } -/* probe signal.wakeup - * - * Wake up the process for new active signals. - * - * Argument: - * sig_pid: pid of the process to be woke up - * pid_name: name of the process to be woke up - * resume: indicate whether to wake up a task in STOPPED or - TRACED state - * state_mask: a string representation indicates the mask - * of task states that can be woken +/** + * 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 + * @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>. */ probe signal.wakeup = kernel.function("signal_wake_up") { @@ -245,10 +292,13 @@ probe signal.wakeup = kernel.function("signal_wake_up") } -/* probe signal.ignored - * - * Checks whether the signal is ignored or not. - * +/** + * probe signal.check_ignored - Fires when a system call or kernel function checks whether a + * signal was ignored or not + * @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 + * @sig_name: A string representation of the signal */ probe signal.check_ignored = kernel.function("sig_ignored") { @@ -265,14 +315,12 @@ probe signal.check_ignored.return = kernel.function("sig_ignored").return ? } -/* probe signal.handle_stop - * - * For now, just comment it out since at the time handle_stop_signal() - * is called, it doesn't know whether current signal is STOP/COUNT. - * So the calling of handle_stop_signal() doesn't mean that the Kernel - * is now processing the STOP/COUNT signal - * - */ +// probe signal.handle_stop +// For now, just comment it out since at the time handle_stop_signal() +// is called, it doesn't know whether current signal is STOP/COUNT. +// So the calling of handle_stop_signal() doesn't mean that the Kernel +// is now processing the STOP/COUNT signal +// /* probe signal.handle_stop = kernel.function("handle_stop_signal") { @@ -284,10 +332,13 @@ probe signal.handle_stop = kernel.function("handle_stop_signal") */ -/* probe signal.force_segv - * - * Forces SIGSEGV when there are some issues while handling signals for the process. - * +/** + * 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 + * @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 + * @sig_name: A string representation of the signal */ probe signal.force_segv = _signal.force_segv.* { @@ -318,10 +369,11 @@ probe signal.force_segv.return = } -/* probe signal.syskill - * - * To kill a process, Pass the pid and signal to kill the process. - * +/** + * 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 + * @sig: The specific signal sent to the process */ probe signal.syskill = syscall.kill { @@ -331,42 +383,50 @@ probe signal.syskill = syscall.kill probe signal.syskill.return = syscall.kill.return { } - - -/* probe signal.sys_tgkill - * - * Sends a signal to one specific thread. - * +/** + * probe signal.sys_tkill - Fires when <command>tkill</command> sends a kill signal + * to a process that is part of a thread group + * @pid: The PID of the process receiving the kill signal + * @sig: 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). */ -probe signal.systgkill = syscall.tgkill +probe signal.systkill = syscall.tkill { sig_name = _signal_name($sig) } -probe signal.systgkill.return = syscall.tgkill.return +probe signal.systkill.return = syscall.tkill.return { } - -/* probe signal.sys_tkill - * - * Sends a signal to one specific task. - * +/** + * probe signal.sys_tgkill - Fires when the kernel function <command>tgkill</command> + * sends a kill signal to a specific 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 + * 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. */ -probe signal.systkill = syscall.tkill +probe signal.systgkill = syscall.tgkill { sig_name = _signal_name($sig) } -probe signal.systkill.return = syscall.tkill.return +probe signal.systgkill.return = syscall.tgkill.return { } - -/* probe signal.send_sig_queue - * - * Queue signal to a process. - * +/** + * probe signal.send_sig_queue - Fires when a signal is queued 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 + * @pid_name: Name of the process to which the signal is queued + * @sigqueue_addr: The address of the signal queue */ probe signal.send_sig_queue = kernel.function("send_sigqueue"), @@ -387,13 +447,20 @@ probe signal.send_sig_queue.return = } -/* probe signal.pending - * - * Used to examine the set of signals that are pending for - * delivery to the calling thread - * - * long do_sigpending(void __user *set, unsigned long sigsetsize) +/** + * 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> + * + * This probe is used to examine a set of signals pending for delivery + * to a specific thread. */ +// long do_sigpending(void __user *set, unsigned long sigsetsize) + probe signal.pending = kernel.function("do_sigpending") { sigset_add=$set @@ -406,20 +473,23 @@ probe signal.pending.return = kernel.function("do_sigpending").return } -/* probe signal.handle - * - * Used to invoke signals - * - * static int handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, - * sigset_t *oldset, struct pt_regs * regs) - * Argument :- - * sig : Signal number - * sinfo : address of siginfo table. - * ka_addr : Address of the k_sigaction table associated with the signal - * oldset_addr : Address of a bit mask array of blocked signals - * regs : Address in the Kernel Mode stack area - * +/** + * probe signal.handle - Fires when the signal handler is 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 + * @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 @@ -444,16 +514,14 @@ probe signal.handle.return = kernel.function("handle_signal").return ? } -/* probe signal.do_action - * - * Fires by calling thread to examine and change a signal action - * - * int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) - * - * Argument :- - * sig : Signal number - * sigact_addr : address of the new sigaction struct associated with the signal - * oldsigact_addr : address of a previous sigaction struct associated with the signal +/** + * probe signal.do_action - Initiates a trace when a thread is about to examine + * and change 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 + * @sa_handler: The new handler of the signal + * @sa_mask: The new mask of the signal */ probe signal.do_action = kernel.function("do_sigaction") { @@ -485,21 +553,17 @@ function __get_action_mask:long(act:long) %{ /* pure */ %} -/* probe signal.procmask - * - * Fires by calling thread to examine and change blocked signals - * - * int sigprocmask(int how, sigset_t *set, sigset_t *oldset) - * - * Argument :- - * how : indicates how to change the blocked signals. Possible - * values are SIG_BLOCK=0 for blocking signals, SIG_UNBLOCK=1 - * for unblocking signals, and SIG_SETMASK=2 for setting - * the signal mask - * sigset_addr : address of sigset_t to be set - * oldsigset_addr : address of the old sigset_t - * sigset : the actual sigset to be set - * +/** + * probe signal.procmask - Initiates a trace when a thread is about to examine and change 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> */ probe signal.procmask = kernel.function("sigprocmask") { @@ -526,14 +590,17 @@ probe signal.procmask.return = kernel.function("sigprocmask").return } -/* - * probe signal.flush - * - * Flush all pending signals for a task. - * - * void flush_signals(struct task_struct *t) - * +/** + * probe signal.flush - Fires when all pending signals for a task are flushed + * @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> */ +//void flush_signals(struct task_struct *t) + probe signal.flush = kernel.function("flush_signals") { task = $t @@ -553,28 +620,27 @@ function get_sa_handler:long (act:long) %{ /* pure */ CATCH_DEREF_FAULT(); %} -/* - * sa_mask contains the set of signals to be blocked when executing the - * signal handler. This function returns a string, delimited by ",". - * - * struct task_struct { - * [...] - * struct signal_struct *signal; - * struct sighand_struct *sighand; - * [...] - * struct sighand_struct { - * atomic_t count; - * struct k_sigaction action[_NSIG]; - * [...] - * struct k_sigaction { - * struct sigaction sa; - * }; - * - * struct sigaction { - * [...] - * sigset_t sa_mask; - * }; - */ +// sa_mask contains the set of signals to be blocked when executing the +// signal handler. This function returns a string, delimited by ",". +// +// struct task_struct { +// [...] +// struct signal_struct//signal; +// struct sighand_struct//sighand; +// [...] +// struct sighand_struct { +// atomic_t count; +// struct k_sigaction action[_NSIG]; +// [...] +// struct k_sigaction { +// struct sigaction sa; +// }; +// +// struct sigaction { +// [...] +// sigset_t sa_mask; +// }; + function sigset_mask_str:string (mask:long) %{ /* pure */ int i, len; char *str = THIS->__retvalue, tmp[5]; @@ -587,14 +653,13 @@ function sigset_mask_str:string (mask:long) %{ /* pure */ if (len) str[len - 1] = '\0'; %} -/* - * task_struct->blocked signal mask contains the set of signals that are - * currently blocked. - * - * struct task_struct { - * [...] - * sigset_t blocked, real_blocked; - */ +// task_struct->blocked signal mask contains the set of signals that are +// currently blocked. +// +// struct task_struct { +// [...] +// sigset_t blocked, real_blocked; + function is_sig_blocked:long (task:long, sig:long) %{ /* pure */ int i; sigset_t blocked; @@ -627,9 +692,8 @@ function sa_handler_str(handler) { return sprintf("%p", handler); /* userspace address */ } -/* - * Signals start from 1 not 0. - */ +// Signals start from 1 not 0. + global __sig[64] function signal_str(num) { diff --git a/tapset/udp.stp b/tapset/udp.stp index 984df692..707cf77d 100644 --- a/tapset/udp.stp +++ b/tapset/udp.stp @@ -14,7 +14,7 @@ %} /** - * probe udp.sendmsg - Sending a UDP message + * 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 @@ -29,7 +29,7 @@ probe udp.sendmsg = kernel.function("udp_sendmsg") { } /** - * probe udp.sendmsg.return - Sending UDP message complete + * 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 * @@ -42,10 +42,10 @@ probe udp.sendmsg.return = kernel.function("udp_sendmsg").return { } /** - * probe udp.recvmsg - UDP message received + * probe udp.recvmsg - Fires whenever a UDP message is received * @name: Name of this probe * @sock: Network socket - * @size: Number of bytes to be received + * @size: Number of bytes received * * Context: * The process which receives a udp message @@ -57,7 +57,7 @@ probe udp.recvmsg = kernel.function("udp_recvmsg") { } /** - * probe udp.recvmsg.return - UDP message received is complete + * 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 * @@ -70,13 +70,13 @@ probe udp.recvmsg.return = kernel.function("udp_recvmsg").return { } /** - * probe udp.disconnect - UDP is disconnected + * probe udp.disconnect - A process requests for UPD to be UDP disconnected * @name: Name of this probe * @sock: Network socket * @flags: Flags (e.g. FIN, etc) * * Context: - * The process which disconnects udp + * The process which disconnects UDP */ probe udp.disconnect = kernel.function("udp_disconnect") { name = "udp.disconnect" @@ -85,7 +85,7 @@ probe udp.disconnect = kernel.function("udp_disconnect") { } /** - * probe udp.disconnect.return - returning from udp.disconnect probe + * probe udp.disconnect.return - UDP has been disconnected successfully * @name: Name of this probe * @ret: Error code (0: no error) * diff --git a/tapsets.cxx b/tapsets.cxx index 6e393b63..62c9e897 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -159,8 +159,7 @@ 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, - bool fakeregs = false) + bool interruptible = true) { o->newline() << "struct context* __restrict__ c;"; if (! interruptible) @@ -216,6 +215,7 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline() << "c->last_stmt = 0;"; o->newline() << "c->last_error = 0;"; o->newline() << "c->nesting = 0;"; + o->newline() << "c->regs = 0;"; o->newline() << "c->unwaddr = 0;"; // reset unwound address cache o->newline() << "c->pi = 0;"; @@ -240,20 +240,6 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline() << "c->cycles_base = 0;"; o->newline() << "#endif"; */ - - /* PR6961: Let's prep a bare-bones pt_regs struct, just in case our - kind of probe point does not supply one. */ - if (fakeregs) - { - o->newline() << "#ifdef STP_NEED_UNWIND_DATA"; - o->newline() << "memset (& c->regs_buffer, 0, sizeof (c->regs_buffer));"; - o->newline() << "REG_IP((& c->regs_buffer)) = (unsigned long)__builtin_return_address (0);"; - o->newline() << "REG_SP((& c->regs_buffer)) = (unsigned long)& c;"; - o->newline() << "c->regs = & c->regs_buffer;"; - o->newline() << "#endif"; - } - else - o->newline() << "c->regs = 0;"; } @@ -350,31 +336,31 @@ be_derived_probe_group::emit_module_decls (systemtap_session& s) if (probes.empty()) return; s.op->newline() << "/* ---- begin/end probes ---- */"; - s.op->newline() << "void enter_begin_probe (void (*fn)(struct context*), const char* pp) {"; + 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, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_STARTING", false, true); s.op->newline() << "c->probe_point = pp;"; s.op->newline() << "(*fn) (c);"; common_probe_entryfn_epilogue (s.op, false, true); s.op->newline(-1) << "}"; - s.op->newline() << "void enter_end_probe (void (*fn)(struct context*), const char* pp) {"; + 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, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_STOPPING", false, true); s.op->newline() << "c->probe_point = pp;"; s.op->newline() << "(*fn) (c);"; common_probe_entryfn_epilogue (s.op, false, true); s.op->newline(-1) << "}"; - s.op->newline() << "void enter_error_probe (void (*fn)(struct context*), const char* pp) {"; + 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, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_ERROR", false, true); s.op->newline() << "c->probe_point = pp;"; s.op->newline() << "(*fn) (c);"; common_probe_entryfn_epilogue (s.op, false, true); s.op->newline(-1) << "}"; - s.op->newline() << "struct stap_be_probe {"; + s.op->newline() << "static struct stap_be_probe {"; s.op->newline(1) << "void (*ph)(struct context*);"; s.op->newline() << "const char* pp;"; s.op->newline() << "int type;"; @@ -480,6 +466,7 @@ static string TOK_STATEMENT("statement"); static string TOK_ABSOLUTE("absolute"); static string TOK_PROCESS("process"); static string TOK_MARK("mark"); +static string TOK_LABEL("label"); // Can we handle this query with just symbol-table info? enum dbinfo_reqt @@ -552,7 +539,8 @@ inline_instance_info }; -struct dwarf_query; // forward decls +struct base_query; // forward decls +struct dwarf_query; struct dwflpp; struct symbol_table; @@ -1024,7 +1012,7 @@ struct dwflpp void iterate_over_modules(int (* callback)(Dwfl_Module *, void **, const char *, Dwarf_Addr, void *), - dwarf_query *data) + base_query *data) { ptrdiff_t off = 0; do @@ -1042,7 +1030,7 @@ struct dwflpp // Defined after dwarf_query - void query_modules(dwarf_query *q); + void query_modules(base_query *q); // ----------------------------------------------------------------- @@ -1159,10 +1147,8 @@ struct dwflpp return DWARF_CB_OK; } - Dwarf_Die *declaration_resolve(Dwarf_Die *die) + Dwarf_Die *declaration_resolve(const char *name) { - const char *name = dwarf_diename(die); - if (!name) return NULL; @@ -1329,6 +1315,82 @@ struct dwflpp } } + void + iterate_over_cu_labels (string label_val, Dwarf_Die *cu, void *data, + void (* callback)(const string &, + const char *, + int, + Dwarf_Die *, + Dwarf_Addr, + dwarf_query *)) + { + dwarf_query * q __attribute__ ((unused)) = static_cast<dwarf_query *>(data) ; + + get_module_dwarf(); + + const char * sym = label_val.c_str(); + Dwarf_Die die; + dwarf_child (cu, &die); + static string function_name; + do + { + Dwarf_Attribute attr_mem; + 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) + { + function_name = name; + } + else if (tag == DW_TAG_label + && ((strncmp(name, sym, strlen(sym)) == 0) + || (name_has_wildcard (sym) + && function_name_matches_pattern (name, sym)))) + { + const char *file = dwarf_decl_file (&die); + // Get the line number for this label + Dwarf_Attribute attr; + dwarf_attr (&die,DW_AT_decl_line, &attr); + Dwarf_Sword dline; + dwarf_formsdata (&attr, &dline); + Dwarf_Addr stmt_addr; + if (dwarf_lowpc (&die, &stmt_addr) != 0) + { + // There is no lowpc so figure out the address + // Get the real die for this cu + Dwarf_Die cudie; + dwarf_diecu (cu, &cudie, NULL, NULL); + size_t nlines = 0; + // Get the line for this label + Dwarf_Line **aline; + dwarf_getsrc_file (module_dwarf, file, (int)dline, 0, &aline, &nlines); + // Get the address + for (size_t i = 0; i < nlines; i++) + { + dwarf_lineaddr (*aline, &stmt_addr); + if ((dwarf_haspc (&die, stmt_addr))) + break; + } + } + + Dwarf_Die *scopes; + int nscopes = 0; + nscopes = dwarf_getscopes_die (&die, &scopes); + if (nscopes > 1) + callback(function_name.c_str(), file, + (int)dline, &scopes[1], stmt_addr, q); + } + if (dwarf_haschildren (&die) && tag != DW_TAG_structure_type + && tag != DW_TAG_union_type) + { + iterate_over_cu_labels (label_val, &die, q, callback); + } + } + while (dwarf_siblingof (&die, &die) == 0); + } + void collect_srcfiles_matching (string const & pattern, set<char const *> & filtered_srcfiles) @@ -1709,12 +1771,16 @@ struct dwflpp assert (cu); - if (scope_die && pc == 0) - nscopes = dwarf_getscopes_die (scope_die, &scopes); - else - nscopes = dwarf_getscopes (cu, pc, &scopes); + nscopes = dwarf_getscopes (cu, pc, &scopes); + int sidx; + // if pc and scope_die are disjoint then we need dwarf_getscopes_die + for (sidx = 0; sidx < nscopes; sidx++) + if (scopes[sidx].addr == scope_die->addr) + break; + if (sidx == nscopes) + nscopes = dwarf_getscopes_die (scope_die, &scopes); - if (nscopes == 0) + if (nscopes <= 0) { throw semantic_error ("unable to find any scopes containing " + lex_cast_hex<string>(pc) @@ -1773,7 +1839,13 @@ struct dwflpp Dwarf_Op *expr; size_t len; - switch (dwarf_getlocation_addr (attr, pc - module_bias, &expr, &len, 1)) + /* PR9768: formerly, we added pc+module_bias here. However, that bias value + is not present in the pc value by the time we get it, so adding it would + result in false negatives of variable reachibility. In other instances + further below, the c_translate_FOO functions, the module_bias value used + to be passed in, but instead should now be zero for the same reason. */ + + switch (dwarf_getlocation_addr (attr, pc /*+ module_bias*/, &expr, &len, 1)) { case 1: /* Should always happen. */ if (len > 0) @@ -1791,7 +1863,7 @@ struct dwflpp return c_translate_location (pool, &loc2c_error, this, &loc2c_emit_address, - 1, module_bias, + 1, 0 /* PR9768 */, pc, expr, len, tail, fb_attr); } @@ -1876,12 +1948,15 @@ struct dwflpp Dwarf_Die *die_mem, Dwarf_Attribute *attr_mem) { - Dwarf_Die *die = vardie; + Dwarf_Die *die = die_mem; Dwarf_Die struct_die; Dwarf_Attribute temp_attr; unsigned i = 0; + if (vardie) + *die_mem = *vardie; + static unsigned int func_call_level ; static unsigned int dwarf_error_flag ; // indicates current error is dwarf error static unsigned int dwarf_error_count ; // keeps track of no of dwarf errors @@ -1898,7 +1973,6 @@ struct dwflpp obstack_printf (pool, "c->last_stmt = %s;", lex_cast_qstring(piece).c_str()); #endif - die = dwarf_formref_die (attr_mem, die_mem); const int typetag = dwarf_tag (die); switch (typetag) { @@ -1914,13 +1988,13 @@ struct dwflpp // XXX: of course, we should support this the same way C does, // by explicit pointer arithmetic etc. PR4166. - c_translate_pointer (pool, 1, module_bias, die, tail); + c_translate_pointer (pool, 1, 0 /* PR9768*/, die, tail); break; case DW_TAG_array_type: if (components[i].first == target_symbol::comp_literal_array_index) { - c_translate_array (pool, 1, module_bias, die, tail, + c_translate_array (pool, 1, 0 /* PR9768 */, die, tail, NULL, lex_cast<Dwarf_Word>(components[i].second)); ++i; } @@ -1935,7 +2009,7 @@ struct dwflpp struct_die = *die; if (dwarf_hasattr(die, DW_AT_declaration)) { - Dwarf_Die *tmpdie = dwflpp::declaration_resolve(die); + Dwarf_Die *tmpdie = dwflpp::declaration_resolve(dwarf_diename(die)); if (tmpdie == NULL) throw semantic_error ("unresolved struct " + string (dwarf_diename_integrate (die) ?: "<anonymous>")); @@ -2049,6 +2123,7 @@ struct dwflpp /* Now iterate on the type in DIE's attribute. */ if (dwarf_attr_integrate (die, DW_AT_type, attr_mem) == NULL) throw semantic_error ("cannot get type of field: " + string(dwarf_errmsg (-1))); + die = dwarf_formref_die (attr_mem, die_mem); } return die; } @@ -2153,10 +2228,10 @@ struct dwflpp ty = pe_long; if (lvalue) - c_translate_store (pool, 1, module_bias, die, typedie, tail, + c_translate_store (pool, 1, 0 /* PR9768 */, die, typedie, tail, "THIS->value"); else - c_translate_fetch (pool, 1, module_bias, die, typedie, tail, + c_translate_fetch (pool, 1, 0 /* PR9768 */, die, typedie, tail, "THIS->__retvalue"); break; @@ -2183,7 +2258,7 @@ struct dwflpp if (typetag == DW_TAG_array_type) throw semantic_error ("cannot write to array address"); assert (typetag == DW_TAG_pointer_type); - c_translate_pointer_store (pool, 1, module_bias, typedie, tail, + c_translate_pointer_store (pool, 1, 0 /* PR9768 */, typedie, tail, "THIS->value"); } else @@ -2197,10 +2272,10 @@ struct dwflpp ty = pe_long; if (typetag == DW_TAG_array_type) - c_translate_array (pool, 1, module_bias, typedie, tail, NULL, 0); + c_translate_array (pool, 1, 0 /* PR9768 */, typedie, tail, NULL, 0); else - c_translate_pointer (pool, 1, module_bias, typedie, tail); - c_translate_addressof (pool, 1, module_bias, NULL, pointee_typedie, tail, + c_translate_pointer (pool, 1, 0 /* PR9768 */, typedie, tail); + c_translate_addressof (pool, 1, 0 /* PR9768 */, NULL, pointee_typedie, tail, "THIS->__retvalue"); } } @@ -2292,8 +2367,9 @@ struct dwflpp /* Translate the ->bar->baz[NN] parts. */ Dwarf_Die die_mem, *die = NULL; + die = dwarf_formref_die (&attr_mem, &die_mem); die = translate_components (&pool, &tail, pc, components, - &vardie, &die_mem, &attr_mem); + die, &die_mem, &attr_mem); if(!die) { die = dwarf_formref_die (&attr_mem, &vardie); @@ -2363,7 +2439,7 @@ struct dwflpp struct location *head = c_translate_location (&pool, &loc2c_error, this, &loc2c_emit_address, - 1, module_bias, + 1, 0 /* PR9768 */, pc, locops, nlocops, &tail, NULL); @@ -2410,6 +2486,60 @@ struct dwflpp } + string + literal_stmt_for_pointer (Dwarf_Die *type_die, + vector<pair<target_symbol::component_type, + std::string> > const & components, + bool lvalue, + exp_type & ty) + { + if (sess.verbose>2) + clog << "literal_stmt_for_pointer: finding value for " + << (dwarf_diename(type_die) ?: "<unknown>") + << "(" + << (dwarf_diename(cu) ?: "<unknown>") + << ")\n"; + + struct obstack pool; + obstack_init (&pool); + struct location *head = c_translate_argument (&pool, &loc2c_error, this, + &loc2c_emit_address, + 1, "THIS->pointer"); + struct location *tail = head; + + /* Translate the ->bar->baz[NN] parts. */ + + Dwarf_Attribute attr_mem; + Dwarf_Die die_mem, *die = NULL; + die = translate_components (&pool, &tail, 0, components, + type_die, &die_mem, &attr_mem); + if(!die) + { + die = dwarf_formref_die (&attr_mem, &die_mem); + stringstream alternatives; + print_members(die ?: type_die, alternatives); + throw semantic_error("unable to find member for struct " + + string(dwarf_diename(die ?: type_die) ?: "<unknown>") + + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")"))); + } + + + /* Translate the assignment part, either + x = (THIS->pointer)->bar->baz[NN] + or + (THIS->pointer)->bar->baz[NN] = x + */ + + string prelude, postlude; + translate_final_fetch_or_store (&pool, &tail, module_bias, + die, &attr_mem, lvalue, + prelude, postlude, ty); + + /* Write the translation to a string. */ + return express_as_string(prelude, postlude, head); + } + + ~dwflpp() { if (dwfl) @@ -2466,7 +2596,7 @@ struct dwarf_derived_probe: public derived_probe dwarf_builder * dw); static void register_function_and_statement_variants(match_node * root, dwarf_builder * dw); - static void register_patterns(match_node * root); + static void register_patterns(systemtap_session& s); }; @@ -2521,19 +2651,12 @@ public: // Helper struct to thread through the dwfl callbacks. struct base_query { - base_query(systemtap_session & sess, - probe * base_probe, - probe_point * base_loc, - dwflpp & dw, - literal_map_t const & params, - vector<derived_probe *> & results); + base_query(dwflpp & dw, literal_map_t const & params); + base_query(dwflpp & dw, const string & module_val); virtual ~base_query() {} systemtap_session & sess; - probe * base_probe; - probe_point * base_loc; dwflpp & dw; - vector<derived_probe *> & results; // Parameter extractors. static bool has_null_param(literal_map_t const & params, @@ -2555,14 +2678,8 @@ struct base_query }; -base_query::base_query(systemtap_session & sess, - probe * base_probe, - probe_point * base_loc, - dwflpp & dw, - literal_map_t const & params, - vector<derived_probe *> & results) - : sess(sess), base_probe(base_probe), base_loc(base_loc), dw(dw), - results(results) +base_query::base_query(dwflpp & dw, literal_map_t const & params): + sess(dw.sess), dw(dw) { has_kernel = has_null_param (params, TOK_KERNEL); if (has_kernel) @@ -2581,6 +2698,24 @@ base_query::base_query(systemtap_session & sess, assert (has_kernel || has_process || has_module); } +base_query::base_query(dwflpp & dw, const string & module_val) + : sess(dw.sess), dw(dw), module_val(module_val) +{ + // NB: This uses '/' to distinguish between kernel modules and userspace, + // which means that userspace modules won't get any PATH searching. + if (module_val.find('/') == string::npos) + { + has_kernel = (module_val == TOK_KERNEL); + has_module = !has_kernel; + has_process = false; + } + else + { + has_kernel = has_module = false; + has_process = true; + } +} + bool base_query::has_null_param(literal_map_t const & params, string const & k) @@ -2627,6 +2762,10 @@ struct dwarf_query : public base_query literal_map_t const & params, vector<derived_probe *> & results); + vector<derived_probe *> & results; + probe * base_probe; + probe_point * base_loc; + virtual void handle_query_module(); void query_module_dwarf(); void query_module_symtab(); @@ -2910,7 +3049,8 @@ dwarf_query::dwarf_query(systemtap_session & sess, dwflpp & dw, literal_map_t const & params, vector<derived_probe *> & results) - : base_query(sess, base_probe, base_loc, dw, params, results) + : base_query(dw, params), results(results), + base_probe(base_probe), base_loc(base_loc) { // Reduce the query to more reasonable semantic values (booleans, // extracted strings, numbers, etc). @@ -2920,6 +3060,8 @@ dwarf_query::dwarf_query(systemtap_session & sess, has_statement_str = get_string_param(params, TOK_STATEMENT, statement_str_val); has_statement_num = get_number_param(params, TOK_STATEMENT, statement_num_val); + has_label = get_string_param(params, TOK_LABEL, label_val); + has_call = has_null_param(params, TOK_CALL); has_inline = has_null_param(params, TOK_INLINE); has_return = has_null_param(params, TOK_RETURN); @@ -3089,7 +3231,12 @@ dwarf_query::build_blacklist() blfile += "kernel/kprobes.c"; // first alternative, no "|" blfile += "|arch/.*/kernel/kprobes.c"; + // Older kernels need ... blfile += "|include/asm/io.h"; + blfile += "|include/asm/bitops.h"; + // While newer ones need ... + blfile += "|arch/.*/include/asm/io.h"; + blfile += "|arch/.*/include/asm/bitops.h"; blfile += "|drivers/ide/ide-iops.c"; // XXX: it would be nice if these blacklisted functions were pulled @@ -3895,6 +4042,12 @@ query_cu (Dwarf_Die * cudie, void * arg) q->dw.iterate_over_srcfile_lines (*i, q->line, q->has_statement_str, q->line_type, query_srcfile_line, q); } + else if (q->has_label) + { + // If we have a pattern string with target *label*, we + // have to look at labels in all the matched srcfiles. + q->dw.iterate_over_cu_labels (q->label_val, q->dw.cu, q, query_statement); + } else { // Otherwise, simply probe all resolved functions. @@ -4139,22 +4292,22 @@ query_module (Dwfl_Module *mod, } void -dwflpp::query_modules(dwarf_query *q) +dwflpp::query_modules(base_query *q) { iterate_over_modules(&query_module, q); } -struct var_expanding_copy_visitor: public deep_copy_visitor +struct var_expanding_visitor: public update_visitor { static unsigned tick; stack<functioncall**> target_symbol_setter_functioncalls; - var_expanding_copy_visitor() {} + var_expanding_visitor() {} void visit_assignment (assignment* e); }; -struct dwarf_var_expanding_copy_visitor: public var_expanding_copy_visitor +struct dwarf_var_expanding_visitor: public var_expanding_visitor { dwarf_query & q; Dwarf_Die *scope_die; @@ -4164,17 +4317,18 @@ struct dwarf_var_expanding_copy_visitor: public var_expanding_copy_visitor std::map<std::string, symbol *> return_ts_map; bool visited; - dwarf_var_expanding_copy_visitor(dwarf_query & q, Dwarf_Die *sd, Dwarf_Addr a): + dwarf_var_expanding_visitor(dwarf_query & q, Dwarf_Die *sd, Dwarf_Addr a): q(q), scope_die(sd), addr(a), add_block(NULL), add_probe(NULL), visited(false) {} void visit_target_symbol (target_symbol* e); + void visit_cast_op (cast_op* e); }; -unsigned var_expanding_copy_visitor::tick = 0; +unsigned var_expanding_visitor::tick = 0; void -var_expanding_copy_visitor::visit_assignment (assignment* e) +var_expanding_visitor::visit_assignment (assignment* e) { // Our job would normally be to require() the left and right sides // into a new assignment. What we're doing is slightly trickier: @@ -4192,9 +4346,9 @@ var_expanding_copy_visitor::visit_assignment (assignment* e) expression *new_left, *new_right; target_symbol_setter_functioncalls.push (&fcall); - require<expression*> (this, &new_left, e->left); + new_left = require (e->left); target_symbol_setter_functioncalls.pop (); - require<expression*> (this, &new_right, e->right); + new_right = require (e->right); if (fcall != NULL) { @@ -4202,7 +4356,7 @@ var_expanding_copy_visitor::visit_assignment (assignment* e) // and it has been replaced with a set_target_foo() function // call; we are going to provide that function call -- with the // right child spliced in as sole argument -- in place of - // ourselves, in the deep copy we're in the middle of making. + // ourselves, in the var expansion we're in the middle of making. // FIXME: for the time being, we only support plan $foo = bar, // not += or any other op= variant. This is fixable, but a bit @@ -4213,22 +4367,19 @@ var_expanding_copy_visitor::visit_assignment (assignment* e) assert (new_left == fcall); fcall->args.push_back (new_right); - provide <expression*> (this, fcall); + provide (fcall); } else { - assignment* n = new assignment; - n->op = e->op; - n->tok = e->tok; - n->left = new_left; - n->right = new_right; - provide <assignment*> (this, n); + e->left = new_left; + e->right = new_right; + provide (e); } } void -dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) +dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e) { assert(e->base_name.size() > 0 && e->base_name[0] == '$'); visited = true; @@ -4257,7 +4408,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) map<string, symbol *>::iterator i = return_ts_map.find(ts_name); if (i != return_ts_map.end()) { - provide <symbol*> (this, i->second); + provide (i->second); return; } @@ -4515,7 +4666,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) // (4) Provide the '_dwarf_tvar_{name}_{num}_tmp' variable to // our parent so it can be used as a substitute for the target // symbol. - provide <symbol*> (this, tmpsym); + provide (tmpsym); // (5) Remember this replacement since we might be able to reuse // it later if the same return probe references this target @@ -4561,7 +4712,8 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) // Ignore any variable that isn't accessible. tsym->saved_conversion_error = 0; - this->visit_target_symbol(tsym); // NB: throws nothing ... + expression *texp = tsym; + texp = require (texp); // NB: throws nothing ... if (tsym->saved_conversion_error) // ... but this is how we know it happened. { @@ -4570,7 +4722,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) { pf->raw_components += "return"; pf->raw_components += "=%#x "; - pf->args.push_back(*(expression**)this->targets.top()); + pf->args.push_back(texp); } } else @@ -4604,7 +4756,8 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) // Ignore any variable that isn't accessible. tsym->saved_conversion_error = 0; - this->visit_target_symbol(tsym); // NB: throws nothing ... + expression *texp = tsym; + texp = require (texp); // NB: throws nothing ... if (tsym->saved_conversion_error) // ... but this is how we know it happened. { if (q.sess.verbose>2) @@ -4623,14 +4776,14 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) { pf->raw_components += diename; pf->raw_components += "=%#x "; - pf->args.push_back(*(expression**)this->targets.top()); + pf->args.push_back(texp); } } while (dwarf_siblingof (&result, &result) == 0); } pf->components = print_format::string_to_components(pf->raw_components); - provide <print_format*> (this, pf); + provide (pf); return; } @@ -4674,7 +4827,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) // 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 <target_symbol*> (this, e); + 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 @@ -4722,7 +4875,240 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) *(target_symbol_setter_functioncalls.top()) = n; } - provide <functioncall*> (this, n); + provide (n); +} + + +void +dwarf_var_expanding_visitor::visit_cast_op (cast_op *e) +{ + // Fill in our current module context if needed + if (e->module.empty()) + e->module = q.dw.module_name; + + var_expanding_visitor::visit_cast_op(e); +} + + +struct dwarf_cast_query : public base_query +{ + const cast_op& e; + const bool lvalue; + exp_type& pe_type; + + bool resolved; + 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(); + + void handle_query_module(); + int handle_query_cu(Dwarf_Die * cudie); + + static int cast_query_cu (Dwarf_Die * cudie, void * arg); +}; + + +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) + return; + + // look for the type in each CU + dw.iterate_over_cus(cast_query_cu, this); +} + + +int +dwarf_cast_query::handle_query_cu(Dwarf_Die * cudie) +{ + if (resolved) + return DWARF_CB_ABORT; + + dw.focus_on_cu (cudie); + Dwarf_Die* type_die = dw.declaration_resolve(e.type.c_str()); + if (type_die) + { + try + { + code = dw.literal_stmt_for_pointer (type_die, e.components, + lvalue, pe_type); + } + catch (const semantic_error& e) + { + // 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; +} + + +int +dwarf_cast_query::cast_query_cu (Dwarf_Die * cudie, void * arg) +{ + dwarf_cast_query * q = static_cast<dwarf_cast_query *>(arg); + if (pending_interrupts) return DWARF_CB_ABORT; + return q->handle_query_cu(cudie); +} + + +struct dwarf_cast_expanding_visitor: public var_expanding_visitor +{ + systemtap_session& s; + dwarf_builder& db; + + dwarf_cast_expanding_visitor(systemtap_session& s, dwarf_builder& db): + s(s), db(db) {} + void visit_cast_op (cast_op* e); +}; + + +void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) +{ + bool lvalue = is_active_lvalue(e); + if (lvalue && !s.guru_mode) + throw semantic_error("write to typecast value not permitted", e->tok); + + 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 + { + // 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) + { + // kernel or kernel module target + if (! db.kern_dw) + { + db.kern_dw = new dwflpp(s); + db.kern_dw->setup_kernel(true); + } + dw = db.kern_dw; + } + else + { + e->module = find_executable (e->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()) + { + dw = new dwflpp(s); + dw->setup_user(e->module); + db.user_dw[e->module] = dw; + } + else + dw = db.user_dw[e->module]; + } + + dwarf_cast_query q (*dw, *e, lvalue, type); + code = q.get_code(); + } + catch (const semantic_error& er) + { + // We suppress this 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 + // 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; + provide (e); + return; + } + + string fname = (string(lvalue ? "_dwarf_tvar_set" : "_dwarf_tvar_get") + + "_" + e->base_name.substr(1) + + "_" + lex_cast<string>(tick++)); + + // Synthesize a function. + functiondecl *fdecl = new functiondecl; + fdecl->tok = e->tok; + fdecl->type = type; + fdecl->name = fname; + + embeddedcode *ec = new embeddedcode; + ec->tok = e->tok; + ec->code = code; + fdecl->body = ec; + + // Give the fdecl an argument for the pointer we're trying to cast + 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 second 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 */"; + + s.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 + n->args.push_back(e->operand); + + 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); } @@ -4791,11 +5177,11 @@ dwarf_derived_probe::dwarf_derived_probe(const string& funcname, + lex_cast<string>(USHRT_MAX) + "]", q.base_loc->tok); - // Make a target-variable-expanded copy of the probe body + // Expand target variables in the probe body if (!null_die(scope_die)) { - dwarf_var_expanding_copy_visitor v (q, scope_die, dwfl_addr); - require <statement*> (&v, &(this->body), this->body); + dwarf_var_expanding_visitor v (q, scope_die, dwfl_addr); + this->body = v.require (this->body); this->access_vars = v.visited; // If during target-variable-expanding the probe, we added a new block @@ -4913,13 +5299,19 @@ dwarf_derived_probe::register_function_and_statement_variants(match_node * root, } void -dwarf_derived_probe::register_patterns(match_node * root) +dwarf_derived_probe::register_patterns(systemtap_session& s) { + match_node* root = s.pattern_root; dwarf_builder *dw = new dwarf_builder(); + update_visitor *filter = new dwarf_cast_expanding_visitor(s, *dw); + s.code_filters.push_back(filter); + register_function_and_statement_variants(root->bind(TOK_KERNEL), dw); register_function_and_statement_variants(root->bind_str(TOK_MODULE), dw); root->bind(TOK_KERNEL)->bind_num(TOK_STATEMENT)->bind(TOK_ABSOLUTE)->bind(dw); + root->bind(TOK_KERNEL)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL)->bind(dw); + root->bind_str(TOK_PROCESS)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL)->bind(dw); register_function_and_statement_variants(root->bind_str(TOK_PROCESS), dw); root->bind_str(TOK_PROCESS)->bind_str(TOK_MARK)->bind(dw); @@ -4978,7 +5370,7 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) // NB: we used to plop a union { struct kprobe; struct kretprobe } into // struct stap_dwarf_probe, but it being initialized data makes it add // hundreds of bytes of padding per stap_dwarf_probe. (PR5673) - s.op->newline() << "struct stap_dwarf_kprobe {"; + s.op->newline() << "static struct stap_dwarf_kprobe {"; s.op->newline(1) << "union { struct kprobe kp; struct kretprobe krp; } u;"; s.op->newline() << "#ifdef __ia64__"; s.op->newline() << "struct kprobe dummy;"; @@ -4986,7 +5378,7 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(-1) << "} stap_dwarf_kprobes[" << probes_by_module.size() << "];"; // NB: bss! - s.op->newline() << "struct stap_dwarf_probe {"; + s.op->newline() << "static struct stap_dwarf_probe {"; s.op->newline(1) << "const unsigned return_p:1;"; s.op->newline() << "const unsigned maxactive_p:1;"; s.op->newline() << "unsigned registered_p:1;"; @@ -5301,30 +5693,39 @@ dwarf_builder::build(systemtap_session & sess, { enum probe_types { - no_debuginfo = 0, - use_debuginfo = 1 + probes_and_dwarf = 0, // Use statement address + dwarf_no_probes = 1, // Use label name + probes_no_dwarf = 2 }; -// location->components[0]->arg = new literal_string(sess.cmd); -// ((literal_map_t&)parameters)[location->components[0]->functor] = location->components[0]->arg; + int probe_type = dwarf_no_probes; + string probe_name = (char*) location->components[1]->arg->tok->content.c_str(); + __uint64_t probe_arg = 0; Dwarf_Addr bias; Elf* elf = dwfl_module_getelf (dw->module, &bias); size_t shstrndx; - Elf_Scn *probe_scn = NULL; + bool probe_found = false; + dwfl_assert ("getshstrndx", elf_getshstrndx (elf, &shstrndx)); - __uint64_t probe_arg = 0; - int probe_type = no_debuginfo; - char *probe_name; - // Find the .probes section where the static probe label and arg are stored + GElf_Shdr *shdr = NULL; + + // Is there a .probes section? while ((probe_scn = elf_nextscn (elf, probe_scn))) { GElf_Shdr shdr_mem; - GElf_Shdr *shdr = gelf_getshdr (probe_scn, &shdr_mem); + shdr = gelf_getshdr (probe_scn, &shdr_mem); assert (shdr != NULL); - if (strcmp (elf_strptr (elf, shstrndx, shdr->sh_name), ".probes") != 0) - continue; + if (strcmp (elf_strptr (elf, shstrndx, shdr->sh_name), ".probes") == 0) + { + probe_type = probes_and_dwarf; + break; + } + } + + if (probe_type == probes_and_dwarf) + { Elf_Data *pdata = elf_getdata_rawchunk (elf, shdr->sh_offset, shdr->sh_size, ELF_T_BYTE); assert (pdata != NULL); size_t probe_scn_offset = 0; @@ -5342,95 +5743,35 @@ 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)); - // pdata->d_buf + *(long*)(pdata->d_buf + probe_scn_offset) - probe_scn_addr probe_name = ((char*)((long)(pdata->d_buf) + (long)(*((int*)((long)pdata->d_buf + probe_scn_offset)) - probe_scn_addr))); probe_scn_offset += sizeof(void*); 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) == 0) - 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 (probe_scn_offset < pdata->d_size) - break; - } - - if (probe_type == no_debuginfo) - { - // Many probe labels correspond to _stap_probe_N - // Generate: _probe_string = user_string($probe); - block *b = ((block*)(base->body)); - assignment *as = new assignment; - symbol* lsym = new symbol; - lsym->type = pe_string; - lsym->name = "_probe_string"; - lsym->tok = base->body->tok; - as->left = lsym; - as->op = "="; - functioncall *fc = new functioncall; - fc->function = "user_string"; - fc->tok = base->body->tok; - target_symbol* rsym = new target_symbol; - rsym->base_name = "$probe"; - rsym->tok = base->body->tok; - fc->args.push_back(rsym); - as->right = fc; - expr_statement* es = new expr_statement; - es->value = as; - - // Generate: if (_probe_string != mark("label")) next; - if_statement *is = new if_statement; - is->thenblock = new next_statement; - is->elseblock = NULL; - is->tok = base->body->tok; - comparison *be = new comparison; - be->op = "!="; - be->tok = base->body->tok; - be->left = lsym; - be->right = new literal_string(location->components[1]->arg->tok->content);; - is->condition = be; - - b->statements.insert(b->statements.begin(),(statement*) is); - b->statements.insert(b->statements.begin(),(statement*) es); - } - - Dwarf *dwarf = dwfl_module_getdwarf(dw->module, &dw->module_bias); - Dwarf_Off off; - size_t cuhl; - Dwarf_Off noff = 0; - const char *probe_file = "@sduprobes.c"; - // Find where the probe instrumentation landing points are defined - while (dwarf_nextcu (dwarf, off = noff, &noff, &cuhl, NULL, NULL, NULL) == 0) - { - Dwarf_Die cudie_mem; - Dwarf_Die *cudie = dwarf_offdie (dwarf, off + cuhl, &cudie_mem); - if (cudie == NULL) - continue; - if (probe_type == no_debuginfo) - { - if (strncmp (dwarf_diename(&cudie_mem), "sduprobes", 9) == 0) + 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)); } + 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; } - location->components[1]->functor = TOK_STATEMENT; - if (probe_type == no_debuginfo) - { - string probe_arg_str = string(1,'0' + probe_arg); - location->components[1]->arg - = new literal_string("_stap_probe_" - + (probe_arg_str) - + probe_file + "+1"); - } - else + + if (probe_type == dwarf_no_probes || ! probe_found) { - location->components[1]->arg = new literal_number((int)probe_arg); + location->components[1]->functor = TOK_FUNCTION; + location->components[1]->arg = new literal_string("*"); + ((literal_map_t&)parameters)[TOK_FUNCTION] = location->components[1]->arg; + location->components.push_back(new probe_point::component(TOK_LABEL)); + location->components[2]->arg = new literal_string("_stapprobe1_" + probe_name); + ((literal_map_t&)parameters).erase(TOK_MARK); + ((literal_map_t&)parameters).insert(pair<string,literal*>(TOK_LABEL, location->components[2]->arg)); } - ((literal_map_t&)parameters)[TOK_STATEMENT] = location->components[1]->arg; dw->module = 0; } @@ -6058,7 +6399,7 @@ itrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(-1) << "return rc;"; s.op->newline(-1) << "}"; - s.op->newline() << "struct stap_itrace_probe stap_itrace_probes[] = {"; + s.op->newline() << "static struct stap_itrace_probe stap_itrace_probes[] = {"; s.op->indent(1); // Set up 'process(PATH)' probes @@ -6178,10 +6519,10 @@ public: }; -struct utrace_var_expanding_copy_visitor: public var_expanding_copy_visitor +struct utrace_var_expanding_visitor: public var_expanding_visitor { - utrace_var_expanding_copy_visitor(systemtap_session& s, const string& pn, - enum utrace_derived_probe_flags f): + utrace_var_expanding_visitor(systemtap_session& s, const string& pn, + enum utrace_derived_probe_flags f): sess (s), probe_name (pn), flags (f), target_symbol_seen (false) {} systemtap_session& sess; @@ -6204,9 +6545,9 @@ utrace_derived_probe::utrace_derived_probe (systemtap_session &s, has_path(hp), path(pn), pid(pd), flags(f), target_symbol_seen(false) { - // Make a local-variable-expanded copy of the probe body - utrace_var_expanding_copy_visitor v (s, name, flags); - require <statement*> (&v, &(this->body), base->body); + // Expand local variables in the probe body + utrace_var_expanding_visitor v (s, name, flags); + this->body = v.require (this->body); target_symbol_seen = v.target_symbol_seen; // Reset the sole element of the "locations" vector as a @@ -6268,7 +6609,7 @@ utrace_derived_probe::join_group (systemtap_session& s) void -utrace_var_expanding_copy_visitor::visit_target_symbol_arg (target_symbol* e) +utrace_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e) { string argnum_s = e->base_name.substr(4,e->base_name.length()-4); int argnum = lex_cast<int>(argnum_s); @@ -6317,11 +6658,11 @@ utrace_var_expanding_copy_visitor::visit_target_symbol_arg (target_symbol* e) num->tok = e->tok; n->args.push_back(num); - provide <functioncall*> (this, n); + provide (n); } void -utrace_var_expanding_copy_visitor::visit_target_symbol_context (target_symbol* e) +utrace_var_expanding_visitor::visit_target_symbol_context (target_symbol* e) { string sname = e->base_name; @@ -6368,11 +6709,11 @@ utrace_var_expanding_copy_visitor::visit_target_symbol_context (target_symbol* e n->function = fname; n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session - provide <functioncall*> (this, n); + provide (n); } void -utrace_var_expanding_copy_visitor::visit_target_symbol (target_symbol* e) +utrace_var_expanding_visitor::visit_target_symbol (target_symbol* e) { assert(e->base_name.size() > 0 && e->base_name[0] == '$'); @@ -6622,7 +6963,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", true, true, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); s.op->newline() << "c->probe_point = p->pp;"; // call probe function @@ -6798,7 +7139,7 @@ utrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "return rc;"; s.op->newline(-1) << "}"; - s.op->newline() << "struct stap_utrace_probe stap_utrace_probes[] = {"; + s.op->newline() << "static struct stap_utrace_probe stap_utrace_probes[] = {"; s.op->indent(1); // Set up 'process(PATH)' probes @@ -6927,11 +7268,11 @@ uprobe_derived_probe::uprobe_derived_probe (const string& function, this->tok = q.base_probe->tok; - // Make a target-variable-expanded copy of the probe body + // Expand target variables in the probe body if (!null_die(scope_die)) { - dwarf_var_expanding_copy_visitor v (q, scope_die, dwfl_addr); // XXX: user-space deref's! - require <statement*> (&v, &(this->body), this->body); + dwarf_var_expanding_visitor v (q, scope_die, dwfl_addr); // XXX: user-space deref's! + this->body = v.require (this->body); // If during target-variable-expanding the probe, we added a new block // of code, add it to the start of the probe. @@ -7090,13 +7431,13 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s) // In .bss, the shared pool of uprobe/uretprobe structs. These are // too big to embed in the initialized .data stap_uprobe_spec array. - s.op->newline() << "struct stap_uprobe {"; + s.op->newline() << "static struct stap_uprobe {"; s.op->newline(1) << "union { struct uprobe up; struct uretprobe urp; };"; s.op->newline() << "int spec_index;"; // index into stap_uprobe_specs; <0 == free && unregistered s.op->newline(-1) << "} stap_uprobes [MAXUPROBES];"; s.op->newline() << "DEFINE_MUTEX(stap_uprobes_lock);"; // protects against concurrent registration/unregistration - s.op->newline() << "struct stap_uprobe_spec {"; + s.op->newline() << "static struct stap_uprobe_spec {"; s.op->newline(1) << "struct stap_task_finder_target finder;"; s.op->newline() << "unsigned long address;"; s.op->newline() << "const char *pathname;"; @@ -7441,7 +7782,7 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "/* ---- timer probes ---- */"; - s.op->newline() << "struct stap_timer_probe {"; + s.op->newline() << "static struct stap_timer_probe {"; s.op->newline(1) << "struct timer_list timer_list;"; s.op->newline() << "const char *pp;"; s.op->newline() << "void (*ph) (struct context*);"; @@ -7471,7 +7812,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", true, true, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); s.op->newline() << "c->probe_point = stp->pp;"; s.op->newline() << "(*stp->ph) (c);"; common_probe_entryfn_epilogue (s.op); @@ -7613,7 +7954,7 @@ profile_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)"; // == using_rpn of yore - s.op->newline() << "int enter_profile_probes (struct notifier_block *self," + s.op->newline() << "static int enter_profile_probes (struct notifier_block *self," << " unsigned long val, void *data) {"; s.op->newline(1) << "(void) self; (void) val;"; s.op->newline() << "enter_all_profile_probes ((struct pt_regs *) data);"; @@ -7624,7 +7965,7 @@ profile_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "#else"; - s.op->newline() << "int enter_profile_probes (struct pt_regs *regs) {"; + s.op->newline() << "static int enter_profile_probes (struct pt_regs *regs) {"; s.op->newline(1) << "enter_all_profile_probes (regs);"; s.op->newline() << "return 0;"; s.op->newline(-1) << "}"; @@ -7711,10 +8052,10 @@ public: }; -struct procfs_var_expanding_copy_visitor: public var_expanding_copy_visitor +struct procfs_var_expanding_visitor: public var_expanding_visitor { - procfs_var_expanding_copy_visitor(systemtap_session& s, const string& pn, - string path, bool write_probe): + procfs_var_expanding_visitor(systemtap_session& s, const string& pn, + string path, bool write_probe): sess (s), probe_name (pn), path (path), write_probe (write_probe), target_symbol_seen (false) {} @@ -7732,9 +8073,9 @@ procfs_derived_probe::procfs_derived_probe (systemtap_session &s, probe* p, probe_point* l, string ps, bool w): derived_probe(p, l), path(ps), write(w), target_symbol_seen(false) { - // Make a local-variable-expanded copy of the probe body - procfs_var_expanding_copy_visitor v (s, name, path, write); - require <statement*> (&v, &(this->body), base->body); + // Expand local variables in the probe body + procfs_var_expanding_visitor v (s, name, path, write); + this->body = v.require (this->body); target_symbol_seen = v.target_symbol_seen; } @@ -7791,9 +8132,10 @@ procfs_derived_probe_group::emit_module_decls (systemtap_session& s) return; s.op->newline() << "/* ---- procfs probes ---- */"; + s.op->newline() << "#include \"procfs.c\""; // Emit the procfs probe data list - s.op->newline() << "struct stap_procfs_probe {"; + s.op->newline() << "static struct stap_procfs_probe {"; s.op->newline(1)<< "const char *path;"; s.op->newline() << "const char *read_pp;"; s.op->newline() << "void (*read_ph) (struct context*);"; @@ -7850,7 +8192,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", true, true, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); s.op->newline() << "c->probe_point = spp->read_pp;"; s.op->newline() << "if (c->data == NULL)"; @@ -7893,7 +8235,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", true, true, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); s.op->newline() << "c->probe_point = spp->write_pp;"; s.op->newline() << "if (count > (MAXSTRINGLEN - 1))"; @@ -7983,7 +8325,7 @@ procfs_derived_probe_group::emit_module_exit (systemtap_session& s) void -procfs_var_expanding_copy_visitor::visit_target_symbol (target_symbol* e) +procfs_var_expanding_visitor::visit_target_symbol (target_symbol* e) { assert(e->base_name.size() > 0 && e->base_name[0] == '$'); @@ -8068,7 +8410,7 @@ procfs_var_expanding_copy_visitor::visit_target_symbol (target_symbol* e) *(target_symbol_setter_functioncalls.top()) = n; } - provide <functioncall*> (this, n); + provide (n); } @@ -8187,11 +8529,10 @@ public: }; -struct mark_var_expanding_copy_visitor: public var_expanding_copy_visitor +struct mark_var_expanding_visitor: public var_expanding_visitor { - mark_var_expanding_copy_visitor(systemtap_session& s, - const string& pn, - vector <struct mark_arg *> &mark_args): + mark_var_expanding_visitor(systemtap_session& s, const string& pn, + vector <struct mark_arg *> &mark_args): sess (s), probe_name (pn), mark_args (mark_args), target_symbol_seen (false) {} systemtap_session& sess; @@ -8242,7 +8583,7 @@ hex_dump(unsigned char *data, size_t len) void -mark_var_expanding_copy_visitor::visit_target_symbol_arg (target_symbol* e) +mark_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e) { string argnum_s = e->base_name.substr(4,e->base_name.length()-4); int argnum = atoi (argnum_s.c_str()); @@ -8303,12 +8644,12 @@ mark_var_expanding_copy_visitor::visit_target_symbol_arg (target_symbol* e) n->tok = e->tok; n->function = fname; n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session - provide <functioncall*> (this, n); + provide (n); } void -mark_var_expanding_copy_visitor::visit_target_symbol_context (target_symbol* e) +mark_var_expanding_visitor::visit_target_symbol_context (target_symbol* e) { string sname = e->base_name; @@ -8345,11 +8686,11 @@ mark_var_expanding_copy_visitor::visit_target_symbol_context (target_symbol* e) n->tok = e->tok; n->function = fname; n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session - provide <functioncall*> (this, n); + provide (n); } void -mark_var_expanding_copy_visitor::visit_target_symbol (target_symbol* e) +mark_var_expanding_visitor::visit_target_symbol (target_symbol* e) { assert(e->base_name.size() > 0 && e->base_name[0] == '$'); @@ -8382,9 +8723,9 @@ mark_derived_probe::mark_derived_probe (systemtap_session &s, // expand the marker format parse_probe_format(); - // Now make a local-variable-expanded copy of the probe body - mark_var_expanding_copy_visitor v (sess, name, mark_args); - require <statement*> (&v, &(this->body), base->body); + // Now expand the local variables in the probe body + mark_var_expanding_visitor v (sess, name, mark_args); + this->body = v.require (this->body); target_symbol_seen = v.target_symbol_seen; if (sess.verbose > 2) @@ -8627,7 +8968,7 @@ mark_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "/* ---- marker probes ---- */"; - s.op->newline() << "struct stap_marker_probe {"; + s.op->newline() << "static struct stap_marker_probe {"; s.op->newline(1) << "const char * const name;"; s.op->newline() << "const char * const format;"; s.op->newline() << "const char * const pp;"; @@ -8655,7 +8996,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", true, true, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); s.op->newline() << "c->probe_point = smp->pp;"; s.op->newline() << "c->marker_name = smp->name;"; s.op->newline() << "c->marker_format = smp->format;"; @@ -8838,7 +9179,6 @@ mark_builder::build(systemtap_session & sess, it->first, it->second, base, loc); finished_results.push_back (dp); - sess.unwindsym_modules.insert ("kernel"); } } } @@ -8934,8 +9274,8 @@ hrtimer_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "/* ---- hrtimer probes ---- */"; - s.op->newline() << "unsigned long stap_hrtimer_resolution;"; // init later - s.op->newline() << "struct stap_hrtimer_probe {"; + s.op->newline() << "static unsigned long stap_hrtimer_resolution;"; // init later + s.op->newline() << "static struct stap_hrtimer_probe {"; s.op->newline(1) << "struct hrtimer hrtimer;"; s.op->newline() << "const char *pp;"; s.op->newline() << "void (*ph) (struct context*);"; @@ -8985,7 +9325,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", true, true, true); + common_probe_entryfn_prologue (s.op, "STAP_SESSION_RUNNING"); s.op->newline() << "c->probe_point = stp->pp;"; s.op->newline() << "(*stp->ph) (c);"; common_probe_entryfn_epilogue (s.op); @@ -9041,7 +9381,7 @@ struct timer_builder: public derived_probe_builder literal_map_t const & parameters, vector<derived_probe *> & finished_results); - static void register_patterns(match_node *root); + static void register_patterns(systemtap_session& s); }; void @@ -9112,8 +9452,9 @@ timer_builder::build(systemtap_session & sess, } void -timer_builder::register_patterns(match_node *root) +timer_builder::register_patterns(systemtap_session& s) { + match_node* root = s.pattern_root; derived_probe_builder *builder = new timer_builder(); root = root->bind(TOK_TIMER); @@ -9153,18 +9494,18 @@ timer_builder::register_patterns(match_node *root) // -struct perfmon_var_expanding_copy_visitor: public var_expanding_copy_visitor +struct perfmon_var_expanding_visitor: public var_expanding_visitor { systemtap_session & sess; unsigned counter_number; - perfmon_var_expanding_copy_visitor(systemtap_session & s, unsigned c): + perfmon_var_expanding_visitor(systemtap_session & s, unsigned c): sess(s), counter_number(c) {} void visit_target_symbol (target_symbol* e); }; void -perfmon_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) +perfmon_var_expanding_visitor::visit_target_symbol (target_symbol *e) { assert(e->base_name.size() > 0 && e->base_name[0] == '$'); @@ -9218,7 +9559,7 @@ perfmon_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) n->function = fname; n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session - provide <functioncall*> (this, n); + provide (n); } @@ -9286,9 +9627,9 @@ perfmon_derived_probe::perfmon_derived_probe (probe* p, probe_point* l, { ++probes_allocated; - // Now make a local-variable-expanded copy of the probe body - perfmon_var_expanding_copy_visitor v (sess, probes_allocated-1); - require <statement*> (&v, &(this->body), base->body); + // Now expand the local variables in the probe body + perfmon_var_expanding_visitor v (sess, probes_allocated-1); + this->body = v.require (this->body); if (sess.verbose > 1) clog << "perfmon-based probe" << endl; @@ -9581,13 +9922,13 @@ register_standard_tapsets(systemtap_session & s) s.pattern_root->bind(TOK_NEVER)->bind(new never_builder()); - timer_builder::register_patterns(s.pattern_root); + timer_builder::register_patterns(s); s.pattern_root->bind(TOK_TIMER)->bind("profile")->bind(new profile_builder()); s.pattern_root->bind("perfmon")->bind_str("counter") ->bind(new perfmon_builder()); // dwarf-based kprobe/uprobe parts - dwarf_derived_probe::register_patterns(s.pattern_root); + dwarf_derived_probe::register_patterns(s); // XXX: user-space starter set s.pattern_root->bind_num(TOK_PROCESS) @@ -9688,3 +10029,5 @@ all_session_groups(systemtap_session& s) #undef DOONE return g; } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -20,3 +20,5 @@ std::vector<derived_probe_group*> all_session_groups(systemtap_session& s); #endif // TAPSETS_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog deleted file mode 100644 index 49ff7b95..00000000 --- a/testsuite/ChangeLog +++ /dev/null @@ -1,2017 +0,0 @@ -2008-12-15 Mark Wielaard <mjw@redhat.com> - - * systemtap.context/usymbols.c: Call helper library. - * systemtap.context/usymbols_lib.c: New file. - * systemtap.context/usymbols.exp: Compile and use helper library. - -2008-12-10 Mark Wielaard <mjw@redhat.com> - - * systemtap.context/usymbols.c: New test program. - * systemtap.context/usymbols.exp: New dejagnu test. - -2009-01-22 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp: Test dtrace. - -2009-01-20 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp: Don't test -lsduprobes. - -2009-01-20 Wenji Huang <wenji.huang@oracle.com> - - * systemtap.base/bz5274.exp: Add checking utrace. - * systemtap.base/bz6850.exp: Ditto. - * systemtap.base/static_uprobes.exp: Ditto. - * systemtap.base/uprobes.exp: Ditto. - -2009-01-13 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp: Use sdt.h - -2009-01-11 Wenji Huang <wenji.huang@oracle.com> - - * systemtap.base/badkprobe.exp: Add explicit timeout. - -2009-01-09 Dave Brolley <brolley@redhat.com> - - * lib/systemtap.exp: Remove ssl_server_path and ssl_client_path. - -2009-01-06 Frank Ch. Eigler <fche@elastic.org> - - PR 9699: - * systemtap.context/backtrace.tcl: Correct tcl syntax in fail message. - -2008-12-24 Dave Brolley <brolley@redhat.com> - - * lib/systemtap.exp: Rename client_path to net_path. - (setup_systemtap_environment): Set ssl_server_path and - ssl_client_path. Pass ssl_server_path to stap-find-or-start-server. - -2008-12-21 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp: Parms now called $argN - -2008-12-16 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp: Generate our own probes file. - -2008-12-09 Frank Ch. Eigler <fche@elastic.org> - - PR6961. - * systemtap.base/backtrace.{exp,stp}: New files. - * systemtap.base/marker.exp: Modified to trigger backtrace. - -2008-12-04 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp (STAP_PROBE_START): Remove. - -2008-12-03 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/debugpath.exp: Correct test case for new -r behavior. - -2008-12-02 Wenji Huang <wenji.huang@oracle.com> - PR7053. - * systemtap.base/global_stat.exp: New test. - -2008-11-29 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/uprobes.exp: Simplify -p5 test. - -2008-11-29 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/static_uprobes.exp: Simplified pass/fail messages. - -2008-11-28 Frank Ch. Eigler <fche@elastic.org> - - PR5376. - * parseko/twentysix: New test. - -2008-11-26 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp: Check debuginfo static uprobes. - * systemtap.base/static_uprobes.stp: Check debuginfo static uprobes. - -2008-11-21 Frank Ch. Eigler <fche@elastic.org> - - PR5689. - * systemtap.base/skipped.exp: New test. - -2008-11-19 Jim Keniston <jkenisto@us.ibm.com> - - * systemtap.context/num_args.stp: Added s390x case. - -2008-11-18 Frank Ch. Eigler <fche@elastic.org> - - PR6925. - * systemtap.base/cmd_parse.exp: Add --vp test. - -2008-11-11 Stan Cox <scox@redhat.com> - - * systemtap.base/static_uprobes.exp: New file. - * systemtap.base/static_uprobes.stp: New file. - -2008-11-13 Mark Wielaard <mjw@redhat.com> - - * systemtap.base/bz6850.exp: Pick up the stap being tested when - executing under sudo. - * systemtap.base/uprobes.exp: Likewise. - -2008-11-12 Frank Ch. Eigler <fche@elastic.org> - - PR6964. - * systemtap.base/cmd_parse.exp: Remove exit() hack. - -2008-11-12 David Smith <dsmith@redhat.com> - - * systemtap.context/num_args.tcl: Improved error handling of - testcase. - -2008-11-03 Wenji Huang <wenji.huang@oracle.com> - - * systemtap.base/cmd_parse.exp: Add exit() to probe. - -2008-10-29 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/vars.exp: Remove "2>&1" that left turds behind. - -2008-10-28 Frank Ch. Eigler <fche@elastic.org> - - From Srikar Dronamraju <srikar@linux.vnet.ibm.com>: - * systemtap.base/bz5274.*: New tests. - -2008-10-28 David Smith <dsmith@redhat.com> - - * buildok/vfs_testcase.stp: Fixes for updated vfs tapset. - -2008-10-28 Wenji Huang <wenji.huang@oracle.com> - - * buildok/context_test.stp: Correct for 2.6.28. - * buildok/ioblock_test.stp: Ditto. - -2008-10-27 Josh Stone <joshua.i.stone@intel.com> - - * systemtap.printf/char1.stp: Expose i686 failure - -2008-10-27 Rajan Arora <rarora@redhat.com> - - * systemtap.base/global_end.exp: Spawn global_end2.stp - -2008-10-20 Elliott Baron <ebaron@redhat.com> - - PR6851 - * systemtap.printf/char1.exp: New test. - -2008-10-10 Frank Ch. Eigler <fche@elastic.org> - - PR6749. - * systemtap.base/badkprobe.exp: New test. - -2008-10-09 Mark Wielaard <mjw@redhat.com> - - * systemtap.base/uprobes.exp: Cleanup generated files. - -2008-10-09 Rajan Arora <rarora@redhat.com> - - * systemtap.base/warnings.exp: Allow for source: lines. - * parseko/source_context.stp: New file. - -2008-10-04 Mark Wielaard <mjw@redhat.com> - - * systemtap.base/debugpath.exp: Guess a bit more intelligently - where debuginfo is installed. - -2008-10-03 Mark Wielaard <mjw@redhat.com> - - * systemtap.base/global_end.exp: Adjust expected foreach ordering. - -2008-10-01 Mark Wielaard <mjw@redhat.com> - - * semok/thirtythree.stp: Use page->mapping instead of page->inuse - as annonymous struct value (also available in older kernels). - -2008-09-26 Frank Ch. Eigler <fche@elastic.org> - - PR 6916. - * systemtap.base/alternatives.exp: Assert error counts. - -2008-09-15 Mark Wielaard <mjw@redhat.com> - - * buildok/seventeen.stp: Fix 2.6.27 detection. - * testsuite/buildok/seven.stp: Likewise. - -2008-09-12 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/uprobes.stp: Use printf in case pp() is long enough - to overflow MAXSTRINGLEN. - -2008-09-11 David Smith <dsmith@redhat.com> - - * lib/stap_run.exp: Ignore new warning. - -2008-09-11 Frank Ch. Eigler <fche@elastic.org> - - PR 6871. - * systemtap.base/uprobes.*: Energize. - -2008-09-10 Josh Stone <joshua.i.stone@intel.com> - - * systemtap.base/probe_list.exp: New test for correct probe listing. - -2008-09-09 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/uprobes.*: Tweak regexps for read-only src tree - tolerance. - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * buildok/per-process-syscall.stp: New test, for process.syscall test. - * semko/utrace15.stp: Ditto. - * semko/utrace16.stp: Ditto. - * semko/utrace17.stp: Ditto. - * semko/utrace18.stp: Ditto. - * semko/utrace19.stp: Ditto. - * semko/utrace20.stp: Ditto. - * semko/utrace21.stp: Ditto. - * semko/utrace22.stp: Ditto. - -2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> - - * systemtap.base/marker.exp : Added testcases of $name. - -2008-09-06 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/cmd_parse.exp: Adapt to sh-c-less "stap -c" - execution. - -2008-09-05 Stan Cox <scox@redhat.com> - - * systemtap.base/global_end.stp: Also check scalar statistics. - * systemtap.base/global_end.exp: Likeewise. - -2008-09-05 Frank Ch. Eigler <fche@elastic.org> - - PR 4255. - * systemtap.base/uprobes.{exp,stp}: New file. - -2008-09-05 Wenji Huang <wenji.huang@oracle.com> - - * systemtap.base/cmd_parse.stp: Add test for "-L" option. - -2008-09-01 Stan Cox <scox@redhat.com> - - * systemtap.base/global_end.stp: Also check statistics. - * systemtap.base/global_end.exp: Likewise. - -2008-08-29 David Smith <dsmith@redhat.com> - - PR6841 - * systemtap.base/utrace_p5.exp: Added system-wide syscall test for - bug 6841 fix. - -2008-08-27 Stan Cox <scox@redhat.com> - - * systemtap.base/global_end.exp: New. - * systemtap.base/global_end.stp: New. - * systemtap.base/bench.exp: Bump up ok. - * systemtap.base/optim_arridx.exp: Consider unread globals. - * systemtap.base/optim_arridx.stp: Fix typos. - -2008-08-27 Wenji Huang <wenji.huang@oracle.com> - - * semok/nodwf02.stp: Make syscall.q* optional. - * semok/nodwf05.stp: Ditto. - -2008-08-25 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (AUTOMAKE_OPTIONS): Add no-dist. Remove dist-related - targets. - * Makefile.in: Regenerated. - -2008-08-25 Mark Wielaard <mjw@redhat.com> - - * Makefile.am (EXTRA_DIST): html_footer.tmpl, systemtapcorner.gif, - systemtaplogo.png, html_header.tmpl and systemtap.css moved to html - subdir. - * Makefile.in, aclocal.m4: Regenerated. - -2008-08-25 Dave Brolley <brolley@redhat.com> - - * systemtap.base/warnings.exp: Allow 30 seconds for completion. - * Makefile.in: Regenerated. - -2008-08-22 Wenji Huang <wenji.huang@oracle.com> - - * buildok/process-all-probes.stp: Change system-wide probes to detailed ones to avoid including user space ones. - -2008-08-15 David Smith <dsmith@redhat.com> - - * systemtap.base/utrace_p4.exp: Change system-wide probes from - 'process("*").begin' to 'process.begin'. - -2008-08-13 Dave Brolley <brolley@redhat.com> - - * lib/systemtap.exp (setup_systemtap_environment): client_path is now - global. - (systemtap_exit): Remove the directory named by $client_path. - -2008-08-12 David Smith <dsmith@redhat.com> - - PR 6445 (partial) - * systemtap.base/utrace_p4.exp: Added test that probes all threads. - * semko/utrace14.stp: New test. - -2008-08-11 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/vars.exp: Adjust to loss of "\n" at end of $$vars - et al. - -2008-08-11 Frank Ch. Eigler <fche@elastic.org> - - PR5049 - * semok/thirtyone.stp: New test. - -2008-08-08 Dave Brolley <brolley@redhat.com> - - * lib/systemtap.exp (setup_systemtap_environment): If use_server_p, - start or find a systemtap server. - (systemtap_exit): If we started a server, stop it. - * Makefile.am (EXTRA_SYSTEMTAP_PATH): Removed. - (EXTRA_TOOL_OPTS): Removed. - * Makefile.in: Regenerated. - -2008-08-08 Stan Cox <scox@redhat.com> - - * systemtap.base/stmt_rel.stp: Lower wildcard matching count. - -2008-08-07 David Smith <dsmith@redhat.com> - - * systemtap.base/utrace_p4.exp: Uses lib/stap_compile.exp instead - of its own stap_compile procedure. - * systemtap.base/cache.exp (stap_compile): Ignores warnings. - * lib/stap_compile.exp: Ignores warnings. - -2008-08-05 Mark Wielaard <mwielaard@redhat.com> - - * systemtap.examples/README: Add meta file tag descriptions. - -2008-08-05 Stan Cox <scox@redhat.com> - - * systemtap.base/warnings.stp: Use relative instead of absolute line. - * systemtap.base/vars.exp: New test. - -2008-08-03 Wenji Huang <wenji.huang@oracle.com> - - * buildok/seven.stp: Correct for 2.6.27. - * buildok/seventeen.stp: Ditto. - -2008-07-29 Dave Brolley <brolley@redhat.com> - - * Makefile.am (SYSTEMTAP_PATH): Add $(EXTRA_SYSTEMTAP_PATH). - * lib/stap_compile.exp: Revert previous change. - * lib/stap_run.exp: Likewise. - * lib/stap_run2.exp: Likewise. - * lib/stap_run_binary.exp: Likewise. - * lib/stap_run_exact.exp: Likewise. - * lib/systemtap.exp (stap_exec): Removed. - * Makefile.in: Regenerated. - -2008-07-24 Dave Nomura <dcnltc@us.ibm.com> - - * systemtap.base/itrace.stp: Added simple tests of itrace probe. - -2008-07-14 Dave Brolley <brolley@redhat.com> - - * Makefile.am (TOOL_OPTS): New variable. - (installcheck): Add $(TOOL_OPTS) to --tool_opts. - (RUNTESTDEFAULTFLAGS): Likewise. - * Makefile.in: Regenerated. - * lib/systemtap.exp (installtest_p): Look for 'install' as a substring - of $TOOL_OPTIONS. - (use_server_p): New proc. - (stap_exec): New proc. - * lib/stap_compile.exp: Use [stap_exec] to call systemtap. - * lib/stap_run.exp: Likewise. - * lib/stap_run2.exp: Likewise. - * lib/stap_run_binary.exp: Likewise. - * lib/stap_run_exact.exp: Likewise. - -2008-07-09 Frank Ch. Eigler <fche@elastic.org> - - From <James.Bottomley@HansenPartnership.com>: - * systemtap.base/declaration.exp: New test. - * lib/stap_compile.exp: New file, stap_compile moved from ... - * systemtap.base/marker.exp: ... here. - -2008-07-01 Wenji Huang <wenji.huang@oracle.com> - - * buildok/vfs_testcase.stp: Test _vfs.generic_commit_write only when - kernel<=2.6.25. - -2008-06-27 David Smith <dsmith@redhat.com> - - * systemtap.base/utrace_p4.exp: Added tests for 'process(PID)' - variants. - -2008-06-24 Frank Ch. Eigler <fche@elastic.org> - - rhbz 451707 - * systemtap.stress/conversions.exp: Reorder value overrides - so $test name conveys correct tested value. - -2008-06-23 Stan Cox <scox@redhat.com> - - * systemtap.base/stmt_rel.stp: Added test for - kernel.statement("Func@File:*") - -2008-06-18 Josh Stone <joshua.i.stone@intel.com> - - * systemtap.base/optim_voidstmt.stp: Add tests for various statement - optimizations that we should now be eliding. - -2008-06-16 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/warnings.exp: Adjust warning count again (me1 and - elide were formerly duplicated). - -2008-06-16 Stan Cox <scox@redhat.com> - - * systemtap.base/warnings.stp: Added PR 6611 warning tests. - * systemtap.base/warnings.exp: Reset warning count. - -2008-06-13 Frank Ch. Eigler <fche@elastic.org> - - * lib/stap_run.exp: Remove module/cache warning boilerplate. - -2008-06-11 Mark Wielaard <mwielaard@redhat.com> - - * systemtap.base/warnings.exp: Expect 11 warning plus 1 .ko output - line. - -2008-06-11 David Smith <dsmith@redhat.com> - - * systemtap.base/utrace_p5.exp: Made changes to work when not - configured in the src directory. - * systemtap.base/utrace_p5_multi.c: Made changes to work on x86_64 - systems. - - * systemtap.base/utrace_p5.exp: Added 'process().thread.begin' and - 'process().thread.end' tests. - * systemtap.base/utrace_p5_multi.c: Added multi-threaded test - program for utrace_p5.exp. - * .gitignore: Updated. - -2008-06-10 Stan Cox <scox@redhat.com> - - * systemtap.base/warnings.exp: Adjust for duplicate warning elimination. - -2008-06-10 Frank Ch. Eigler <fche@elastic.org> - - PR 6470. - * parseko/preprocess08.stp, ...08b.stp: Revised/new test. - * systemtap.base/cmd_parse.exp: Added some argv[] tests. - -2008-06-09 Stan Cox <scox@redhat.com> - - * systemtap.base/stmt_rel.stp: New test. - * systemtap.base/stmt_rel.exp: Likewise. - -2008-06-06 David Smith <dsmith@redhat.com> - - * systemtap.base/utrace_p4.exp: Updated for utrace probe changes. - * systemtap.base/utrace_p5.exp: Ditto. - -2008-06-03 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.context/backtrace.tcl: Tolerate "(inexact)" backtraces. - -2008-05-30 Wenji Huang <wenji.huang@oracle.com> - - * systemtap.base/debugpath.exp: Add path for self-built kernel. - -2008-05-28 Josh Stone <joshua.i.stone@intel.com> - - PR 6529 - * systemtap.base/error_fn.*: New tests. - -2008-05-28 Mark Wielaard <mwielaard@redhat.com> - - * testsuite/Makefile.am (clean-local): Correct redirect of stderr. - (installcheck): Don't depend on clean. - -2008-05-28 Mark Wielaard <mwielaard@redhat.com> - - * lib/systemtap.exp (setup_systemtap_environment): Create user - based cache dir. - * systemtap.base/cache.exp: Likewise. - * Makefile.am (clean-local): Try to remove all .systemtap and - .cache_test dirs. - -2008-05-26 Frank Ch. Eigler <fche@elastic.org> - - * testsuite/stmtvars.exp: Tweaked matching regexps, tested on - f7, rhel5. - -2008-05-24 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac (enable-dejazilla): Add option, default off. - * Makefile.am (*check): Send systemtap.sum to dejazilla if enabled$a - * execrc: New helper script for runtest rc overriding. - * configure, Makefile.in: Regenerated. - -2008-05-23 Frank Ch. Eigler <fche@elastic.org> - - * buildok/{nfs,rpc}-all-probes.stp: Suppress warnings from empty probe - bodies. - * systemtap.pass1-4/buidok.exp: Mark above as kfail due to bug #4413. - While there, also mark the process_test kfail for #1155, though even - it fails only sporadically. - -2008-05-21 Frank Ch. Eigler <fche@elastic.org> - - PR 6538 - * buildok/ioscheduler.stp, nine.stp, scsi.stp, sixteen.stp, - socket.stp, stat_insert.stp: Adapt to new warnings. - * systemtap.maps/linear_empty.exp, systemtap.samples/args.exp, - systemtap.samples/poll_map.stp, systemtap.string/strtol.stp: Ditto. - -2008-05-20 Frank Ch. Eigler <fche@elastic.org> - - PR 6538 - * systemtap.base/warnings.*: New tests. - * buildok/eleven.stp, systemtap.examples/disktop.stp, - transok/three.stp: Adapt to new warnings. - -2008-05-21 Stan Cox <scox@redhat.com> - - * systemtap.base/optim_arridx.stp: Test compound assignment and - binary expression. - * systemtap.base/optim_arridx.exp: Likewise. - (optim_arridx_run): Don't check warnings. - -2008-05-21 Mark Wielaard <mwielaard@redhat.com> - - * buildok/aux_syscalls-embedded.stp: Don't check _struct_utimbuf_u - and _struct_compat_utimbuf_u. Check new _struct_utimbuf_actime, - _struct_utimbuf_modtime, _struct_compat_utimbuf_actime and - _struct_compat_utimbuf_modtime. - -2008-05-20 Mark Wielaard <mwielaard@redhat.com> - - PR 5001 - * systemtap.syscall/futimes.c (utime): Expect new time format. - * systemtap.syscall/stat.c (utime): Likewise. - -2008-05-19 Mark Wielaard <mwielaard@redhat.com> - - PR 6524 - * systemtap.base/ctime.stp: New test. - * systemtap.base/ctime.exp: New expect file. - -2008-05-19 Stan Cox <scox@redhat.com> - - * systemtap.base/optim_arridx.stp: New test. - * systemtap.base/optim_arridx.exp: New test. - -2008-04-29 Frank Ch. Eigler <fche@elastic.org> - - PR 6466. - * semko/twelve.stp, semok/twenty.stp, systemtap.base/cache.exp, - systemtap.base/maxactive.exp, systemtap.base/warnings.exp, - transok/eight.stp: Adapt to new elision capabilities; add new - side-effects or -w warning-suppression flags. - * systemtap.pass1-4/buildok.exp: Remove two kfails. - * semok/optimize.stp: Test new elision. - -2008-04-24 Will Cohen <wcohen@redhat.com> - - * systemtap.examples: examples moved into testsuite. - -2008-04-22 David Smith <dsmith@redhat.com> - - * systemtap.base/utrace_p5.exp: Simplfied a little. - - * systemtap.base/utrace_p5.exp: Added run-time utrace tests. - -2008-04-21 David Smith <dsmith@redhat.com> - - * parseko/utrace01.stp: Renamed from semko/utrace02.stp (since it - received a parse error, not a semantic error). - -2008-04-21 Martin Hunt <hunt@redhat.com> - - * systemtap.samples/args.exp: Remove obsolete "-d" option. - -2008-04-18 David Smith <dsmith@redhat.com> - - * systemtap.base/utrace_p4.exp: Added exec probe test. - - * buildok/utrace01.stp: Removed. - * buildok/utrace02.stp: Ditto. - * buildok/utrace03.stp: Ditto. - * systemtap.base/utrace_p4.exp: Rewrote buildok tests to check for - kernel utrace support. - -2008-04-17 David Smith <dsmith@redhat.com> - - * buildok/utrace01.stp: New test. - * buildok/utrace02.stp: Ditto. - * buildok/utrace03.stp: Ditto. - * semko/utrace01.stp: Ditto. - * semko/utrace02.stp: Ditto. - * semko/utrace03.stp: Ditto. - * semko/utrace04.stp: Ditto. - * semko/utrace05.stp: Ditto. - * semko/utrace06.stp: Ditto. - * semko/utrace07.stp: Ditto. - * semko/utrace08.stp: Ditto. - * semko/utrace09.stp: Ditto. - * semko/utrace10.stp: Ditto. - * semko/utrace11.stp: Ditto. - * semko/utrace12.stp: Ditto. - * semko/utrace13.stp: Ditto. - -2008-04-10 Frank Ch. Eigler <fche@elastic.org> - - PR 2949 - * systemtap.base/cmd_parse.exp: Add "-l" listing test. - -2008-04-04 Masami Hiramatsu <mhiramat@redhat.com> - - PR 5528 - * systemtap.stress/conversions.exp: Update a script to catch up - recently changes of conversions.stp. - -2008-03-31 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bump version to 0.7. - * configure: Regenerated. - -2008-03-27 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/cmd_parse.exp: Don't assume $SHELL=bash. - -2008-03-23 Frank Ch. Eigler <fche@elastic.org> - - * lib/stap_run.exp (stap_run): Ignore missing debuginfo warnings. - Try harder to kill stap child in case of timeouts and errors. - -2008-03-23 Frank Ch. Eigler <fche@elastic.org> - - PR 5980. - * lib/systemtap.exp: Set default Snapshot: value from "stap -V" - output. - -2008-03-21 Eugene Teo <eugeneteo@kernel.sg> - - PR 5528 - * systemtap.stress/conversions.stp: Test new user_* functions. - * buildok/conversions.stp: Test new user_* functions. - * buildok/conversions-embedded.stp: Test new user_* functions. - -2008-03-20 Frank Ch. Eigler <fche@elastic.org> - - PR 5956. - * semko/fortyfive.stp: New test. - -2008-03-15 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/maxactive.exp, probefunc.exp: Standardize pass msg. - -2008-03-10 Dave Brolley <brolley@redhat.com> - - PR5189 - * systemtap.printf/memory1.{stp,exp}: Rewrite to reflect new %m safety checks. - * systemtap.stress/conversions.exp: Add a test for invalid argument to %m. - -2008-03-05 David Smith <dsmith@redhat.com> - - PR5422 - * systemtap.samples/examples.exp: Updated. - -2008-03-03 Frank Ch. Eigler <fche@elastic.org> - - PR5516 - * buildok/twentynine.stp: New test. - -2008-02-27 Dave Brolley <brolley@redhat.com> - - PR5189 - * systemtap.printf/bin6.{exp,stp}: New test case. - * systemtap.printf/memory1.{exp,stp}: New test case. - -2008-02-27 David Smith <dsmith@redhat.com> - - * systemtap.base/marker.exp: Added better path to Module.markers. - -2008-02-25 Frank Ch. Eigler <fche@elastic.org> - - PR5792. - * systemtap.base/preprocessor.exp: New test. - -2008-02-23 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.printf/*.exp: Canonicalize pass/fail messages. - -2008-02-23 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.samples/args.exp: Remove installation-specific paths from - pass/fail judgements.< - -2008-02-23 Frank Ch. Eigler <fche@elastic.org> - - * */*.exp: Change all "send \003" to "exec kill -INT -<pgrp>" in order - to more reliably kill an inferior stap/stapio/staprun process group. - -2008-02-22 Frank Ch. Eigler <fche@elastic.org> - - * semko/fortyfive.stp: Add ".call" to exclude false (?) positives - from inlined instances defined in header files. - -2008-02-22 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/stmtvars.exp: New test for PR 5787. - -2008-02-21 Will Cohen <wcohen@redhat.com> - - * systemtap.base/beginenderror.exp: Increase timeout for slow machines. - -2008-02-20 David Smith <dsmith@redhat.com> - - * systemtap.base/marker.exp: Added tests for marker probe - ".format" component. - -2008-02-19 Frank Ch. Eigler <fche@elastic.org> - - PR5766. - * semko/fortyfive.stp: New test. - -2008-02-19 Frank Ch. Eigler <fche@elastic.org> - - PR5771. - * transko/one.stp: Remove, or rather, move to this ... - * semko/zero.stp: new file. - -2008-02-12 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.context/context.exp: Build temporary modules under - build tree, to tolerate read-only source trees. - * {args,backtrace,pid}.tcl: Corresponding changes. - * systemtap_test_module2.c: Add a bunch of asm("")'s to prevent - inlining even better than noinline does. - -2008-02-12 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.pass1-4/buildok.exp: No longer kfail buildok/seventeen. - -2008-02-07 Martin Hunt <hunt@redhat.com> - - * systemtap.base/debugpath.exp: Remove explicit closes. - Stap will terminate without help, and cleanup after itself. - -2008-02-06 Masami Hiramatsu <mhiramat@redhat.com> - - * systemtap.context/backtrace.tcl: Fixed regular expressions and Added - new expression for checking return probe's stacktrace on ia64. - * systemtap.context/backtrace.stp (print_all_trace_info): Added - trace point output before calling print_stack(). - -2008-02-06 Masami Hiramatsu <mhiramat@redhat.com> - - * systemtap.base/cmd_parse.exp: Added 'wait' between tests for - preventing unexpected EOF. - -2008-02-06 Masami Hiramatsu <mhiramat@redhat.com> - - * systemtap.base/procfs.exp: Added PROCFS.ko cleanup. - * systemtap.context/context.exp: Added cleanup call. - * systemtap.printf/end1b.exp: Passed evaluated command string to - as_root. - * systemtap.printf/mixed_outb.exp: Ditto. - * systemtap.printf/out1b.exp: Ditto. - * systemtap.printf/out2b.exp: Ditto. - * systemtap.printf/out3b.exp: Ditto. - -2008-02-04 David Smith <dsmith@redhat.com> - - PR 4446. - * systemtap.base/marker.exp: Added tests for marker "$format" - variable. - -2008-02-01 Martin Hunt <hunt@redhat.com> - PR4736 - * systemtap.printf/stap_merge.tcl: Copied here so - it will always be available. - -2008-01-31 Will Cohen <wcohen@redhat.com> - - * systemtap.pass1-4/buildok.exp: Add some kfails. - -2008-01-29 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (clean-local): Allow "rm -rf" to fail due to - root-owned .ko files in the local cache. - * Makefile.in: Regenerated. - -2008-01-26 Frank Ch. Eigler <fche@elastic.org> - - PR 5673. - * testsuite/parseko/maxactive{04,05}.stp: New tests. - -2008-01-24 Frank Ch. Eigler <fche@elastic.org> - - crash(8) tests, based on Masami Hiramatsu <mhiramat@redhat.com>: - * Makefile.am (CRASH_LIBDIR): Pass in $(RUNTEST). - * lib/systemtap.exp (as_root): Trace command string, output, and - result. - * systemtap.samples/crash.*, testlog.stp: New test case. - * Makefile.in: Regenerated. - -2008-01-23 Frank Ch. Eigler <fche@elastic.org> - - PR 2521. - * systemtap.base/debugpath.exp: New test. - -2008-01-18 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bump version to 0.6.1. - * configure: Regenerated. - -2008-01-17 Frank Ch. Eigler <fche@elastic.org> - - PR 4935. - * semko/forty.stp, fortyone.stp, fortytwo.stp: New tests. - * semok/twentynine.stp: Weaken test since condition expressions have - become more tightly constrained. - -2008-01-17 David Smith <dsmith@redhat.com> - - * semko/procfs11.stp: Added test for invalid use of procfs probe - '$value' target variable. - * semko/procfs12.stp: Ditto. - -2008-01-16 David Smith <dsmith@redhat.com> - - PR 5608. - * systemtap.base/marker.exp: Added 2 tests for treating marker - arguments incorrectly. - -2008-01-16 Eugene Teo <eteo@redhat.com> - - * buildok/signal-embedded.stp: Add all new embedded C functions - in signal. - -2008-01-14 Frank Ch. Eigler <fche@elastic.org> - - PR 4935. - * systemtap.base/onoffprobe.*: Toughen test. - -2008-01-12 Frank Ch. Eigler <fche@elastic.org> - - * lib/systemtap.exp (get_system_info): Look for $builddir/SNAPSHOT too. - -2008-01-09 Masami Hiramatsu <mhiramat@redhat.com> - - PR5554 - * systemtap.syscall/alarm.c: Fix expected output patterns on ia64. - * systemtap.syscall/stat.c: Ditto. - -2008-01-09 Masami Hiramatsu <mhiramat@redhat.com> - - PR5544 - * lib/stap_run.exp (stap_run): Support warning before ending probe. - -2008-01-07 William Cohen <wcohen@redhat.com> - * lib/systemtap.exp (as_root): new proc. - * systemtap.context/context.exp: - * systemtap.printf/end1b.exp: - * systemtap.printf/mixed_outb.exp: - * systemtap.printf/out1b.exp: - * systemtap.printf/out2b.exp: - * systemtap.printf/out3b.exp: Use as_root proc. - -2008-01-04 David Smith <dsmith@redhat.com> - - * systemtap.base/marker.exp: Improved regexp that finds markers - with arguments. - -2007-12-12 Martin Hunt <hunt@redhat.com> - Detect crashing stap and report as a test failure. - * lib/systemtap.exp (stap_run_batch): Return -1 if stap - crashed. - * systemtap.pass1-4/buildko.exp: If stap_run_batch returned - -1 then mark test as failed. - * systemtap.pass1-4/parseko.exp: Ditto. - * systemtap.pass1-4/semko.exp: Ditto. - * systemtap.pass1-4/transko.exp: Ditto. - -2007-12-05 Masami Hiramatsu <mhiramat@redhat.com> - - PR 4935 - * parseok/five.stp: Add an example of conditional probe point. - * parseko/probepoint04.stp: New test for conditional probe point. - * parseko/probepoint05.stp: Ditto. - * parseko/probepoint06.stp: Ditto. - * parseko/probepoint07.stp: Ditto. - * parseko/probepoint08.stp: Ditto. - * parseko/probepoint09.stp: Ditto. - * semok/twentynine.stp: Ditto. - * semko/thirtynine.stp: Ditto. - * systemtap.base/onoffprobe.*: Ditto. - -2007-12-03 Masami Hiramatsu <mhiramat@redhat.com> - - PR 5376 - * perseko/twentytwo.stp: Change testcase to the wildcarded probe - points with spaces. - -2007-11-29 David Smith <dsmith@redhat.com> - - * systemtap.base/marker.exp: Gets marker list from - Module.markers. K_MARKER03 is always run since it is designed to - fail. - -2007-11-27 David Smith <dsmith@redhat.com> - - * semok/twentyeight.stp: Tests wildcarded probe points. - -2007-11-19 Frank Ch. Eigler <fche@elastic.org> - - * parseok/five.stp, semok/twentyseven.stp: Test "!" probe point flag. - -2007-11-15 David Smith <dsmith@redhat.com> - - * systemtap.base/marker.exp: Removed 'module("foo").mark("bar")' - tests since that facility was removed. - -2007-11-12 Martin Hunt <hunt@redhat.com> - - * systemtap.base/*.stp: Replace log() calls with - println() (or printf() if formatting would help.) - * systemtap.maps/*.stp: Ditto. - * systemtap.samples/*.stp: Ditto. - * systemtap.stress/*.stp: Ditto. - -2007-11-09 Masami Hiramatsu <mhiramat@redhat.com> - - PR3858 - * systemtap.printf/sharedbuf.exp: New test for buffer sharing option. - * systemtap.printf/sharedbuf.stp: Ditto. - * systemtap.printf/hello.stp: Ditto. - * systemtap.printf/hello2.stp: Ditto. - -2007-10-25 Martin Hunt <hunt@redhat.com> - - * systemtap.printf/printd.exp: New. - Runs printd.stp and printdln.stp. - * systemtap.printf/printdln.stp: Removed bad tests. - * systemtap.printf/printd.stp: Ditto. - -2007-10-25 Martin Hunt <hunt@redhat.com> - - * systemtap.printf/print_char.*: New test. - * systemtap.printf/print.*: New test. - * systemtap.printf/println.*: New test. - - * systemtap.maps/elision.*: New tests. - - * config/unix.exp: Added stap_run_exact. - * lib/stap_run_exact.exp: New. Like stap_run2 but - takes a seperate test name. - -2007-10-25 Martin Hunt <hunt@redhat.com> - - * systemtap.printf/printd.stp: New - * systemtap.printf/printdln.stp: New - -2007-10-16 Martin Hunt <hunt@redhat.com> - - PR 5000 - * systemtap.printf/bin3.stp. Removed. - * systemtap.printf/bin3a.stp. Renamed bin3.stp. - * systemtap.printf/bin4.stp. Removed. - * systemtap.printf/bin4a.stp. Renamed bin4.stp. - * systemtap.printf/bin5.stp. Removed. - * systemtap.printf/bin5a.stp. Renamed bin5.stp. - * systemtap.printf/bin3.exp: Don't run bin3a.stp. - * systemtap.printf/bin4.exp: Don't run bin4a.stp. - * systemtap.printf/bin5.exp: Don't run bin5a.stp. - - Increase reliability under loads. - * systemtap.samples/pfaults.exp: Increase MAXACTION. - * systemtap.context/backtrace.tcl: Handle just - a single userspace address. - -2007-10-05 Frank Ch. Eigler <fche@elastic.org> - - PR 1119. - * systemtap.base/warnings.*: New test. - -2007-10-05 Martin Hunt <hunt@redhat.com> - - * buildok/aux_syscalls-embedded.stp: Add all embedded - C function in aux_syscalls. - -2007-10-04 Frank Ch. Eigler <fche@elastic.org> - - * buildok/inet-embedded.stp: Test inet.stp functions. - -2007-10-04 Mike Mason <mmlnx@us.ibm.com> - - * buildok/memory-all-probes.stp: New test that uses wildcarding to - determine if all probes are resolvable. - * buildok/nfs-all-probes.stp: Ditto - * buildok/nfsd-all-probes.stp: Ditto - * buildok/process-all-probes.stp: Ditto - * buildok/rpc-all-probes.stp: Ditto - * buildok/scheduler-all-probes.stp: Ditto - * buildok/scsi-all-probes.stp: Ditto - * buildok/signal-all-probes.stp: Ditto - * buildok/socket-all-probes.stp: Ditto - * buildok/tcp-all-probes.stp: Ditto - * buildok/udp-all-probes.stp: Ditto - * buildok/vfs-all-probes.stp: Ditto - -2007-10-03 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.syscall/test.tcl: Don't list PASS on stdout. - -2007-10-02 Frank Ch. Eigler <fche@redhat.com> - - PR 5078 - * semok/twentysix.stp, systemtap.base/beginenderror.*: New tests. - -2007-10-02 William Cohen <wcohen@redhat.com> - - * systemtap.syscall/signal.c: - * systemtap.syscall/uid16.c: Compilation regardless of defines. - * systemtap.syscall/test.tcl: Handle UNSUPP tests correctly. - -2007-09-28 Wenji Huang <wenji.huang@oracle.com> - - * lib/systemtap.exp: New proc get_system_info. - * lib/stap_run.exp: New proc print_system_info. - -2007-09-27 Masami Hiramatsu <mhiramat@redhat.com> - - PR3916 - * systemtap.sample/gtod.*: New test for gettimeofday accuracy. - -2007-09-25 Martin Hunt <hunt@redhat.com> - - * systemtap.context/backtrace.tcl: Handle single line timer.profile - backtraces. - -2007-09-25 David Smith <dsmith@redhat.com> - - * systemtap.base/marker.exp: Improved regexp to work correctly on - kernels with no markers. - - * systemtap.base/marker.exp: Updated for the 9/18/2007 markers - patch. - -2007-09-24 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.samples/examples.exp: New file, replacing - * buildok/examples.stp: Removed. - -2007-09-24 Frank Ch. Eigler <fche@elastic.org> - - * buildok/*-embedded.stp: New test case for every embedded-C - function in the tapsets. - -2007-09-22 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.maps/linear_overunder.exp: Correct for actual data. - -2007-09-22 Frank Ch. Eigler <fche@elastic.org> - - PR 5057. - * systemtap.maps/linear_nearlyempty.*: New test for - histogram printing elision. - -2007-09-22 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/optim.exp: Wait for both result lines. - -2007-09-21 Martin Hunt <hunt@redhat.com> - - * systemtap.maps/linear*: Updated linear histogram tests. - - * lib/stap_run2.exp (stap_run2): Use send_log() - instead of puts to save failure context in the log. - -2007-09-21 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/optim.exp/stp: New test for rhbz# 300121. - -2007-09-18 David Smith <dsmith@redhat.com> - - * systemtap.base/procfs.exp: New test case. - * lib/stap_run.exp (stap_run): Handles the case where the stap - '-m' option was used. - -2007-09-17 David Smith <dsmith@redhat.com> - - * semko/procfs06.stp: New test case. - * semko/procfs07.stp: Ditto. - * semko/procfs08.stp: Ditto. - * semko/procfs09.stp: Ditto. - * semko/procfs10.stp: Ditto. - -2007-09-15 Wenji Huang <wenji.huang@oracle.com> - - PR 4930 - * buildok/examples.stp: New test case. - -2007-09-14 David Smith <dsmith@redhat.com> - - PR 1154 - * buildok/procfs01.stp: New test case. - * semko/procfs01.stp: Ditto. - * semko/procfs02.stp: Ditto. - * semko/procfs03.stp: Ditto. - * semko/procfs04.stp: Ditto. - * semko/procfs05.stp: Ditto. - -2007-09-13 Martin Hunt <hunt@redhat.com> - - * systemtap.base/limits.exp: New. Test 32 and 64-bit integer - extremes. - -2007-09-12 Frank Ch. Eigler <fche@elastic.org> - - * buildok/print_histograms.stp: Test println(@hist*()). - -2007-09-12 Frank Ch. Eigler <fche@elastic.org> - - PR 5023. - * buildok/ten.stp: Extend some more. - -2007-09-12 Martin Hunt <hunt@redhat.com> - - * systemtap.maps/foreach_limit.stp: Clean up the aggregates - section. - - * systemtap.maps/foreach_limit2.stp: Remove newline that was - confusing the output match. - - * systemtap.maps/linear_bad.exp: Fix expected output. - * systemtap.maps/linear_neg.exp: Ditto. - - * systemtap.maps/log.*: New files. - * systemtap.maps/log_edge.*: New files. - - * lib/stap_run2.exp (stap_run2): Rewrite. Previous version - was too complex and buggy. - -2007-09-12 Masami Hiramatsu <mhiramat@redhat.com> - - PR 4633 - * systemtap.context/backtrace.stp: Add testcases for the return - probe and the profile probe. - * systemtap.context/backtrace.tcl: Ditto. - * systemtap.context/systemtap_test_module2.c: Ditto. - -2007-09-12 Frank Ch. Eigler <fche@elastic.org> - - PR 5023. - * buildok/ten.stp: Reactivate and extend. - -2007-09-11 Josh Stone <joshua.i.stone@intel.com> - - PR 5014 - * systemtap.maps/pmap_agg_overflow.stp: Ensure that the percpu arrays - don't overflow before we get the chance to test aggregation overflow. - Also use a more optimal overflow limit (MAXMAPENTRIES + 1). - -2007-09-10 Wenji Huang <wenji.huang@oracle.com> - - * systemtap.stress/current.stp: Make module probe optional. - * buildok/four.stp: Ditto. - * buildok/twentyfive.stp: Ditto. - * semok/twelve.stp: Ditto. - -2007-09-06 Masami Hiramatsu <mhiramat@redhat.com> - - PR 4542 - * systemtap.stress/current.stp: Don't probe the return of __switch_to - on i686. - -2007-08-27 Martin Hunt <hunt@redhat.com> - - * systemtap.context/context.exp (build_modules): Change - build order to prevent messages about no version for yyy_int64. - -2007-08-24 Frank Ch. Eigler <fche@redhat.com> - - PR 4899 - * buildok/fortytwo.stp: New test. - * semko/thirtynine.stp: Removed test, now that bug #1305 has become - mooted/undone. - -2007-08-21 David Smith <dsmith@redhat.com> - - * foreach_limit.stp: Added test for sorting numeric arrays by - value. - * foreach_limit.exp: Ditto. - - PR 2305 - * foreach_limit2.stp: New file. Tests sorting aggregate arrays by - value. - * foreach_limit2.exp: Ditto. - -2007-08-21 Frank Ch. Eigler <fche@elastic.org> - - PR 4942 - * systemtap.base/kmodule.stp: Add "never" probe for type inference. - -2007-08-20 Martin Hunt <hunt@redhat.com> - - * systemtap.base/cmd_parse.exp: New file. Test - command parsing for "-c". - -2007-08-20 David Smith <dsmith@redhat.com> - - * parseko/cmdline15.stp: Added new test to make sure options '-c - cmd' and '-x pid' are mutually exclusive. - * parseko/cmdline16.stp: Ditto. - -2007-08-16 Frank Ch. Eigler <fche@elastic.org> - - PR 1315. - * buildok/fortyfive.stp: New test. - -2007-08-16 Josh Stone <joshua.i.stone@intel.com> - - PR 4591 - * lib/stap_run.exp: Make sure to match the entire output, in case - there are multiple pass/fail messages. - * buildok/printf.stp: Add lines for new print variants. - * parseko/printd01.stp: Make sure that bad printd calls are handled. - * parseko/printd02.stp: Ditto. - * parseko/printd03.stp: Ditto. - * parseko/printd04.stp: Ditto. - * systemtap.base/print.stp: Try a bunch of different print calls. - * systemtap.base/print.exp: Driver for above. - -2007-08-15 Martin Hunt <hunt@redhat.com> - - * systemtap.printf/*b.exp: Use stap_merge.tcl. - -2007-08-14 David Smith <dsmith@redhat.com> - - Merge from setuid-branch. - * configure.ac: Version increase to 0.6. - * configure: Regenerated. - - * parseko/cmdline09.stp: Added new test for staprun command line - options. - * parseko/cmdline10.stp: Ditto. - * parseko/cmdline11.stp: Ditto. - * parseko/cmdline12.stp: Ditto. - * parseko/cmdline13.stp: Ditto. - * parseko/cmdline14.stp: Ditto. - - * systemtap.samples/args.exp: No longer necessary to use "sudo" to - run staprun. - -2007-08-07 Frank Ch. Eigler <fche@redhat.com> - - PR 4846 - * parseko/preprocess13.stp, parseok/nineteen.stp, - semok/twentyfive.stp: New tests. - -2007-08-07 David Smith <dsmith@redhat.com> - - PR 4736 (partial fix) - * systemtap.printf/end1b.exp: Changed 'FAIL' to 'fail', so - the rest of the testsuite will continue. - * systemtap.printf/mixed_outb.exp: Ditto. - * systemtap.printf/out1b.exp: Ditto. - * systemtap.printf/out2b.exp: Ditto. - * systemtap.printf/out3b.exp: Ditto. - -2007-08-02 Mike Mason <mmlnx@us.ibm.com> - - * systemtap.samples/profile.stp: Changed limit check in - foreach loop. - -2007-08-01 Mike Mason <mmlnx@us.ibm.com> - - * systemtap.samples/profile.stp: Changed pid to tid throughout. - Changed delete method in decumulate(). - -2007-07-26 David Smith <dsmith@redhat.com> - - PR 4295 - * systemtap.samples/args.exp: Tests to make sure the '-m' option - leaves a module in the current directory. - * systemtap.base/cache.exp (stap_compile): Added cleanup. - -2007-07-25 Mike Mason <mmlnx@us.ibm.com> - - PR 4836 - * systemtap.samples/pfault.stp: Changed to - use memory tapset pagefault probes. - -2007-07-25 Mike Mason <mmlnx@us.ibm.com> - - PR 4836 - * buildok/twentytwo.stp, buildok/twentythree.stp: - Changed free_task() probes to deactivate_super() probes. Changed - references to timestamp in task_struct to s_maxbytes in super_block. - timestamp was removed from task_struct in 2.6.23. s_maxbytes is an - unsigned long long in every kernel I checked back to 2.4.18. - -2007-07-12 David Smith <dsmith@redhat.com> - - * systemtap.maps/pmap_agg_overflow.exp: On single processor - systems, this test reported an unsupported test and a test failure - when it should have only reported an unsupported test. Fixed. - -2007-07-10 Martin Hunt <hunt@localhost.localdomain> - - * systemtap.context/context.exp: Copy modules to - /lib/modules/`uname -r`/kernel for debug info. - -2007-07-10 Martin Hunt <hunt@redhat.com> - - * systemtap.context/pid.tcl: Don't try to get real ppid, - just match pattern. - -2007-07-09 Martin Hunt <hunt@redhat.com> - - * systemtap.context/systemtap_test_module1.c (stm_write_cmd): - Set pointer type to "char *" so get_user() fetches a char. - -2007-07-06 Martin Hunt <hunt@redhat.com> - - * systemtap.maps/linear*: New tests of linear histograms. - -2007-07-03 Frank Ch. Eigler <fche@elastic.org> - - * configure.ac: Bumped version to 0.5.15. - * configure: Regenerated. - -2007-07-03 Martin Hunt <hunt@redhat.com> - - * systemtap.context/pid.tcl: Better error reporting. - * systemtap.context/args.*: Ditto. - * systemtap.context/context.exp: Build in temp dir. - -2007-07-02 Martin Hunt <hunt@redhat.com> - - * systemtap.context/context.exp: Add pid tests. - * systemtap.context/pid.*: New tests. - -2007-07-02 Martin Hunt <hunt@redhat.com> - - * systemtap.context/*: New context tests. - -2007-06-25 Martin Hunt <hunt@redhat.com> - - * systemtap.maps/pmap_agg_overflow.exp: Rewrite - so order of error messages is not important. - -2007-06-22 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.syscall/readwrite.c: Tweak for new default string truncation width. - -2007-06-21 David Smith <dsmith@redhat.com> - - * Makefile.in: Regenerated with automake 1.10. - * aclocal.m4: Regenerated with aclocal 1.10. - * configure: Regenerated. - -2007-06-20 Martin Hunt <hunt@redhat.com> - - * systemtap.string/dot.exp: New test. - * systemtap.string/sprint.exp: New test. - - * systemtap.samples/transport*: Removed. - -2007-06-20 Martin Hunt <hunt@redhat.com> - - * systemtap.printf/*b.exp: Add code to look in the - toplevel directory for stap_merge. - -2007-06-18 Martin Hunt <hunt@redhat.com> - From Quentin Barnes. - * lib/stap_run.exp, lib/stap_run2.exp, lib/systemtap.exp, - systemtap.base/cache.exp, systemtap.base/optim.exp, - systemtap.base/overload.exp, systemtap.base/prologues.exp, - systemtap.maps/absentstats.exp, systemtap.maps/foreach_fail.exp, - systemtap.maps/ix_clear*.exp, systemtap.maps/pmap_agg_overflow.exp, - systemtap.samples/args.exp, systemtap.samples/arith.exp, - systemtap.samples/arith_limits.exp, - systemtap.samples/control_limits.exp, systemtap.samples/lket.exp, - systemtap.samples/pfaults.exp, systemtap.samples/poll_map.exp, - systemtap.samples/primes.exp, systemtap.samples/profile.exp, - systemtap.samples/queue_demo.exp, systemtap.samples/symbols.exp, - systemtap.samples/syscalls1.exp, systemtap.samples/syscalls2.exp, - systemtap.samples/transport.exp: Small fixes to patterns, plus - fix timeouts for slower systems. - -2007-06-15 Frank Ch. Eigler <fche@elastic.org> - - * lib/systemtap.exp (stap_run_batch): Detect crashing stap and - represent this as failing return code. - -2007-06-14 Martin Hunt <hunt@redhat.com> - - * systemtap.samples/syscalls.stp: Use printf - for output to avoid problems with long paths. - - From Quentin Barnes. - * systemtap.samples/system_func.exp: Change expect matching. - -2007-06-14 David Smith <dsmith@redhat.com> - - * systemtap.samples/profile.stp: Change output to avoid problems - when kernel source path is long. - -2007-06-05 Frank Ch. Eigler <fche@elastic.org> - - PR 3331. - * systemtap.base/deref2.*: New test, disabled. - -2007-06-04 Frank Ch. Eigler <fche@elastic.org> - - PR 4589. - * systemtap.base/optim.*: Rewritten, simplified. - -2007-05-30 Frank Ch. Eigler <fche@redhat.com> - - PR 4567. - * systemtap.base/optim.stp, optim.exp: New test. - -2007-05-29 Will Cohen <wcohen@redhat.com> - - PR4540 - * systemtap.stress/conversions.exp: Adjust for ia64 address space. - -2007-05-25 Martin Hunt <hunt@redhat.com> - - * systemtap.samples/lket.exp (cleanfiles): Set timeout inside expect. - * systemtap.maps/absentstats.exp: Set timeout inside expect. - * lib/stap_run2.exp (stap_run2): Set timeout to 180 inside expect. - * lib/stap_run.exp (stap_run): Set timeout to 180 for slower machines. - Remove $ anchor on output. Fix a few minor nits in patterns. - -2007-05-24 David Smith <dsmith@redhat.com> - - PR4446 - * systemtap.base/marker.exp: Renumbered tests and added new tests - for invalid argument name ("$foo1") and writing to marker - arguments. - -2007-05-23 David Smith <dsmith@redhat.com> - - PR4446 - * systemtap.base/marker.exp: Added new marker test. - * buildok/marker.stp: Removed old marker test. - -2007-05-08 Will Cohen <wcohen@redhat.com> - PR4470 - * testsuite/systemtap.syscall/syscall.exp: Build correct sizes for - 32-bit and 64-bit machines. - -2007-05-07 Martin Hunt <hunt@redhat.com> - PR4466 - * systemtap.samples/system_func.stp: Rewrite test to account - for probes not being placed until after begin. - * systemtap.samples/system_func.exp: Only expect 1 sys_open. - -2007-05-06 Frank Ch. Eigler <fche@elastic.org> - - * semko/thirtynine.stp: New test. - -2007-05-01 Martin Hunt <hunt@redhat.com> - - * systemtap.samples/system_func.*: New test. - -2007-05-01 Martin Hunt <hunt@redhat.com> - - * systemtap.samples/sysopen*: Deleted. - -2007-04-29 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (EXTRA_DIST): Add dejagnu subdirectories. - * configure.ac: Bump version to match parent directory. - * Makefile.in, configure: Regenerated. - -2007-04-25 David Wilder <dwilder@ibm.com> - - * systemtap.samples/profile.exp Increased timeout from 30 to 60 sec - to fix intermittent failures on s390x. - -2007-04-25 Mike Mason <mmlnx@us.ibm.com> - - * buildok/socket.stp: Adapted to changes in 2.6.19 socket routines. - -2007-04-24 Will Cohen <wcohen@redhat.com> - - * buildok/memory.stp: Test vm.pagefault.return. - -2007-04-23 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.pass1-4/buildok.exp: Add some kfails. - -2007-04-10 Martin Hunt <hunt@redhat.com> - - * systemtap.printf/out*: New output tests to stress output - buffering and transport. - * systemtap.printf/mixed*: More output tests mixing print, - printf, and print_char. - * systemtap.printf/end*: Test that output from end probes - is all sent. - -2007-04-05 Martin Hunt <hunt@redhat.com> - - * systemtap.samples/arith_limits.exp: Set test name correctly. - -2007-04-04 Pierre Peiffer <pierre.peiffer@bull.net> - - * parseok/fourteen.stp: Add test about $# and @# usage during - the preprocessing. - * parseko/preprocess10.stp: New test. - * parseko/preprocess11.stp: New test. - * parseko/preprocess12.stp: New test. - -2007-04-02 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.samples/poll_map.stp, profile.stp, syscalls.stp: - Continue adopting to .inline -> .function change. - * systemtap.samples/topsys.stp, systemtap.stress/current.stp: Ditto. - * semko/twentyone.stp: Ditto. - -2007-03-30 Frank Ch. Eigler <fche@elastic.org> - - PR 1570 - * */*.stp: Adapt to .inline -> .function change. - * lib/stap_run.exp, stap_run2.exp, stap_run_binary.exp: Shorten - pass/fail dejagnu log lines. - * systemtap.syscall/sys.stp, test.tcl: Make slightly more - compatible and failure more verbose. - -2007-03-29 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.maps/ix_*.exp: Add catch around close. - -2007-03-29 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.maps/pmap_agg_overflow.exp: Robustify with respect - to expected error messages and early quitting. - -2007-03-29 David Smith <dsmith@redhat.com> - - PR 4281 - * parseko/cmdline07.stp: New test. - * parseko/cmdline08.stp: New test. - -2007-03-22 Frank Ch. Eigler <fche@elastic.org> - - PR 4224. - * systemtap.base/probefunc.exp: Use kernel.statement().absolute - instead with grep-found schedule_tick address. - * semko/thirtyseven.stp, thirtyeight.stp: New tests. - * buildok/twentyeight.stp: New test. - -2007-03-22 David Smith <dsmith@redhat.com> - - * systemtap.stress/conversions.exp: Fixed test case bug that only - affected s390x. - -2007-03-21 David Smith <dsmith@redhat.com> - - PR 4146 - * systemtap.samples/control_limits.exp: Begin/end probes use - MAXACTION_INTERRUPTIBLE instead of MAXACTION. - -2007-03-09 Pierre Peiffer <pierre.peiffer@bull.net> - - * buildok/twenty.stp, semok/seventeen.stp: Adapt to kernel 2.6.20. - -2007-03-19 David Smith <dsmith@redhat.com> - - * .cvsignore: Added systemtap.syscall test programs. - -2007-03-16 David Smith <dsmith@redhat.com> - - * systemtap.base/overload.exp: New test. - -2007-03-15 David Smith <dsmith@redhat.com> - - * .cvsignore: Added "config.log" and "config.status". - -2007-03-14 Frank Ch. Eigler <fche@redhat.com> - - PR 4171. - * configure.ac, configure, aclocal.m4: New files to permit - testsuite-only build tree. - * Makefile.am (RUNTEST): Arrange a crazy concoction of - environment/make variable for runtest. - * Makefile.in: Regenerated. - * */*.stp: Switch test cases from "./stap" to "stap" throughout. - * lib/systemtap.exp: Assume/trace environment variables. - (stap_run_batch): Add "#! stap"-handling hack. - -2007-03-14 Martin Hunt <hunt@redhat.com> - - * systemtap.base/div0.stp: Fix so output - won't possibly have the error message before the printed - output. - * systemtap.base/maxactive.exp: Ditto. - * systemtap.maps/ix_clear.stp: Ditto. - * systemtap.maps/ix_clear2.stp: Ditto. - * systemtap.samples/args.exp: Remove obsolete "-r" option - to staprun. - -2007-03-07 Frank Ch. Eigler <fche@elastic.org> - - PR 4116. - * buildok/twentyseven.stp: New test. - * systemtap.pass1-4/buildok.exp: kfail it. - -2007-03-06 David Smith <dsmith@redhat.com> - - * systemtap.base/alternatives.exp: Changed the probed kernel - function from 'signal_wake_up' (which wasn't present on some - kernels) to 'sys_getrlimit'. - -2007-03-02 Frank Ch. Eigler <fche@elastic.org> - - PR 4121 - * systemtap.stress/conversions.exp: Fix & improve below patch. - -2007-03-01 Frank Ch. Eigler <fche@redhat.com> - - PR 4121 - * systemtap.stress/conversions.exp: Bypass address=0 test for s390x. - -2007-02-27 Frank Ch. Eigler <fche@redhat.com> - - PR 4105 - * buildok/twentysix.stp: New test. - * systemtap.pass1-4/buildok.exp: kfail it. - -2007-02-19 David Smith <dsmith@redhat.com> - - PR 4081 - * Makefile.am: The symbolic link that the Makefile creates to stap - now points to the installed version of stap when "make - installcheck" is run. - * Makefile.in: Regenerated. - -2007-02-16 David Smith <dsmith@redhat.com> - - * systemtap.base/alternatives.exp: New test case. - -2007-02-09 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/prologue.*: New test case. - -2007-02-06 Josh Stone <joshua.i.stone@intel.com> - - * systemtap.base/deref.stp: Test kread with const sources. - -2007-02-06 Frank Ch. Eigler <fche@elastic.org> - - * buildok/conversions.stp: Build-test all conversions.stp functions. - * systemtap.stress/conversions.*: New test. - -2007-01-29 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.base/cache.exp (stap_compile): Accept new -p4 output. - -2007-01-24 Will Cohen <wcohen@redhat.com> - - * systemtap.syscall/syscall.exp: Increase timeout for slow machines. - -2007-01-23 Frank Ch. Eigler <fche@elastic.org> - - * systemtap.pass1-4/buildok.exp: Remove most kfail designations. - -2007-01-23 Mike Mason <mmlnx@us.ibm.com> - - * buildok/socket.stp: Added sockets tapset build test. - -2007-01-23 Mike Mason <mmlnx@us.ibm.com> - - * systemtap.string/tokenize.exp, systemtap.string/tokenize.stp, - systemtap.string/strtol.exp, systemtap.string/strtol.stp: - Tests for new tokenize and strtol functions. - -2007-01-22 Josh Stone <joshua.i.stone@intel.com> - - * systemtap.base/deref.stp: Rewrite test, and now also check the ability - to read/write pointers. - -2007-01-22 Frank Ch. Eigler <fche@redhat.com> - - * config/unix.exp: New file as a master load_lib repository. - * */*.exp: Removed load_lib calls. - * parseko/cmdline01.stp: Swallow expected stap ERROR: message. - * systemtap.syscall/syscall.exp: Added installmode_p checks. - -2007-01-22 Martin Hunt <hunt@redhat.com> - - * systemtap.maps/exists.stp: New test to see if - array elements exist using the "in" keyword. - -2007-01-20 Mike Mason <mmlnx@us.ibm.com> - - PR 3899 - * systemtap.base/kmodule.stp: Added probes for other - modules that allow the test to pass when ext3 isn't - built as a module. - -2007-01-19 Josh Stone <joshua.i.stone@intel.com> - - PR 3079 - * systemtap.base/deref.stp: Use the new kread macro that should work - fine with 64-bit numbers on i386 platforms. Also expand the test to - include writes with kwrite. - * systemtap.base/deref.exp: Remove the setup_kfail. - -2007-01-16 Mike Mason <mmlnx@us.ibm.com> - - * buildok/eighteen.stp: changed to find __audit_getname or - audit_getname without checking kernel version to support - audit code backports - -2007-01-13 Mike Mason <mmlnx@us.ibm.com> - - PR 3867 - * systemtap.samples/ioblocktest.stp: Fixed so only - checks bit 0 (Read/Write bit) of bio->bi_rw. Also merged - ioblock.request and ioblock.end probes. They do the same - thing. - -2007-01-10 Martin Hunt <hunt@redhat.com> - - * systemtap.maps/foreach_foreach.exp: Update for new delete func. - * systemtap.maps/ii.exp: Ditto. - * systemtap.maps/ii.stp: Ditto. - * systemtap.maps/iiiiii.exp: Ditto. - * systemtap.maps/iiiiii.stp: Ditto. - * systemtap.maps/is.stp: Ditto. - * systemtap.maps/si.exp: Ditto. - * systemtap.maps/si.stp: Ditto. - * systemtap.maps/ss.stp: Ditto. - -2006-12-29 Frank Ch. Eigler <fche@redhat.com> - - PR 3523. - * buildok/fourteen.stp, fourteen-plus.stp: Tweak & add a test. - * systemtap.base/bench.stp: Work around randomized-ordered probes. - * systemtap.base/bench.exp: Tighten output requirements. - -2006-12-22 Josh Stone <joshua.i.stone@intel.com> - - * buildok/array_size.stp, parseko/array01.stp, parseko/array02.stp, - parseko/array03.stp, parseko/array04.stp, transko/array01.stp, - systemtap.base/array_size.exp, systemtap.base/array_size.stp: - Tests for specifying the size of global arrays. - -2006-12-22 David Smith <dsmith@redhat.com> - - * systemtap.base/cache.exp: Added test to ensure that using '-M' - and '-t' changes the hash. The '-t' test is commented out until - PR3523 is fixed. - -2006-12-21 David Smith <dsmith@redhat.com> - - * systemtap.base/cache.exp: Added test to ensure that using '-b' - changes the hash. - -2006-12-19 Frank Ch. Eigler <fche@redhat.com> - - PR 3522. - * buildok/twentyfive.stp: New test for static $var access. - -2006-12-18 Josh Stone <joshua.i.stone@intel.com> - - * systemtap.base/deref.exp, systemtap.base/deref.exp: Add a test for - successfully dereferencing pointers of various sizes. This is known to - fail on x86 for 64-bit values -- PR 3079. - -2006-12-18 David Smith <dsmith@redhat.com> - - * systemtap.samples/pfaults.stp: Since PR 1132 has been fixed, - updated to use "$return". - -2006-12-08 Josh Stone <joshua.i.stone@intel.com> - - PR 3681. - * systemtap.base/global_init.exp, systemtap.base/global_init.stp: New - test for checking the timeliness of global initialization. - -2006-12-07 Josh Stone <joshua.i.stone@intel.com> - - PR 3624. - * systemtap.base/be_order.exp, systemtap.base/be_order.stp, - semok/beginend.stp: New tests for begin/end priorities. - - * lib/stap_run.exp: Anchor OUTPUT_CHECK_STRING to the end of output. - * systemtap.base/maxactive.exp: Fix to compare output to the end. - * systemtap.base/probefunc.exp: Ditto. - * systemtap.samples/ioblocktest.exp: Ditto. - * systemtap.samples/ioblocktest.stp: Ditto. - * systemtap.samples/tcptest.exp: Ditto. - -2006-11-30 Martin Hunt <hunt@redhat.com> - - * systemtap.samples/pfaults.exp: Fix regular expression - to handle buffering issues that broke on MP systems. - -2006-11-29 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guijian@cn.ibm.com> - - * systemtap.samples/lket.exp: Increase MAXSKIPPED - and timeout thresholds; Fix the code of cleaning - temporary files - - * systemtap.stress/whitelist.stp: New testcase to generate - safe probes. - -2006-11-28 David Smith <dsmith@redhat.com> - - * semko/thirtyfour.stp: Checks for writing to target variable in - .return probe. - * semok/twentyfour.stp: Tests read access to target variable in - .return probe. - -2006-11-21 Li Guanglei <guanglei@cn.ibm.com> - - From Gui Jian <guijian@cn.ibm.com> - * systemtap.samples/lket.exp, systemtap.samples/lket.stp: add - testcase for LKET - -2006-11-19 Frank Ch. Eigler <fche@elastic.org> - - * parseko/twentythree.stp: New test for running tapset file. - -2006-11-17 Frank Ch. Eigler <fche@redhat.com> - - * semko/thirtysix.stp, transko/three.stp: New tests. - -2006-11-16 Li Guanglei <guanglei@cn.ibm.com> - - * buildok/lket.stp: check for all available LKET trace hooks. - -2006-11-10 David Smith <dsmith@redhat.com> - - * semko/maxactive03.stp: Stop on pass2 instead of on pass1. - - * lib/stap_run.exp: As a side-effect, stap_run() sets global - 'probe_errors' and 'skipped_probes' to the number of probe errors - and skipped probes seen while running the probe. - * systemtap.base/maxactive.exp: Uses extended stap_run() to find - number of skipped probes instead of using private stap_run() - variant. - -2006-11-09 David Smith <dsmith@redhat.com> - - * buildok/maxactive01.stp: Added test for "maxactive(N)" - return probe processing. - * parseko/maxactive01.stp: Ditto. - * parseko/maxactive02.stp: Ditto. - * parseko/maxactive03.stp: Ditto. - * parseko/maxactive04.stp: Ditto. - * semko/maxactive01.stp: Ditto. - * semko/maxactive02.stp: Ditto. - * semko/maxactive03.stp: Ditto. - * systemtap.base/maxactive.exp: Ditto. - -2006-11-06 David Smith <dsmith@redhat.com> - - * systemtap.maps/foreach_limit.exp: Added new test for foreach - "limit" keyword. - * systemtap.maps/foreach_limit.stp: Ditto. - - * parseko/foreachstmt06.stp: Added new test for foreach "limit" - keyword. - * parseko/foreachstmt07.stp: Ditto. - * parseok/foreachstmt01.stp: Ditto. - * semko/foreachstmt01.stp: Ditto. - * semko/foreachstmt02.stp: Ditto. - -2006-11-02 Thang Nguyen <thang.p.nguyen@intel.com> - - * systemtap.samples/tcptest.exp: Put TCP load gen into a - a seperate script. - * systemtap.samples/tcptest.tcl: new script for TCP load - gen. - -2006-10-30 Josh Stone <joshua.i.stone@intel.com> - - * systemtap.maps/pmap_agg_overflow.stp: Use - kernel.function("scheduler_tick") instead of timer.jiffies - so the test works on all kernels. The test needs a probe - that is invoked often on all cpus. - * systemtap.base/timers.stp: Fudge the comparison a bit between - jiffies(1) and profile to allow for slop between start/end times. - -2006-10-30 Martin Hunt <hunt@redhat.com> - - * systemtap.maps/pmap_agg_overflow.stp: Use timer.jiffies - instead of timer.profile so the test works on xen kernels. - -2006-10-30 David Smith <dsmith@redhat.com> - - * systemtap.base/cache.exp: Saves value of SYSTEMTAP_DIR - environment variable before starting tests and restores value at - the end. Without this caching was broken for the rest of the - testsuite, since all cached files were ending up in - testsuite/.cache_test (which gets deleted on the next run of the - testsuite). - - * Makefile.am: The 'clean-local' target now removes the .systemtap - and .cache_test directories. - * Makefile.in: Regenerated. - -2006-10-30 Martin Hunt <hunt@redhat.com> - - * systemtap.base/cache.exp (stap_compile): Fix a simple - buffering problem with expect. - -2006-10-26 David Smith <dsmith@redhat.com> - - * systemtap.base/cache.exp: New file that tests caching - functionality. - * lib/systemtap.exp (setup_systemtap_environment): Use a local - systemtap directory/cache (instead of the user's cache). - * .cvsignore: Added .systemtap directory. - -2006-10-23 David Smith <dsmith@redhat.com> - - * lib/stap_run.exp: Handles cached module. - * lib/stap_run2.exp: Ditto. - -2006-10-23 William Cohen <wcohen@redhat.com> - - * systemtap.maps/absentstats.exp: Increase timeout for slow machines. - -2006-10-21 Thang Nguyen <thang.p.nguyen@intel.com> - - * systemtap.samples/tcptest.exp: fix bug #3404 - * systemtap.samples/tcptest.stp: fix bug #3404 - -2006-10-18 David Smith <dsmith@redhat.com> - - * systemtap.syscall/.cvsignore: Added file. - -2006-09-28 Martin Hunt <hunt@redhat.com> - - * buildok/eighteen.stp: Fix for 2.6.18. - * buildok/two.stp: Ditto. - -2006-09-27 Josh Stone <joshua.i.stone@intel.com> - - * buildok/fourteen.stp: Test new timer functionality. - -2006-09-26 David Smith <dsmith@redhat.com> - - * systemtap.samples/args.exp: Looks for 'staprun' instead of - 'stpd'. - -2006-09-20 Josh Stone <joshua.i.stone@intel.com> - - PR 3233 - * buildok/timestamp.stp: add gettimeofday_ns test. - -2006-09-12 David Smith <dsmith@redhat.com> - - * Added .cvsignore file. - -2006-09-09 Frank Ch. Eigler <fche@elastic.org> - - * lib/systemtap.exp (stap_run_batch): New helper routine. - * systemtap.pass1-4/*.exp: Use it instead of catch/exec/>>& hack. - -2006-09-06 Frank Ch. Eigler <fche@elastic.org> - - * parseok/eighteen.stp, semok/twentythree.stp: New files for - testing initialized globals. - -2006-08-21 Martin Hunt <hunt@redhat.com> - - * lib/stap_run.exp: Check for existence of installtest_p - before running it. This reenables running individual tests - with runtest. - * lib/stap_run2.exp: Ditto. - * lib/stap_run_binary.exp: Ditto. - -2006-08-12 Frank Ch. Eigler <fche@elastic.org> - - * Makefile.am (clean-local): Clean up dejagnu turds. - * Makefile.in: Regenerated. - -2006-08-12 Frank Ch. Eigler <fche@elastic.org> - - * all: Reorganized old pass-1..4 tests one dejagnu bucket. - Moved over old pass-5 tests, except for disabled syscalls tests. - * Makefile (installcheck): New target for running pass-1..5 - tests against installed systemtap. diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 9516fec4..9607ebe3 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -33,7 +33,8 @@ SYSTEMTAP_TAPSET=$(DESTDIR)$(pkgdatadir)/tapset LD_LIBRARY_PATH=$(DESTDIR)$(libdir)/systemtap CRASH_LIBDIR=$(DESTDIR)$(libdir)/systemtap SYSTEMTAP_PATH=$(DESTDIR)$(bindir) +SYSTEMTAP_INCLUDES=$(DESTDIR)$(includedir) RUNTESTDEFAULTFLAGS = --tool $$tool --tool_opts \'$(TOOL_OPTS)\' --srcdir $$srcdir EXPECT = expect -RUNTEST="env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH $(srcdir)/execrc runtest" +RUNTEST="env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH SYSTEMTAP_PATH=$(SYSTEMTAP_PATH) SYSTEMTAP_INCLUDES=$(SYSTEMTAP_INCLUDES) $(srcdir)/execrc runtest" diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 4e9f9374..9547479b 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -31,16 +31,14 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -subdir = . -DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) +subdir = testsuite +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DEJATOOL = $(PACKAGE) @@ -50,22 +48,39 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ +DATE = @DATE@ DEFS = @DEFS@ +DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -73,15 +88,25 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PIECFLAGS = @PIECFLAGS@ +PIECXXFLAGS = @PIECXXFLAGS@ +PIELDFLAGS = @PIELDFLAGS@ +PROCFLAGS = @PROCFLAGS@ +RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +U = @U@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ @@ -89,10 +114,15 @@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ -dejazilla = @dejazilla@ docdir = @docdir@ dvidir = @dvidir@ +elfutils_abs_srcdir = @elfutils_abs_srcdir@ exec_prefix = @exec_prefix@ +have_dvips = @have_dvips@ +have_latex = @have_latex@ +have_latex2html = @have_latex2html@ +have_ps2pdf = @have_ps2pdf@ +have_xmlto = @have_xmlto@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ @@ -104,6 +134,8 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +nspr_CFLAGS = @nspr_CFLAGS@ +nss_CFLAGS = @nss_CFLAGS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -111,9 +143,14 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +sqlite3_LIBS = @sqlite3_LIBS@ srcdir = @srcdir@ +stap_LIBS = @stap_LIBS@ +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@ AUTOMAKE_OPTIONS = dejagnu no-dist @@ -127,45 +164,42 @@ SYSTEMTAP_TAPSET = $(DESTDIR)$(pkgdatadir)/tapset LD_LIBRARY_PATH = $(DESTDIR)$(libdir)/systemtap CRASH_LIBDIR = $(DESTDIR)$(libdir)/systemtap SYSTEMTAP_PATH = $(DESTDIR)$(bindir) +SYSTEMTAP_INCLUDES = $(DESTDIR)$(includedir) RUNTESTDEFAULTFLAGS = --tool $$tool --tool_opts \'$(TOOL_OPTS)\' --srcdir $$srcdir EXPECT = expect -RUNTEST = "env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH $(srcdir)/execrc runtest" +RUNTEST = "env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH SYSTEMTAP_PATH=$(SYSTEMTAP_PATH) SYSTEMTAP_INCLUDES=$(SYSTEMTAP_INCLUDES) $(srcdir)/execrc runtest" all: all-am .SUFFIXES: -am--refresh: - @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + $(AUTOMAKE) --gnu testsuite/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: @@ -236,7 +270,6 @@ clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-DEJAGNU distclean-generic @@ -269,8 +302,6 @@ install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -290,17 +321,16 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am all-local am--refresh check check-DEJAGNU check-am \ - check-local clean clean-generic clean-local distclean \ - distclean-DEJAGNU distclean-generic dvi dvi-am html html-am \ - info info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am +.PHONY: all all-am all-local check check-DEJAGNU check-am check-local \ + clean clean-generic clean-local distclean distclean-DEJAGNU \ + distclean-generic dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am all-local: diff --git a/testsuite/configure b/testsuite/configure index 3c02bf56..094f99c7 100755 --- a/testsuite/configure +++ b/testsuite/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for systemtap 0.8. +# Generated by GNU Autoconf 2.61 for systemtap 0.9. # # Report bugs to <systemtap@sources.redhat.com>. # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='systemtap' PACKAGE_TARNAME='systemtap' -PACKAGE_VERSION='0.8' -PACKAGE_STRING='systemtap 0.8' +PACKAGE_VERSION='0.9' +PACKAGE_STRING='systemtap 0.9' PACKAGE_BUGREPORT='systemtap@sources.redhat.com' ac_subst_vars='SHELL @@ -1149,7 +1149,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures systemtap 0.8 to adapt to many kinds of systems. +\`configure' configures systemtap 0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1215,7 +1215,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of systemtap 0.8:";; + short | recursive ) echo "Configuration of systemtap 0.9:";; esac cat <<\_ACEOF @@ -1291,7 +1291,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -systemtap configure 0.8 +systemtap configure 0.9 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1305,7 +1305,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by systemtap $as_me 0.8, which was +It was created by systemtap $as_me 0.9, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1997,7 +1997,7 @@ fi # Define the identity of the package. PACKAGE='systemtap' - VERSION='0.8' + VERSION='0.9' cat >>confdefs.h <<_ACEOF @@ -2617,7 +2617,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by systemtap $as_me 0.8, which was +This file was extended by systemtap $as_me 0.9, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2660,7 +2660,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -systemtap config.status 0.8 +systemtap config.status 0.9 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/testsuite/configure.ac b/testsuite/configure.ac index f24bf23b..c40fdf72 100644 --- a/testsuite/configure.ac +++ b/testsuite/configure.ac @@ -1,7 +1,7 @@ dnl configure.ac --- autoconf input file for systemtap testsuite dnl Process this file with autoconf to produce a configure script. -AC_INIT([systemtap], 0.8, systemtap@sources.redhat.com, systemtap) +AC_INIT([systemtap], 0.9, systemtap@sources.redhat.com, systemtap) AC_PREREQ(2.59) AC_CONFIG_AUX_DIR(..) diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index f399073e..5bf125b9 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -62,17 +62,17 @@ proc setup_systemtap_environment {} { # 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 are on the $PATH. - set env(PATH) "$srcdir/..:$env(PATH)" + # 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 { + 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 { + } elseif { "$server_pid" == "0" } then { print "A compatible systemtap server is already available" } else { print "Started a systemtap server as PID==$server_pid" diff --git a/testsuite/semko/typemismatch.stp b/testsuite/semko/typemismatch.stp new file mode 100755 index 00000000..94a49d53 --- /dev/null +++ b/testsuite/semko/typemismatch.stp @@ -0,0 +1,8 @@ +#! stap -p2 + + +global noo + +probe begin { foo = 1 ; foo = "bar" ; noo = 4 } + +probe end { foo = "zoo" ; foo <<< 2 ; noo = "zoo" }
\ No newline at end of file diff --git a/testsuite/semok/twenty.stp b/testsuite/semok/twenty.stp index 46dcefca..73dbb3bf 100755 --- a/testsuite/semok/twenty.stp +++ b/testsuite/semok/twenty.stp @@ -1,5 +1,7 @@ -#! stap -wp2 +#! /bin/sh +set -e +stap -wp2 -e ' probe kernel.function("*") {} probe module("*").function("*") {} probe kernel.function("*").call {} @@ -8,3 +10,6 @@ probe kernel.function("*").return {} probe module("*").function("*").return {} probe kernel.function("*").inline {} probe module("*").function("*").inline {} +' | wc + +# without the |wc, we'd log the humongous list of stuff stap -p2 prints diff --git a/testsuite/systemtap.samples/arith.exp b/testsuite/systemtap.base/arith.exp index c4f72793..c4f72793 100644 --- a/testsuite/systemtap.samples/arith.exp +++ b/testsuite/systemtap.base/arith.exp diff --git a/testsuite/systemtap.samples/arith.stp b/testsuite/systemtap.base/arith.stp index 59016dcb..59016dcb 100644 --- a/testsuite/systemtap.samples/arith.stp +++ b/testsuite/systemtap.base/arith.stp diff --git a/testsuite/systemtap.samples/arith_limits.exp b/testsuite/systemtap.base/arith_limits.exp index 93794c8e..93794c8e 100644 --- a/testsuite/systemtap.samples/arith_limits.exp +++ b/testsuite/systemtap.base/arith_limits.exp diff --git a/testsuite/systemtap.samples/arith_limits.stp b/testsuite/systemtap.base/arith_limits.stp index 6c620830..6c620830 100644 --- a/testsuite/systemtap.samples/arith_limits.stp +++ b/testsuite/systemtap.base/arith_limits.stp diff --git a/testsuite/systemtap.base/bz5274.exp b/testsuite/systemtap.base/bz5274.exp index db0e0a46..92441e9e 100755 --- a/testsuite/systemtap.base/bz5274.exp +++ b/testsuite/systemtap.base/bz5274.exp @@ -8,11 +8,14 @@ if {$arch == "ppc64"} { catch {exec gcc -o $test -g $srcdir/$subdir/$test.c} err } - if {$err == "" && [file exists $test]} then { pass "$test compile" } else {fail "$test compile"} -if {! [installtest_p]} { untested "$test -p5"; return } +if {! [installtest_p]} { + catch {exec rm -f $test} + untested "$test -p5" + return +} # Try to find utrace_attach symbol in /proc/kallsyms # copy from utrace_p5.exp @@ -21,7 +24,11 @@ set path "/proc/kallsyms" if {! [catch {exec grep -q utrace_attach $path} dummy]} { set utrace_support_found 1 } -if {$utrace_support_found == 0} { untested "$test -p5"; return } +if {$utrace_support_found == 0} { + catch {exec rm -f $test} + untested "$test -p5" + return +} if {[catch {exec stap $tpath.stp -c "$srcdir/$subdir/$test.sh"} res]} { untested "$test longjmp to a uretprobed function" diff --git a/testsuite/systemtap.base/bz6850.exp b/testsuite/systemtap.base/bz6850.exp index 73fedc8a..b96ed95c 100644 --- a/testsuite/systemtap.base/bz6850.exp +++ b/testsuite/systemtap.base/bz6850.exp @@ -10,12 +10,21 @@ set path "/proc/kallsyms" if {! [catch {exec grep -q utrace_attach $path} dummy]} { set utrace_support_found 1 } -if {$utrace_support_found == 0} { untested "$test -p4"; untested "$test -p5"; return } +if {$utrace_support_found == 0} { + catch {exec rm -f $test} + untested "$test -p4" + untested "$test -p5" + return +} set rc [stap_run_batch $srcdir/$subdir/bz6850.stp] if {$rc == 0} then { pass "$test -p4" } else { fail "$test -p4" } -if {! [installtest_p]} { untested "$test -p5"; return } +if {! [installtest_p]} { + catch {exec rm -f $test} + untested "$test -p5" + return +} # Pick up the stap being tested. set stapexe [exec /usr/bin/which stap] diff --git a/testsuite/systemtap.samples/control_limits.exp b/testsuite/systemtap.base/control_limits.exp index 513b2c4d..513b2c4d 100644 --- a/testsuite/systemtap.samples/control_limits.exp +++ b/testsuite/systemtap.base/control_limits.exp diff --git a/testsuite/systemtap.samples/control_limits.stp b/testsuite/systemtap.base/control_limits.stp index 89b0bae4..89b0bae4 100644 --- a/testsuite/systemtap.samples/control_limits.stp +++ b/testsuite/systemtap.base/control_limits.stp diff --git a/testsuite/systemtap.samples/crash.exp b/testsuite/systemtap.base/crash.exp index 9c3e5e05..9c3e5e05 100644 --- a/testsuite/systemtap.samples/crash.exp +++ b/testsuite/systemtap.base/crash.exp diff --git a/testsuite/systemtap.samples/crash.sh b/testsuite/systemtap.base/crash.sh index 06aa414e..06aa414e 100755 --- a/testsuite/systemtap.samples/crash.sh +++ b/testsuite/systemtap.base/crash.sh diff --git a/testsuite/systemtap.samples/gtod.c b/testsuite/systemtap.base/gtod.c index abc08543..abc08543 100644 --- a/testsuite/systemtap.samples/gtod.c +++ b/testsuite/systemtap.base/gtod.c diff --git a/testsuite/systemtap.samples/gtod.exp b/testsuite/systemtap.base/gtod.exp index a8f3c9d6..a8f3c9d6 100644 --- a/testsuite/systemtap.samples/gtod.exp +++ b/testsuite/systemtap.base/gtod.exp diff --git a/testsuite/systemtap.samples/gtod.sh b/testsuite/systemtap.base/gtod.sh index 4d4a28c2..4d4a28c2 100755 --- a/testsuite/systemtap.samples/gtod.sh +++ b/testsuite/systemtap.base/gtod.sh diff --git a/testsuite/systemtap.samples/gtod.stp b/testsuite/systemtap.base/gtod.stp index f252dc0a..f252dc0a 100644 --- a/testsuite/systemtap.samples/gtod.stp +++ b/testsuite/systemtap.base/gtod.stp diff --git a/testsuite/systemtap.base/labels.exp b/testsuite/systemtap.base/labels.exp new file mode 100644 index 00000000..9c92d69c --- /dev/null +++ b/testsuite/systemtap.base/labels.exp @@ -0,0 +1,70 @@ +set test "labels" +if {![installtest_p]} {untested $test; return} + +# Try to find utrace_attach symbol in /proc/kallsyms +# copy from utrace_p5.exp +set utrace_support_found 0 +set path "/proc/kallsyms" +if {! [catch {exec grep -q utrace_attach $path} dummy]} { + set utrace_support_found 1 +} +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_flags "additional_flags=-g" +set fp [open $label_srcpath "w"] +puts $fp " +int +main () +{ + sleep(5); + int a = 0; + int b = 0; + char *c; +init_an_int: + a = 2; +init_another_int: + b = 3; + c = \"abc\"; +ptr_inited: + return 1; +} +" +close $fp + +set label_stppath "[pwd]/labels.stp" +set fp [open $label_stppath "w"] +puts $fp " +probe process(\"labels.x\").function(\"main*@labels.c\").label(\"init_*\") {printf (\"VARS %s\\n\",\$\$vars)} +probe process(\"labels.x\").function(\"main*@labels.c\").label(\"ptr_inited\") {printf (\"VARS %s\\n\",\$\$vars)} +" +close $fp + +set ok 0 + +set res [target_compile $label_srcpath $label_exepath 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" +} + +verbose -log "spawn stap -c $label_exepath $label_stppath" +spawn stap -c $label_exepath $label_stppath + +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 } + timeout { fail "$test (timeout)" } + eof { } +} + +wait + +if {$ok == 1} { pass "$test" } { fail "$test ($ok)" } +catch {exec rm -f $label_srcpath $label_stppath $label_exepath} diff --git a/testsuite/systemtap.samples/poll_map.exp b/testsuite/systemtap.base/poll_map.exp index 5ade48e6..5ade48e6 100644 --- a/testsuite/systemtap.samples/poll_map.exp +++ b/testsuite/systemtap.base/poll_map.exp diff --git a/testsuite/systemtap.samples/poll_map.stp b/testsuite/systemtap.base/poll_map.stp index cd39b433..cd39b433 100755 --- a/testsuite/systemtap.samples/poll_map.stp +++ b/testsuite/systemtap.base/poll_map.stp diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp index eb0d1c6e..11fec9b1 100644 --- a/testsuite/systemtap.base/static_uprobes.exp +++ b/testsuite/systemtap.base/static_uprobes.exp @@ -1,21 +1,17 @@ + set test "sduprobes" -if {![installtest_p]} {untested $test; return} # Compile a C program to use as the user-space probing target set sup_srcpath "[pwd]/static_uprobes.c" set sup_exepath "[pwd]/static_uprobes.x" -set sup_flags "additional_flags=-iquote$env(SYSTEMTAP_RUNTIME) additional_flags=-L$env(CRASH_LIBDIR) additional_flags=-lsduprobes" +set supcplus_exepath "[pwd]/static_uprobes_cplus.x" set fp [open $sup_srcpath "w"] puts $fp " #include <stdlib.h> #define USE_STAP_PROBE 1 #include \"static_uprobes.h\" -foo () -{ - STAP_PROBE(static_uprobes,test_probe_1); -} - +void bar (int i) { if (i == 0) @@ -23,6 +19,7 @@ bar (int i) STAP_PROBE1(static_uprobes,test_probe_2,i); } +void baz (int i, char* s) { STAP_PROBE1(static_uprobes,test_probe_0,i); @@ -31,102 +28,31 @@ baz (int i, char* s) STATIC_UPROBES_TEST_PROBE_3(i,s); } +void buz (int parm) { + if (parm == 0) + parm = 1000; + DTRACE_PROBE1(static_uprobes,test_probe_4,parm); } +int main () { - sleep(5); - foo(); bar(2); - baz(3,\"abc\"); + baz(3,(char*)\"abc\"); buz(4); } " close $fp -# set res [target_compile $sup_srcpath $sup_exepath executable $sup_flags] -# if { $res != "" } { -# verbose "target_compile failed: $res" 2 -# fail "compiling static_uprobes.c" -# return -# } else { -# pass "compiling static_uprobes.c" -# } - -set fp [open "[pwd]/static_uprobes.stp" "w"] +set sup_stppath "[pwd]/static_uprobes.stp" +set fp [open $sup_stppath "w"] puts $fp " probe process(\"static_uprobes.x\").mark(\"test_probe_0\") { printf(\"In test_probe_0 probe %#x\\n\", \$arg1) } -probe process(\"static_uprobes.x\").mark(\"test_probe_1\") -{ - printf(\"In test_probe_1 probe\\n\") -} -probe process(\"static_uprobes.x\").mark(\"test_probe_2\") -{ - printf(\"In test_probe_2 probe %#x\\n\", \$arg1) -} -probe process(\"static_uprobes.x\").mark(\"test_probe_3\") -{ - printf(\"In test_probe_3 probe %#x %#x\\n\", \$arg1, \$arg2) -} -" -close $fp - -# Try to find utrace_attach symbol in /proc/kallsyms -# copy from utrace_p5.exp -set utrace_support_found 0 -set path "/proc/kallsyms" -if {! [catch {exec grep -q utrace_attach $path} dummy]} { - set utrace_support_found 1 -} -if {$utrace_support_found == 0} { untested "$test"; return } - -set ok 0 -# verbose -log "spawn stap -c $sup_exepath [pwd]/static_uprobes.stp" -# spawn stap -c $sup_exepath [pwd]/static_uprobes.stp -# 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 } -# timeout { fail "$test (timeout)" } -# eof { } -# } - -# if {$ok == 4} { pass "$test" } { fail "$test ($ok)" } -set ok 0 - -# Now do a debuginfo style probe of the above test - -set fp [open "[pwd]/static_uprobes.sh" "w"] -puts $fp " -ed $sup_srcpath <<HERE -/USE_STAP_PROBE/d -/buz/+1 -a - DTRACE_PROBE1(static_uprobes,test_probe_4,parm); -. -w -q -" -close $fp -spawn sh [pwd]/static_uprobes.sh - -set fp [open "[pwd]/static_uprobes.stp" "w"] -puts $fp " -probe process(\"static_uprobes.x\").mark(\"test_probe_0\") -{ - printf(\"In test_probe_0 probe %#x\\n\", \$arg1) -} -probe process(\"static_uprobes.x\").mark(\"test_probe_1\") -{ - printf(\"In test_probe_1 probe\\n\") -} probe process(\"static_uprobes.x\").mark(\"test_probe_2\") { printf(\"In test_probe_2 probe %#x\\n\", \$arg1) @@ -142,7 +68,9 @@ probe process(\"static_uprobes.x\").mark(\"test_probe_4\") " close $fp -set fp [open "[pwd]/static_uprobes.d" "w"] +set sup_dpath "[pwd]/static_uprobes.d" +set sup_hpath "[pwd]/static_uprobes.h" +set fp [open $sup_dpath "w"] puts $fp " provider static_uprobes { probe test_probe_1 (); @@ -152,20 +80,94 @@ provider static_uprobes { }; " close $fp -spawn dtrace -h -s [pwd]/static_uprobes.d +if {[installtest_p]} { + set dtrace $env(SYSTEMTAP_PATH)/dtrace +} else { + set dtrace $srcdir/../dtrace +} +if {[catch {exec $dtrace -h -s $sup_dpath} res]} { + verbose -log "unable to run $dtrace: $res" +} +if {[file exists $sup_hpath]} then { + pass "$test generating header" +} else { + fail "$test generating header" + catch {exec rm -f $sup_srcpath $sup_hpath $sup_stppath} + return +} + +catch {exec rm -f $sup_dpath} -set sup_flags "additional_flags=-iquote$env(SYSTEMTAP_RUNTIME) additional_flags=-g additional_flags=-O additional_flags=-I." +if {[installtest_p]} { + set sdtdir $env(SYSTEMTAP_INCLUDES) +} else { + set sdtdir $srcdir/../includes +} + +set sup_flags "additional_flags=-I$sdtdir additional_flags=-g additional_flags=-O additional_flags=-I." set res [target_compile $sup_srcpath $sup_exepath executable $sup_flags] if { $res != "" } { verbose "target_compile failed: $res" 2 - fail "compiling sduprobes.c -g" + fail "$test compiling C -g" + catch {exec rm -f $sup_srcpath $sup_hpath $sup_stppath} return } else { - pass "compiling sduprobes.c -g" + pass "$test compiling C -g" } -verbose -log "spawn stap -c $sup_exepath [pwd]/static_uprobes.stp" -spawn stap -c $sup_exepath [pwd]/static_uprobes.stp +spawn mv $sup_srcpath "[pwd]/static_uprobes.cc" +set sup_srcpath "[pwd]/static_uprobes.cc" +set sup_flags "$sup_flags c++" +set res [target_compile $sup_srcpath $supcplus_exepath executable $sup_flags] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "$test compiling C++ -g" + catch {exec rm -f $sup_srcpath $sup_exepath $sup_hpath $sup_stppath} + return +} else { + pass "$test compiling C++ -g" +} + +if {![installtest_p]} {untested $test; return} + +# Try to find utrace_attach symbol in /proc/kallsyms +# copy from utrace_p5.exp +set utrace_support_found 0 +set path "/proc/kallsyms" +if {! [catch {exec grep -q utrace_attach $path} dummy]} { + set utrace_support_found 1 +} +if {$utrace_support_found == 0} { + untested "$test" + catch {exec rm -f $sup_srcpath} + return +} + +set ok 0 + +verbose -log "spawn stap -c $sup_exepath $sup_stppath" +spawn stap -c $sup_exepath $sup_stppath +expect { + -timeout 180 + -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 } + -re {In test_probe_4 dtrace probe 0x4} { incr ok; exp_continue } + timeout { fail "$test C (timeout)" } + eof { } +} + +wait + +if {$ok == 4} { pass "$test C" } { fail "$test C ($ok)" } + +set ok 0 + +# spawn objcopy -R .probes $supcplus_exepath $sup_exepath +verbose -log "cp $supcplus_exepath $sup_exepath" +spawn cp $supcplus_exepath $sup_exepath +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 } @@ -173,10 +175,15 @@ expect { -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 } -re {In test_probe_4 dtrace probe 0x4} { incr ok; exp_continue } - timeout { fail "$test (timeout)" } + timeout { fail "$test C++ (timeout)" } eof { } } wait -if {$ok == 5} { pass "$test" } { fail "$test ($ok)" } +if {$ok == 4} { 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 diff --git a/testsuite/systemtap.samples/system_func.exp b/testsuite/systemtap.base/system_func.exp index ec935783..ec935783 100644 --- a/testsuite/systemtap.samples/system_func.exp +++ b/testsuite/systemtap.base/system_func.exp diff --git a/testsuite/systemtap.samples/system_func.stp b/testsuite/systemtap.base/system_func.stp index d14fb25b..d14fb25b 100644 --- a/testsuite/systemtap.samples/system_func.stp +++ b/testsuite/systemtap.base/system_func.stp diff --git a/testsuite/systemtap.base/uprobes.exp b/testsuite/systemtap.base/uprobes.exp index e8318586..89250e7b 100644 --- a/testsuite/systemtap.base/uprobes.exp +++ b/testsuite/systemtap.base/uprobes.exp @@ -25,12 +25,20 @@ set path "/proc/kallsyms" if {! [catch {exec grep -q utrace_attach $path} dummy]} { set utrace_support_found 1 } -if {$utrace_support_found == 0} { untested "$test -p4"; untested "$test -p5"; return } +if {$utrace_support_found == 0} { + untested "$test -p4"; untested "$test -p5" + catch {exec rm -f jennie.c jennie} + return +} set rc [stap_run_batch $srcdir/$subdir/uprobes.stp] if {$rc == 0} then { pass "$test -p4" } else { fail "$test -p4" } -if {! [installtest_p]} { untested "$test -p5"; exec rm -f jennie.c jennie; return } +if {! [installtest_p]} { + untested "$test -p5"; + catch {exec rm -f jennie.c jennie} + return +} # Pick up the stap being tested. set stapexe [exec /usr/bin/which stap] @@ -46,4 +54,4 @@ expect { if {$ok == 10} then { pass "$test -p5" } else { fail "$test -p5 ($ok)" } catch {wait; close} -exec rm -f jennie.c jennie +catch {exec rm -f jennie.c jennie} diff --git a/testsuite/systemtap.samples/symbols.exp b/testsuite/systemtap.context/symbols.exp index 0c599b58..0c599b58 100644 --- a/testsuite/systemtap.samples/symbols.exp +++ b/testsuite/systemtap.context/symbols.exp diff --git a/testsuite/systemtap.samples/symbols.stp b/testsuite/systemtap.context/symbols.stp index 040c3444..040c3444 100644 --- a/testsuite/systemtap.samples/symbols.stp +++ b/testsuite/systemtap.context/symbols.stp diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog deleted file mode 100644 index 253e1a76..00000000 --- a/testsuite/systemtap.examples/ChangeLog +++ /dev/null @@ -1,349 +0,0 @@ -2009-01-02 Mark Wielaard <mjw@redhat.com> - - PR9693. Reported by Eugeniy Meshcheryakov <eugen@debian.org> - * io/traceio2.stp: Add proper #! /usr/bin/env stap line. - * profiling/functioncallcount.stp: Likewise. - -2008-12-10 William Cohen <wcohen@redhat.com> - - * process/futexes.stp: - * profiling/thread-times.stp: Tweak formatting. - -2008-12-10 Tim Moore <timoore@redhat.com> - - * profiling/latencytap.stp: Probe scheduler to identify processes - that have slept inordinately. - -2008-12-09 William Cohen <wcohen@redhat.com> - - * general/ansi_colors.stp: - * general/key.stp: - * general/keyhack.stp: - * general/para-callgraph.stp: - * io/disktop.stp: - * io/io_submit.stp: - * io/iostat-scsi.stp: - * io/iotime.stp: - * io/traceio.stp: - * io/traceio2.stp: - * network/nettop.stp: - * process/futexes.stp: - * process/proc_snoop.stp: - * process/sig_by_pid.stp: - * process/sigkill.stp: - * process/sigmon.stp: - * process/syscalls_by_pid.stp: - * process/syscalls_by_proc.stp: - * process/wait4time.stp: - * profiling/thread-times.stp: Tweak formatting, indent two space. - -2008-11-25 Mark Wielaard <mjw@redhat.com> - - * general/para-callgraph.meta: Add accidentially removed -c back - to test_installcheck. - -2008-11-25 Mark Wielaard <mjw@redhat.com> - - * general/para-callgraph.meta: Don't use single quotes. - -2008-11-20 Frank Ch. Eigler <fche@elastic.org> - - * examples-index-gen.pl: Make "keywords: foo bar" list into - clickable links. - -2008-11-20 Frank Ch. Eigler <fche@elastic.org> - - * subsystem-*: Removed subsystem indexes. - -2008-11-19 Frank Ch. Eigler <fche@elastic.org> - - * process/sleepingBeauties.meta: Updated description. - -2008-10-27 William Cohen <wcohen@redhat.com> - - * io/traceio2.stp: Use local variable available from vfs tapset. - -2008-10-27 William Cohen <wcohen@redhat.com> - - * io/disktop.stp: Clean up disktop.stp and check in for real. - -2008-10-29 Frank Ch. Eigler <fche@elastic.org> - - * process/syscalltimes: Rename global "start" to avoid collision - with syscall tapset local variable. - -2008-10-27 William Cohen <wcohen@redhat.com> - - * io/disktop.stp: Make use of devname added to vfs tapset. - -2008-10-24 William Cohen <wcohen@redhat.com> - - * io/traceio.stp: - * io/traceio2.stp: - * io/iotop.stp: - * io/disktop.stp: Use vfs tapset rather than kernel functions probes. - -2008-09-12 Frank Ch. Eigler <fche@elastic.org> - - * io/traceio2.stp: Make compatible with RHEL5. - * general/para-callgraph.meta: Tweak quoting for dejagnu passage. - -2008-08-15 Frank Ch. Eigler <fche@elastic.org> - - * general/para-callgraph*: Extend. - * indexes: Regenerated. - -2008-08-11 Mark Wielaard <mwielaard@redhat.com> - - * check.exp: Make sure that stderr gets redircted so warnings don't - make example script run fail. - -2008-08-11 Mark Wielaard <mwielaard@redhat.com> - - PR6835. Reported by Eugeniy Meshcheryakov <eugen@debian.org> - * io/io_submit.stp: Fix #! start. Convert to normal line-ending. - -2008-08-11 Mark Wielaard <mwielaard@redhat.com> - - PR2895. Reported by Eugeniy Meshcheryakov <eugen@debian.org> - * general/graphs.stp: Add proper #! /usr/bin/env stap line. - * general/para-callgraph.stp: Likewise. - * io/io_submit.stp: Likewise. - * io/iotop.stp: Likewise. - * io/traceio.stp: Likewise. - * process/proc_snoop.stp: Likewise. - * process/sigkill.stp: Likewise. - * iotask.stp: Likewise. - * pfaults.stp: Likewise. - * profile.stp: Likewise. - -2008-08-08 Mark Wielaard <mwielaard@redhat.com> - - * examples-index-gen.pl: Add index of subsystem and keywords at top of - HTML indexes. - * *index.html: Regenerated. - * *index.txt: Likewise. - -2008-08-08 Mark Wielaard <mwielaard@redhat.com> - - * examples-index-gen.pl (add_meta_txt): Don't output output, exits, - status line. - (add_meta_html): Likewise. - * *index.html: Regenerated. - * *index.txt: Likewise. - -2008-08-08 Mark Wielaard <mwielaard@redhat.com> - - * examples-index-gen.pl (inputdir): Make absolute. - (outputdir): Likewise. - (supportfiles): Copy from new html dir. Add README. Make sure - new html subdir is created in outputdir. - -2008-08-07 Frank Ch. Eigler <fche@elastic.org> - - * *index.txt, *index.html: New generated files. - * .gitignore: Zap it. - * html/*, examples-index-gen.pl: Adapt to html/ boilerplate subdir. - -2008-08-07 Frank Ch. Eigler <fche@elastic.org> - - * small_demos: Unique parts kept, others dropped. - * all other samples: Moved into new subdirectories. - -2008-08-07 David Smith <dsmith@redhat.com> - - * .gitignore: New file. - -2008-08-07 Mark Wielaard <mwielaard@redhat.com> - - * examples-index-gen.pl: New file. - * systemtap.css: Likewise. - * systemtapcorner.gif: Likewise. - * systemtaplogo.png: Likewise. - * html_footer.tmpl: Likewise. - * html_header.tmpl: Likewise. - * Makefile.am (EXTRA_DIST): Add new support files. - -2008-08-07 Mark Wielaard <mwielaard@redhat.com> - - * futexes.meta: Correct name: entry. - -2008-08-01 William Cohen <wcohen@redhat.com> - - * helloworld.meta, traceio2.meta: Tweak test_installcheck. - -2008-08-01 William Cohen <wcohen@redhat.com> - - * check.exp: Run both tests for installcheck tests. - -2008-07-11 Mark Wielaard <mwielaard@redhat.com> - - * traceio.meta: s/decending/descending/ in description. - * iotop.meta: Likewise. - -2008-07-02 William Cohen <wcohen@redhat.com> - - * functioncallcount.meta, functioncallcount.stp: New. - -2008-07-02 William Cohen <wcohen@redhat.com> - - * para-callgraph.stp, para-callgraph.meta: New. - -2008-06-20 William Cohen <wcohen@redhat.com> - - * traceio2.meta: Correct test_check and test_installcheck commands. - -2008-06-20 William Cohen <wcohen@redhat.com> - - * traceio2.stp, traceio2.meta: New. - -2008-06-18 William Cohen <wcohen@redhat.com> - - * sleepingBeauties.stp, sleepingBeauties.meta: New. - -2008-06-17 William Cohen <wcohen@redhat.com> - - * graphs.stp, graphs.meta: New. - -2008-06-12 William Cohen <wcohen@redhat.com> - - * thread-times.stp, thread-times.meta: New. - -2008-05-20 William Cohen <wcohen@redhat.com> - - * io_submit.stp, io_submit.meta: - * traceio.stp, traceio.meta: - * iotop.stp, iotop.meta: - * disktop.stp, disktop.meta: - * sigkill.stp, sigkill.meta: New. - -2008-05-09 William Cohen <wcohen@redhat.com> - - * syscalls_by_pid.meta, syscalls_by_proc.meta: - * sigmon.meta, sig_by_pid.meta, sig_by_proc.meta: - * socket-trace.meta: New. - -2008-05-08 William Cohen <wcohen@redhat.com> - - * iotime.meta: New. - -2008-05-08 William Cohen <wcohen@redhat.com> - - * sleeptime.meta, wait4time.meta: New. - -2008-05-08 Mark Wielaard <mwielaard@redhat.com> - - * futexes.meta (test_check,test_installcheck): Change futex.stp to - futexes.stp. - -2008-05-07 William Cohen <wcohen@redhat.com> - - * futexes.meta, nettop.meta, pf2.meta: New. - -2008-05-07 William Cohen <wcohen@redhat.com> - - * pf2.stp: Clean up output. - -2008-05-01 William Cohen <wcohen@redhat.com> - - * helloworld.meta: New file. - -2008-04-27 William Cohen <wcohen@redhat.com> - - * check.exp: New script to run tests on cataloged examples. - -2008-03-09 Wenji Huang <wenji.huang@oracle.com> - - * wait4time.stp: Change reference of $pid to local variable pid. - -2008-03-05 David Smith <dsmith@redhat.com> - - PR5422 - * iostat-scsi.stp: Updated to handle kernel versions > 2.6.24. - * iostat-scsi.txt: Updated. - -2008-01-29 Frank Ch. Eigler <fche@elastic.org> - - * nettop.stp: Reorganize array usage to minimize contention. - -2007-11-19 Frank Ch. Eigler <fche@elastic.org> - - * iostat-scsi.stp: Adopt "!" probe point flag. - -2007-11-09 Martin Hunt <hunt@redhat.com> - - * README: New. - - * *.stp. Fix path. See PR 4718. - -2007-10-10 Mike Mason - - * syscalltimes, syscalltime.txt: New combination shell/SystemTap script - to measure system call times. - -2007-10-05 Frank Ch. Eigler <fche@elastic.org> - - * futexes.stp, sig_by_proc.stp, small_demos/rwtiming.stp: Fix elision - warnings. - -2007-09-15 Wenji Huang <wenji.huang@oracle.com> - - * iostat-scsi.stp: Make module probe optional,clarify reference to flags. - * small_demos/sched_snoop.stp(scheduler.migrage,scheduler.balance): Make optional. - -2007-09-05 Frank Ch. Eigler <fche@elastic.org> - - * pf2.stp: Exploit sortable aggregates. - -2007-08-09 Frank Ch. Eigler <fche@elastic.org> - - PR 4718, from Eugeniy Meshcheryakov <eugen@debian.org>: - * *.stp: Make all shell scripts lead with #! /usr/bin/stap - -2007-05-29 Mike Mason <mmlnx@us.ibm.com> - - * sig_count_by_pid.stp, sig_count_by_pid.txt, - sig_count_by_proc.stp, sig_count_by_proc.txt: Print signal activity - -2007-04-02 Frank Ch. Eigler <fche@elastic.org> - - * socket-trace.stp, small_demos/prof.stp, top.stp: Adapt to - .inline -> .function change. - -2007-01-30 Frank Ch. Eigler <fche@elastic.org> - - * socket-trace.stp: Added from the tutorial. - -2007-01-29 Mike Mason <mmlnx@us.ibm.com> - - * socktop, socktop.txt: New example that uses a shell script to process - command line options for a systemtap script. - -2007-01-11 Will Cohen <wcohen@redhat.com> - - * iotime.stp: - * sleeptime.stp: - * wait4time.stp: New examples. - -2007-01-10 Martin Hunt <hunt@redhat.com> - - * small_demos/top.stp: Use "limit" option in foreach. - -2007-01-01 Frank Ch. Eigler <fche@redhat.com> - - * *: Added several .stp/.txt files from the wiki. - -2006-04-20 Martin Hunt <hunt@redhat.com> - - * small_demos/top.stp: Use printf. - -2006-03-30 Martin Hunt <hunt@redhat.com> - - * small_demos/close.stp: Make it executable. - -2006-03-09 Martin Hunt <hunt@redhat.com> - - * key.stp: Toy example. - * prof.stp: Example profiler. - * top.stp: Print the top 20 syscalls. - diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index 52bc294b..7b76baa1 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -49,12 +49,18 @@ keywords: <a href="keyword-index.html#SIMPLE">SIMPLE</a> <br> <li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br> keywords: <a href="keyword-index.html#TRACE">TRACE</a> <a href="keyword-index.html#CALLGRAPH">CALLGRAPH</a> <br> <p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li> +<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br> +keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> +<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li> <li><a href="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br> keywords: <a href="keyword-index.html#DISK">DISK</a> <br> <p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li> <li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> <p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li> +<li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> <li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br> keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br> <p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parenthesese. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li> @@ -67,12 +73,21 @@ keywords: <a href="keyword-index.html#IO">IO</a> <br> <li><a href="io/traceio2.stp">io/traceio2.stp</a> - Watch I/O Activity on a Particular Device<br> keywords: <a href="keyword-index.html#IO">IO</a> <br> <p>Print out the executable name and process number as reads and writes to the specified device occur.</p></li> +<li><a href="memory/kmalloc-top">memory/kmalloc-top</a> - Show Paths to Kernel Malloc (kmalloc) Invocations<br> +keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e).</p></li> +<li><a href="memory/pfaults.stp">memory/pfaults.stp</a> - Generate Log of Major and Minor Page Faults<br> +keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The pfaults.stp script generates a simple log for each major and minor page fault that occurs on the system. Each line contains a timestamp (in microseconds) when the page fault servicing was completed, the pid of the process, the address of the page fault, the type of access (read or write), the type of fault (major or minor), and the elapsed time for page fault. This log can be examined to determine where the page faults are occuring.</p></li> <li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TRAFFIC">TRAFFIC</a> <a href="keyword-index.html#PER-PROCESS">PER-PROCESS</a> <br> <p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li> <li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> <p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li> +<li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> +<p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li> <li><a href="process/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br> keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#LOCKING">LOCKING</a> <a href="keyword-index.html#FUTEX">FUTEX</a> <br> <p>The script watches the futex syscall on the system. On exit the futexes address, the number of contentions, and the average time for each contention on the futex are printed from lowest pid number to highest.</p></li> @@ -112,6 +127,12 @@ keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword- <li><a href="profiling/thread-times.stp">profiling/thread-times.stp</a> - Profile kernel functions<br> keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p>The thread-times.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top twenty processes with samples broken down into percentage total time spent in user-space and kernel-space.</p></li> +<li><a href="profiling/timeout.stp">profiling/timeout.stp</a> - Show Processes Doing Polling Operations<br> +keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p>The timeout.stp script is based on a blog entry (http://udrepper.livejournal.com/19041.html) mentioning a need for a tool to help developers find applications that are polling. The timeout.stp script monitors systemcall used for polling and records the systemcalls that timed out rather than returned because some action occurred. The script updates the screen once a second with the top twenty processes.</p></li> +<li><a href="profiling/topsys.stp">profiling/topsys.stp</a> - Show Processes Doing Polling Operations<br> +keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The topsys.stp script lists out the top twenty systemcalls for the previous 5 seconds. The output is sorted from most frequent to least frequent.</p></li> </ul> </td> </tr> diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt index fce068b8..fdcd3b31 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -27,6 +27,16 @@ keywords: trace callgraph the trigger. +interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI) +keywords: interrupt backtrace + + The Linux kernel function smp_call_function causes expensive + inter-processor interrupts (IPIs). The scf.stp script tallies the + processes and backtraces causing the interprocessor interrupts to + identify the cause of the expensive IPI. On exit the script prints + the tallies in descending frequency. + + io/disktop.stp - Summarize Disk Read/Write Traffic keywords: disk @@ -42,6 +52,17 @@ keywords: io backtrace list from most common to least common backtrace. +io/iostats.stp - List Executables Reading and Writing the Most Data +keywords: io profiling + + The iostat.stp script measures the amount of data successfully read + and written by all the executables on the system. The output is + sorted from most greatest sum of bytes read and written by an + executable to the least. The output contains the count of operations + (opens, reads, and writes), the totals and averages for the number of + bytes read and written. + + io/iotime.stp - Trace Time Spent in Read and Write for Files keywords: syscall read write time io @@ -79,6 +100,29 @@ keywords: io to the specified device occur. +memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations +keywords: memory + + The kmalloc-top perl program runs a small systemtap script to collect + stack traces for each call to the kmalloc function and counts the + time that each stack trace is observed. When kmalloc-top exits it + prints out sorted list. The output can be be filtered to print only + only the first stack traces (-t) stack traces with more a minimum + counts (-m), or exclude certain stack traces (-e). + + +memory/pfaults.stp - Generate Log of Major and Minor Page Faults +keywords: memory + + The pfaults.stp script generates a simple log for each major and + minor page fault that occurs on the system. Each line contains a + timestamp (in microseconds) when the page fault servicing was + completed, the pid of the process, the address of the page fault, the + type of access (read or write), the type of fault (major or minor), + and the elapsed time for page fault. This log can be examined to + determine where the page faults are occuring. + + network/nettop.stp - Periodic Listing of Processes Using Network Interfaces keywords: network traffic per-process @@ -99,6 +143,16 @@ keywords: network socket element of the line is the function name. +network/tcp_connections.stp - Track Creation of Incoming TCP Connections +keywords: network tcp socket + + The tcp_connections.stp script prints information for each new + incoming TCP connection accepted by the computer. The information + includes the UID, the command accepting the connection, the PID of + the command, the port the connection is on, and the IP address of the + originator of the request. + + process/futexes.stp - System-Wide Futex Contention keywords: syscall locking futex @@ -211,3 +265,23 @@ keywords: profiling user-space and kernel-space. +profiling/timeout.stp - Show Processes Doing Polling Operations +keywords: profiling + + The timeout.stp script is based on a blog entry + (http://udrepper.livejournal.com/19041.html) mentioning a need for a + tool to help developers find applications that are polling. The + timeout.stp script monitors systemcall used for polling and records + the systemcalls that timed out rather than returned because some + action occurred. The script updates the screen once a second with the + top twenty processes. + + +profiling/topsys.stp - Show Processes Doing Polling Operations +keywords: profiling + + The topsys.stp script lists out the top twenty systemcalls for the + previous 5 seconds. The output is sorted from most frequent to least + frequent. + + diff --git a/testsuite/systemtap.examples/interrupt/scf.meta b/testsuite/systemtap.examples/interrupt/scf.meta new file mode 100644 index 00000000..1d6ec3d8 --- /dev/null +++ b/testsuite/systemtap.examples/interrupt/scf.meta @@ -0,0 +1,13 @@ +title: Tally Backtraces for Inter-Processor Interrupt (IPI) +name: scf.stp +version: 1.0 +author: William Cohen +keywords: interrupt backtrace +subsystem: kernel +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency. +test_check: stap -p4 scf.stp +test_installcheck: stap scf.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/interrupt/scf.stp b/testsuite/systemtap.examples/interrupt/scf.stp new file mode 100644 index 00000000..f84c2494 --- /dev/null +++ b/testsuite/systemtap.examples/interrupt/scf.stp @@ -0,0 +1,21 @@ +#! /usr/bin/env stap +# scf.stp +# A reimplementation of user script:smp_call_function example given at OLS 2005 +# in the current language. + +global traces + +probe begin { print("Starting probe, type control-c to stop.\n") } + +probe kernel.function("smp_call_function") +{ + traces[pid(), pexecname(), backtrace()] ++ +} + +probe end { + foreach ([pid, name, stack] in traces-) { # sort by frequency encountered + printf ("traces[%d,%s,\n", pid, name) + print_stack (stack) + printf ("] = %d\n", traces[pid, name, stack]); + } +} diff --git a/testsuite/systemtap.examples/io/iostats.meta b/testsuite/systemtap.examples/io/iostats.meta new file mode 100644 index 00000000..a74c9fe4 --- /dev/null +++ b/testsuite/systemtap.examples/io/iostats.meta @@ -0,0 +1,13 @@ +title: List Executables Reading and Writing the Most Data +name: iostats.stp +version: 1.0 +author: anonymous +keywords: io profiling +subsystem: io +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written. +test_check: stap -p4 iostats.stp +test_installcheck: stap iostats.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/io/iostats.stp b/testsuite/systemtap.examples/io/iostats.stp new file mode 100644 index 00000000..90bb4f5b --- /dev/null +++ b/testsuite/systemtap.examples/io/iostats.stp @@ -0,0 +1,44 @@ +#! /usr/bin/env stap +global opens, reads, writes, totals + +probe begin { printf("starting probe\n") } + +probe syscall.open { + e=execname(); + opens[e] <<< 1 # statistics array +} + +probe syscall.read.return { + count = $return + if ( count >= 0 ) { + e=execname(); + reads[e] <<< count # statistics array + totals[e] += count + } +} + +probe syscall.write.return { + count = $return + if (count >= 0 ) { + e=execname(); + writes[e] <<< count # statistics array + totals[e] += count + } +} + +probe end { + printf("\n%16s %8s %8s %8s %8s %8s %8s %8s\n", + "", "", "", "read", "read", "", "write", "write") + printf("%16s %8s %8s %8s %8s %8s %8s %8s\n", + "name", "open", "read", "KB tot", "B avg", "write", "KB tot", "B avg") + foreach (name in totals- limit 20) { # sort by total io + printf("%16s %8d %8d %8d %8d %8d %8d %8d\n", + name, @count(opens[name]), + @count(reads[name]), + (@count(reads[name]) ? @sum(reads[name])>>10 : 0 ), + (@count(reads[name]) ? @avg(reads[name]) : 0 ), + @count(writes[name]), + (@count(writes[name]) ? @sum(writes[name])>>10 : 0 ), + (@count(writes[name]) ? @avg(writes[name]) : 0 )) + } +} diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index 61112579..b3ea0943 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -39,9 +39,12 @@ </ul> <h2>Examples by Keyword</h2> -<p><tt><a href="#BACKTRACE">BACKTRACE</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p> +<p><tt><a href="#BACKTRACE">BACKTRACE</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#MEMORY">MEMORY</a> <a href="#NETWORK">NETWORK</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TCP">TCP</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p> <h3><a name="BACKTRACE">BACKTRACE</a></h3> <ul> +<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br> +keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> +<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li> <li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> <p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li> @@ -88,11 +91,20 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde keywords: <a href="keyword-index.html#DISK">DISK</a> <a href="keyword-index.html#CPU">CPU</a> <a href="keyword-index.html#USE">USE</a> <a href="keyword-index.html#GRAPH">GRAPH</a> <br> <p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li> </ul> +<h3><a name="INTERRUPT">INTERRUPT</a></h3> +<ul> +<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br> +keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> +<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li> +</ul> <h3><a name="IO">IO</a></h3> <ul> <li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> <p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li> +<li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> <li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br> keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br> <p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parenthesese. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li> @@ -115,6 +127,15 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCH keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#LOCKING">LOCKING</a> <a href="keyword-index.html#FUTEX">FUTEX</a> <br> <p>The script watches the futex syscall on the system. On exit the futexes address, the number of contentions, and the average time for each contention on the futex are printed from lowest pid number to highest.</p></li> </ul> +<h3><a name="MEMORY">MEMORY</a></h3> +<ul> +<li><a href="memory/kmalloc-top">memory/kmalloc-top</a> - Show Paths to Kernel Malloc (kmalloc) Invocations<br> +keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e).</p></li> +<li><a href="memory/pfaults.stp">memory/pfaults.stp</a> - Generate Log of Major and Minor Page Faults<br> +keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br> +<p>The pfaults.stp script generates a simple log for each major and minor page fault that occurs on the system. Each line contains a timestamp (in microseconds) when the page fault servicing was completed, the pid of the process, the address of the page fault, the type of access (read or write), the type of fault (major or minor), and the elapsed time for page fault. This log can be examined to determine where the page faults are occuring.</p></li> +</ul> <h3><a name="NETWORK">NETWORK</a></h3> <ul> <li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br> @@ -123,6 +144,9 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde <li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> <p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li> +<li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> +<p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li> </ul> <h3><a name="PER-PROCESS">PER-PROCESS</a></h3> <ul> @@ -132,6 +156,9 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde </ul> <h3><a name="PROFILING">PROFILING</a></h3> <ul> +<li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> <li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br> keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li> @@ -141,6 +168,12 @@ keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword- <li><a href="profiling/thread-times.stp">profiling/thread-times.stp</a> - Profile kernel functions<br> keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p>The thread-times.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top twenty processes with samples broken down into percentage total time spent in user-space and kernel-space.</p></li> +<li><a href="profiling/timeout.stp">profiling/timeout.stp</a> - Show Processes Doing Polling Operations<br> +keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p>The timeout.stp script is based on a blog entry (http://udrepper.livejournal.com/19041.html) mentioning a need for a tool to help developers find applications that are polling. The timeout.stp script monitors systemcall used for polling and records the systemcalls that timed out rather than returned because some action occurred. The script updates the screen once a second with the top twenty processes.</p></li> +<li><a href="profiling/topsys.stp">profiling/topsys.stp</a> - Show Processes Doing Polling Operations<br> +keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The topsys.stp script lists out the top twenty systemcalls for the previous 5 seconds. The output is sorted from most frequent to least frequent.</p></li> </ul> <h3><a name="READ">READ</a></h3> <ul> @@ -186,6 +219,9 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde <li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br> keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> <p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li> +<li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> +<p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li> </ul> <h3><a name="SYSCALL">SYSCALL</a></h3> <ul> @@ -208,6 +244,12 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br> keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#WAIT4">WAIT4</a> <br> <p>The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".</p></li> </ul> +<h3><a name="TCP">TCP</a></h3> +<ul> +<li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br> +keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br> +<p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li> +</ul> <h3><a name="TIME">TIME</a></h3> <ul> <li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br> diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt index 8cafd43f..5f382e75 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -3,6 +3,16 @@ SYSTEMTAP EXAMPLES INDEX BY KEYWORD = BACKTRACE = +interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI) +keywords: interrupt backtrace + + The Linux kernel function smp_call_function causes expensive + inter-processor interrupts (IPIs). The scf.stp script tallies the + processes and backtraces causing the interprocessor interrupts to + identify the cause of the expensive IPI. On exit the script prints + the tallies in descending frequency. + + io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call keywords: io backtrace @@ -93,6 +103,18 @@ keywords: disk cpu use graph and CPU USE. += INTERRUPT = + +interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI) +keywords: interrupt backtrace + + The Linux kernel function smp_call_function causes expensive + inter-processor interrupts (IPIs). The scf.stp script tallies the + processes and backtraces causing the interprocessor interrupts to + identify the cause of the expensive IPI. On exit the script prints + the tallies in descending frequency. + + = IO = io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call @@ -103,6 +125,17 @@ keywords: io backtrace list from most common to least common backtrace. +io/iostats.stp - List Executables Reading and Writing the Most Data +keywords: io profiling + + The iostat.stp script measures the amount of data successfully read + and written by all the executables on the system. The output is + sorted from most greatest sum of bytes read and written by an + executable to the least. The output contains the count of operations + (opens, reads, and writes), the totals and averages for the number of + bytes read and written. + + io/iotime.stp - Trace Time Spent in Read and Write for Files keywords: syscall read write time io @@ -160,6 +193,31 @@ keywords: syscall locking futex highest. += MEMORY = + +memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations +keywords: memory + + The kmalloc-top perl program runs a small systemtap script to collect + stack traces for each call to the kmalloc function and counts the + time that each stack trace is observed. When kmalloc-top exits it + prints out sorted list. The output can be be filtered to print only + only the first stack traces (-t) stack traces with more a minimum + counts (-m), or exclude certain stack traces (-e). + + +memory/pfaults.stp - Generate Log of Major and Minor Page Faults +keywords: memory + + The pfaults.stp script generates a simple log for each major and + minor page fault that occurs on the system. Each line contains a + timestamp (in microseconds) when the page fault servicing was + completed, the pid of the process, the address of the page fault, the + type of access (read or write), the type of fault (major or minor), + and the elapsed time for page fault. This log can be examined to + determine where the page faults are occuring. + + = NETWORK = network/nettop.stp - Periodic Listing of Processes Using Network Interfaces @@ -182,6 +240,16 @@ keywords: network socket element of the line is the function name. +network/tcp_connections.stp - Track Creation of Incoming TCP Connections +keywords: network tcp socket + + The tcp_connections.stp script prints information for each new + incoming TCP connection accepted by the computer. The information + includes the UID, the command accepting the connection, the PID of + the command, the port the connection is on, and the IP address of the + originator of the request. + + = PER-PROCESS = network/nettop.stp - Periodic Listing of Processes Using Network Interfaces @@ -195,6 +263,17 @@ keywords: network traffic per-process = PROFILING = +io/iostats.stp - List Executables Reading and Writing the Most Data +keywords: io profiling + + The iostat.stp script measures the amount of data successfully read + and written by all the executables on the system. The output is + sorted from most greatest sum of bytes read and written by an + executable to the least. The output contains the count of operations + (opens, reads, and writes), the totals and averages for the number of + bytes read and written. + + process/pf2.stp - Profile kernel functions keywords: profiling @@ -222,6 +301,26 @@ keywords: profiling user-space and kernel-space. +profiling/timeout.stp - Show Processes Doing Polling Operations +keywords: profiling + + The timeout.stp script is based on a blog entry + (http://udrepper.livejournal.com/19041.html) mentioning a need for a + tool to help developers find applications that are polling. The + timeout.stp script monitors systemcall used for polling and records + the systemcalls that timed out rather than returned because some + action occurred. The script updates the screen once a second with the + top twenty processes. + + +profiling/topsys.stp - Show Processes Doing Polling Operations +keywords: profiling + + The topsys.stp script lists out the top twenty systemcalls for the + previous 5 seconds. The output is sorted from most frequent to least + frequent. + + = READ = io/iotime.stp - Trace Time Spent in Read and Write for Files @@ -318,6 +417,16 @@ keywords: network socket element of the line is the function name. +network/tcp_connections.stp - Track Creation of Incoming TCP Connections +keywords: network tcp socket + + The tcp_connections.stp script prints information for each new + incoming TCP connection accepted by the computer. The information + includes the UID, the command accepting the connection, the PID of + the command, the port the connection is on, and the IP address of the + originator of the request. + + = SYSCALL = io/iotime.stp - Trace Time Spent in Read and Write for Files @@ -381,6 +490,18 @@ keywords: syscall wait4 waiting for. If the waited for PID is not specified , it is "-1". += TCP = + +network/tcp_connections.stp - Track Creation of Incoming TCP Connections +keywords: network tcp socket + + The tcp_connections.stp script prints information for each new + incoming TCP connection accepted by the computer. The information + includes the UID, the command accepting the connection, the PID of + the command, the port the connection is on, and the IP address of the + originator of the request. + + = TIME = io/iotime.stp - Trace Time Spent in Read and Write for Files diff --git a/testsuite/systemtap.samples/kmalloc-top b/testsuite/systemtap.examples/memory/kmalloc-top index 42a6d152..ccce0c17 100755 --- a/testsuite/systemtap.samples/kmalloc-top +++ b/testsuite/systemtap.examples/memory/kmalloc-top @@ -1,7 +1,8 @@ #!/usr/bin/perl # # This script accumulates the execution paths of all calls to kmalloc -# in the kernel. On Ctrl-C, it sorts, filters and displays them on +# in the kernel. On Ctrl-C (or exit of the command provided by -c option), +# it sorts, filters and displays them on # stdout. # # The -e (exclude) option can be used to specify a comma-separated list @@ -11,33 +12,77 @@ # The -m (min) option can be used to specify the minimum number of # occurrences a stack needs to be included in the output. # -# Usage: ./kmalloc-top [-m min] [-i exclude list] +# The -t (top) option can be used to specify printing only the +# top N stack traces. +# +# The -c (command) option runs starts the command and script +# only runs for the duration of the command. +# +# The -o (options) option passes the options to systemap. +# +# Usage: ./kmalloc-top [-m min] [-e exclude list] [-t top_n] [-c command] +# [-o options] # Ctrl-c use Getopt::Std; my $kmalloc_stacks; my $total_kmallocs; +my $filtered_kmallocs; my $sorted_stacks; +my $first_n = 1000000000; my $min_count = 1; my $exclude; +my $options; $SIG{INT} = \&sigint_handler; -getopts('e:m:'); +getopts('c:e:m:t:o:'); if ($opt_e) { $exclude = join('|', split(/,/, $opt_e)); print "Will exclude stacks containing: $exclude\n"; } +if ($opt_t) { + $first_n = $opt_t; + print "Will print only the top $first_n stacks.\n"; +} + if ($opt_m) { - $min_count = $opt_n; + $min_count = $opt_m; +} + +if ($opt_c) { + $command="-c \"$opt_c\"" +} + +if ($opt_o) { + $options=$opt_o } + print "Will print stacks with counts >= $min_count.\n"; print STDERR "Press Ctrl-C to stop.\n"; -open STREAM, "stap -g kmalloc-stacks.stp |" or die "Couldn't get output stream $!"; +#The systemtap script that instruments the kmalloc +$script=" +global kmalloc_stack + +probe kernel.function(\"__kmalloc\") { kmalloc_stack[backtrace()]++ } + +probe timer.ms(100), end +{ + foreach (stack in kmalloc_stack) { + printf(\"<hashkey>\\n\") + print_stack(stack) + printf(\"</hashkey>\\n\") + printf(\"<hashval>%d</hashval>\\n\", kmalloc_stack[stack]) + } + delete kmalloc_stack +} +"; + +open STREAM, "stap $options -e '$script' $command|" or die "Couldn't get output stream $!"; while (<STREAM>) { if (/<hashval>(.*?)<\/hashval>/) { @@ -49,9 +94,13 @@ while (<STREAM>) { } $num_keys_before_filtering = scalar keys %kmalloc_stacks; +$total_kmallocs = count_kmallocs(); filter_stacks(); -$num_keys_after_filtering = scalar keys %kmalloc_stacks; sort_stacks(); +top_stacks(); +sort_stacks(); +$num_keys_after_filtering = scalar keys %kmalloc_stacks; +$filtered_kmallocs = count_kmallocs(); summarize(); exit(); @@ -59,7 +108,6 @@ sub update_hash { my($key, $val) = @_; $kmalloc_stacks{$key} += $val; - $total_kmallocs += $val; } sub filter_stacks @@ -73,20 +121,46 @@ sub filter_stacks } } +sub top_stacks +{ + $count=0; + foreach $stack(@sorted_stacks) { + $count+=1; + if ($count > $first_n) { + delete $kmalloc_stacks{$stack}; + } + } +} + sub sort_stacks { @sorted_stacks = sort { $kmalloc_stacks{$b} <=> $kmalloc_stacks{$a} } keys %kmalloc_stacks; } +sub count_kmallocs { + $count = 0; + foreach $stack(%kmalloc_stacks) { + $count += $kmalloc_stacks{$stack}; + } + return $count; +} + sub summarize { print "\n"; foreach $stack(@sorted_stacks) { print "This path seen $kmalloc_stacks{$stack} times:\n$stack\n"; } - print "Total kmallocs (before filtering): $total_kmallocs\n"; + if ($total_kmallocs > 0) { + $percent = ($filtered_kmallocs)*100/$total_kmallocs; + } else { + $percent = 0; + } print "Num stacks before filtering: $num_keys_before_filtering\n"; print "Num stacks after filtering: $num_keys_after_filtering\n"; + print "Total kmallocs (before filtering): $total_kmallocs\n"; + print "Total kmallocs (after filtering): $filtered_kmallocs\n"; + print "The filter stacks have $percent of the total kmallocs\n"; close(STREAM); } diff --git a/testsuite/systemtap.examples/memory/kmalloc-top.meta b/testsuite/systemtap.examples/memory/kmalloc-top.meta new file mode 100644 index 00000000..93308909 --- /dev/null +++ b/testsuite/systemtap.examples/memory/kmalloc-top.meta @@ -0,0 +1,13 @@ +title: Show Paths to Kernel Malloc (kmalloc) Invocations +name: kmalloc-top +version: 1.0 +author: anonymous +keywords: memory +subsystem: memory +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e). +test_check: ./kmalloc-top -o "-p4" -c "sleep 0" +test_installcheck: ./kmalloc-top -c "sleep 1" diff --git a/testsuite/systemtap.examples/memory/pfaults.meta b/testsuite/systemtap.examples/memory/pfaults.meta new file mode 100644 index 00000000..149d83fa --- /dev/null +++ b/testsuite/systemtap.examples/memory/pfaults.meta @@ -0,0 +1,13 @@ +title: Generate Log of Major and Minor Page Faults +name: pfaults.stp +version: 1.0 +author: anonymous +keywords: memory +subsystem: memory +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The pfaults.stp script generates a simple log for each major and minor page fault that occurs on the system. Each line contains a timestamp (in microseconds) when the page fault servicing was completed, the pid of the process, the address of the page fault, the type of access (read or write), the type of fault (major or minor), and the elapsed time for page fault. This log can be examined to determine where the page faults are occuring. +test_check: stap -p4 pfaults.stp +test_installcheck: stap pfaults.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/memory/pfaults.stp b/testsuite/systemtap.examples/memory/pfaults.stp new file mode 100644 index 00000000..5bf1a8a6 --- /dev/null +++ b/testsuite/systemtap.examples/memory/pfaults.stp @@ -0,0 +1,35 @@ +#! /usr/bin/env stap + +global fault_entry_time, fault_address, fault_access +global time_offset + +probe begin { time_offset = gettimeofday_us() } + +probe vm.pagefault { + t = gettimeofday_us() + p = pid() + fault_entry_time[p] = t + fault_address[p] = address + fault_access[p] = write_access ? "w" : "r" +} + +probe vm.pagefault.return { + t=gettimeofday_us() + p = pid() + if (!(p in fault_entry_time)) next + e = t - fault_entry_time[p] + if (vm_fault_contains(fault_type,VM_FAULT_MINOR)) { + ftype="minor" + } else if (vm_fault_contains(fault_type,VM_FAULT_MAJOR)) { + ftype="major" + } else { + next #only want to deal with minor and major page faults + } + + printf("%d:%d:%p:%s:%s:%d\n", + t - time_offset, p, fault_address[p], fault_access[p], ftype, e) + #free up memory + delete fault_entry_time[p] + delete fault_address[p] + delete fault_access[p] +} diff --git a/testsuite/systemtap.examples/network/tcp_connections.meta b/testsuite/systemtap.examples/network/tcp_connections.meta new file mode 100644 index 00000000..0bc9bcb1 --- /dev/null +++ b/testsuite/systemtap.examples/network/tcp_connections.meta @@ -0,0 +1,13 @@ +title: Track Creation of Incoming TCP Connections +name: tcp_connections.stp +version: 1.0 +author: anonymous +keywords: network tcp socket +subsystem: kernel +status: production +exit: user-controlled +output: trace +scope: system-wide +description: The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request. +test_check: stap -p4 tcp_connections.stp +test_installcheck: stap tcp_connections.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/network/tcp_connections.stp b/testsuite/systemtap.examples/network/tcp_connections.stp new file mode 100644 index 00000000..bd2db76a --- /dev/null +++ b/testsuite/systemtap.examples/network/tcp_connections.stp @@ -0,0 +1,14 @@ +#! /usr/bin/env stap + +probe begin { + printf("%6s %16s %6s %6s %16s\n", + "UID", "CMD", "PID", "PORT", "IP_SOURCE") +} + +probe kernel.function("tcp_accept").return?, + kernel.function("inet_csk_accept").return? { + sock = $return + if (sock != 0) + printf("%6d %16s %6d %6d %16s\n", uid(), execname(), pid(), + inet_get_local_port(sock), inet_get_ip_source(sock)) +} diff --git a/testsuite/systemtap.examples/profiling/functioncallcount.stp b/testsuite/systemtap.examples/profiling/functioncallcount.stp index 9e9ec3fd..31eaee70 100755 --- a/testsuite/systemtap.examples/profiling/functioncallcount.stp +++ b/testsuite/systemtap.examples/profiling/functioncallcount.stp @@ -4,7 +4,7 @@ # # stap functioncallcount.stp "*@mm/*.c" -probe kernel.function(@1) { # probe functions listed on commandline +probe kernel.function(@1).call { # probe functions listed on commandline called[probefunc()] <<< 1 # add a count efficiently } diff --git a/testsuite/systemtap.examples/profiling/latencytap.stp b/testsuite/systemtap.examples/profiling/latencytap.stp index 96944858..28956129 100644 --- a/testsuite/systemtap.examples/profiling/latencytap.stp +++ b/testsuite/systemtap.examples/profiling/latencytap.stp @@ -22,8 +22,8 @@ function _get_sleep_time:long(rq_param:long, p_param:long) # Get the backtrace from an arbitrary task function task_backtrace:string (task:long) %{ - _stp_stack_snprint(THIS->__retvalue, MAXSTRINGLEN, - task_pt_regs((struct task_struct *)THIS->task), 0, 0, MAXTRACE); + _stp_stack_snprint_tsk(THIS->__retvalue, MAXSTRINGLEN, + (struct task_struct *)THIS->task, 0, MAXTRACE); %} probe kernel.function("enqueue_task_fair") { @@ -41,6 +41,9 @@ global pid_sleep probe timer.ms(1000) { foreach ([pid, backtrace] in sleep_time) { pid_sleep[pid] += sleep_time[pid, backtrace] + printf("%s %d:\n", process_names[pid], pid) + print_stack(backtrace) + printf("\n") } foreach ([pid+] in pid_sleep) { printf("%s %d %d\n", process_names[pid], @max(sleep_agg[pid]) / 1000000, @avg(sleep_agg[pid]) / 1000000) diff --git a/testsuite/systemtap.examples/profiling/timeout.meta b/testsuite/systemtap.examples/profiling/timeout.meta new file mode 100644 index 00000000..aa683c0a --- /dev/null +++ b/testsuite/systemtap.examples/profiling/timeout.meta @@ -0,0 +1,13 @@ +title: Show Processes Doing Polling Operations +name: timeout.stp +version: 1.0 +author: Uli Drepper and William Cohen +keywords: profiling +subsystem: kernel +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The timeout.stp script is based on a blog entry (http://udrepper.livejournal.com/19041.html) mentioning a need for a tool to help developers find applications that are polling. The timeout.stp script monitors systemcall used for polling and records the systemcalls that timed out rather than returned because some action occurred. The script updates the screen once a second with the top twenty processes. +test_check: stap -p4 timeout.stp +test_installcheck: stap timeout.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/profiling/timeout.stp b/testsuite/systemtap.examples/profiling/timeout.stp new file mode 100644 index 00000000..48d6d21d --- /dev/null +++ b/testsuite/systemtap.examples/profiling/timeout.stp @@ -0,0 +1,102 @@ +#! /usr/bin/env stap +# Copyright (C) 2009 Red Hat, Inc. +# Written by Ulrich Drepper <drepper@redhat.com> +# Modified by William Cohen <wcohen@redhat.com> + +global process, timeout_count, to +global poll_timeout, epoll_timeout, select_timeout, itimer_timeout +global nanosleep_timeout, futex_timeout, signal_timeout + +probe syscall.poll, syscall.epoll_wait { + if (timeout) to[pid()]=timeout +} + +probe syscall.poll.return { + p = pid() + if ($return == 0 && to[p] > 0 ) { + poll_timeout[p]++ + timeout_count[p]++ + process[p] = execname() + delete to[p] + } +} + +probe syscall.epoll_wait.return { + p = pid() + if ($return == 0 && to[p] > 0 ) { + epoll_timeout[p]++ + timeout_count[p]++ + process[p] = execname() + delete to[p] + } +} + +probe syscall.select.return { + if ($return == 0) { + p = pid() + select_timeout[p]++ + timeout_count[p]++ + process[p] = execname() + } +} + +probe syscall.futex.return { + if (errno_str($return) == "ETIMEDOUT") { + p = pid() + futex_timeout[p]++ + timeout_count[p]++ + process[p] = execname() + } +} + +probe syscall.nanosleep.return { + if ($return == 0) { + p = pid() + nanosleep_timeout[p]++ + timeout_count[p]++ + process[p] = execname() + } +} + +probe kernel.function("it_real_fn") { + p = pid() + itimer_timeout[p]++ + timeout_count[p]++ + process[p] = execname() +} + +probe syscall.rt_sigtimedwait.return { + if (errno_str($return) == "EAGAIN") { + p = pid() + signal_timeout[p]++ + timeout_count[p]++ + process[p] = execname() + } +} + +probe syscall.exit { + p = pid() + if (p in process) { + delete process[p] + delete timeout_count[p] + delete poll_timeout[p] + delete epoll_timeout[p] + delete select_timeout[p] + delete itimer_timeout[p] + delete futex_timeout[p] + delete nanosleep_timeout[p] + delete signal_timeout[p] + } +} + +probe timer.s(1) { + printf("\033[2J\033[1;1H") /* clear screen */ + printf (" uid | poll select epoll itimer futex nanosle signal| process\n") + foreach (p in timeout_count- limit 20) { + printf ("%5d |%7d %7d %7d %7d %7d %7d %7d| %-.38s\n", p, + poll_timeout[p], select_timeout[p], + epoll_timeout[p], itimer_timeout[p], + futex_timeout[p], nanosleep_timeout[p], + signal_timeout[p], process[p]) + } +} diff --git a/testsuite/systemtap.examples/profiling/topsys.meta b/testsuite/systemtap.examples/profiling/topsys.meta new file mode 100644 index 00000000..3642713d --- /dev/null +++ b/testsuite/systemtap.examples/profiling/topsys.meta @@ -0,0 +1,13 @@ +title: Show Processes Doing Polling Operations +name: topsys.stp +version: 1.0 +author: anonymous +keywords: profiling +subsystem: kernel syscalls +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The topsys.stp script lists out the top twenty systemcalls for the previous 5 seconds. The output is sorted from most frequent to least frequent. +test_check: stap -p4 topsys.stp +test_installcheck: stap topsys.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/profiling/topsys.stp b/testsuite/systemtap.examples/profiling/topsys.stp new file mode 100644 index 00000000..34cf826c --- /dev/null +++ b/testsuite/systemtap.examples/profiling/topsys.stp @@ -0,0 +1,24 @@ +#! /usr/bin/env stap +# +# This script continuously lists the top 20 systemcalls in the interval +# 5 seconds +# + +global syscalls_count + +probe syscall.* { + syscalls_count[name]++ +} + +function print_systop () { + printf ("%25s %10s\n", "SYSCALL", "COUNT") + foreach (syscall in syscalls_count- limit 20) { + printf("%25s %10d\n", syscall, syscalls_count[syscall]) + } + delete syscalls_count +} + +probe timer.s(5) { + print_systop () + printf("--------------------------------------------------------------\n") +} diff --git a/testsuite/systemtap.samples/args.exp b/testsuite/systemtap.samples/args.exp deleted file mode 100644 index 6b1fd3d0..00000000 --- a/testsuite/systemtap.samples/args.exp +++ /dev/null @@ -1,82 +0,0 @@ -set test "args" -if {![installtest_p]} { untested $test; return } - -set stappath [exec which stap] -set staprunpath [exec which staprun] - -if [file exists $staprunpath] { - pass "$test search for staprun" -} else { - fail "$test search for staprun" - return -} - -set modname "args_[pid]" -spawn stap -w -k -p4 -m $modname $srcdir/$subdir/args.stp -set tmpdir NO_SUCH_FILE -expect { - -timeout 120 - -re {Keeping temporary directory "([/a-zA-Z0-9_]*)"} { pass "$test compile"; - set tmpdir $expect_out(1,string) } - timeout { fail "$test compile (timeout)" } - eof { } -} -catch {close}; wait - -set modpath_cwd "$modname.ko" -if [file exists $modpath_cwd] { - pass "$test search for probe module" -} else { - fail "$test search for probe module" - return -} -exec /bin/rm -f $modpath_cwd - -if [file exists $tmpdir] { - pass "$test search for tmpdir" -} else { - fail "$test search for tmpdir" - return -} - -set modpath "$tmpdir/$modname.ko" -if [file exists $modpath] { - pass "$test search for tmpdir probe module" -} else { - fail "$test search for tmpdir probe module" - return -} - -spawn $staprunpath $modpath foo=hello bar=999 -set ok 0 -expect { - -timeout 120 - -re {foo=hello bar=999} { incr ok } - timeout { } - eof { } -} -catch {close}; wait -if {$ok == 1} { - pass "$test run 1" -} else { - fail "$test run 1" -} - -spawn $staprunpath $modpath foo=goodbye bar=0 -set ok 0 -expect { - -timeout 120 - -re {foo=goodbye bar=0} { incr ok } - timeout { } - eof { } -} -catch {close}; wait -if {$ok == 1} { - pass "$test run 2" -} else { - fail "$test run 2" -} - - - -exec /bin/rm -rf $tmpdir diff --git a/testsuite/systemtap.samples/args.stp b/testsuite/systemtap.samples/args.stp deleted file mode 100644 index 84b6080e..00000000 --- a/testsuite/systemtap.samples/args.stp +++ /dev/null @@ -1,9 +0,0 @@ -#! stap - -global foo, bar - -probe begin { - printf("foo=%s bar=%d\n", foo, bar) - exit () -} - diff --git a/testsuite/systemtap.samples/iotask.stp b/testsuite/systemtap.samples/iotask.stp deleted file mode 100644 index 1b4c7243..00000000 --- a/testsuite/systemtap.samples/iotask.stp +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env stap -# iotask.stp -# A reimplementation of user script: iotask.stp given at OLS 2005 -# in the current language. -# -# Will Cohen -# 9/22/2005 - -global names, opens -global reads, read_bytes -global writes, write_bytes - -probe kernel.function("sys_open") { - ++names[execname()]; ++opens[execname()]; -} - -probe kernel.function("sys_read") { - ++names[execname()]; ++reads[execname()]; - read_bytes[execname()] += $count; -} - -probe kernel.function("sys_write") { - ++names[execname()]; ++writes[execname()]; - write_bytes[execname()] += $count; -} - -probe begin { println( "starting probe" ); } - -probe end { - foreach( name in names){ - printf ("process: %s\n", name); - if (opens[name]) - printf ("opens=%d\n",opens[name]) - if (reads[name]){ - count = reads[name]; total=read_bytes[name]; - printf("reads=%d, sum=%d, avg=%d\n", count, total, total/count); - } - if (writes[name]){ - count = writes[name]; total=write_bytes[name]; - printf("writes=%d, sum=%d, avg=%d\n", count, total, total/count); - } - println(""); - } -} diff --git a/testsuite/systemtap.samples/iotask2.stp b/testsuite/systemtap.samples/iotask2.stp deleted file mode 100644 index cc4707b7..00000000 --- a/testsuite/systemtap.samples/iotask2.stp +++ /dev/null @@ -1,42 +0,0 @@ -global names, opens, reads, writes - -probe begin { println("starting probe") } - -probe timer.ms(10000) { - println("stopping probe after 10 seconds") - exit() -} - -probe kernel.function("sys_open") { - e=execname(); names[e]=1 - opens[e] ++ # simple integer array -} - -probe kernel.function("sys_read") { - e=execname(); names[e]=1 - reads[e] <<< $count # statistics array -} - -probe kernel.function("sys_write") { - e=execname(); names[e]=1 - writes[e] <<< $count # statistics array -} - - -probe end { - foreach (name+ in names) { # sort by name - printf("process: %s\n", name) - if (opens[name]) - printf("opens n=%d\n", opens[name]) - if (@count(reads[name])) - printf("reads n=%d, sum=%d, avg=%d\n", - @count(reads[name]), # extracting stat results - @sum(reads[name]), - @avg(reads[name])) - if (@count(writes[name])) - printf("writes n=%d, sum=%d, avg=%d\n", - @count(writes[name]), # extracting stat results - @sum(writes[name]), - @avg(writes[name])) - } -} diff --git a/testsuite/systemtap.samples/kmalloc-stacks.stp b/testsuite/systemtap.samples/kmalloc-stacks.stp deleted file mode 100644 index 25a23f2d..00000000 --- a/testsuite/systemtap.samples/kmalloc-stacks.stp +++ /dev/null @@ -1,35 +0,0 @@ -global kmalloc_stack - -function reset_maxaction () %{ - if (CONTEXT && CONTEXT->actioncount) - CONTEXT->actioncount=0; -%} - -function write_output() -{ - foreach (stack in kmalloc_stack) { - log("<hashkey>"); - print_stack(stack); - log("</hashkey>"); - print("<hashval>"); - print(sprint(kmalloc_stack[stack])); - log("</hashval>"); - reset_maxaction(); - } -} - -probe timer.jiffies(5000) -{ - write_output(); - delete kmalloc_stack; -} - -probe kernel.function("__kmalloc") -{ - kmalloc_stack[backtrace()]++; -} - -probe end -{ - write_output(); -} diff --git a/testsuite/systemtap.samples/pfaults.exp b/testsuite/systemtap.samples/pfaults.exp deleted file mode 100644 index 2cab7c14..00000000 --- a/testsuite/systemtap.samples/pfaults.exp +++ /dev/null @@ -1,16 +0,0 @@ -set test "pfaults" -if {![installtest_p]} { untested $test; return } - -spawn stap -DMAXACTION=10000 -g $srcdir/$subdir/pfaults.stp -set pid $spawn_id -set ok 0 -expect { - -timeout 240 - -re {Page fault tracking, start time[^\r\n]+\r\n} { incr ok; exp_continue } - -re {Page fault tracking, end time[^\r\n]+\r\n} { incr ok; exp_continue } - timeout { fail "$test (timeout)" } - eof { } -} -#FIXME does not handle case of hanging pfaults.stp correctly -wait -if {$ok == 2} { pass "$test ($ok)" } { fail "$test ($ok)" } diff --git a/testsuite/systemtap.samples/pfaults.stp b/testsuite/systemtap.samples/pfaults.stp deleted file mode 100644 index 577e93cd..00000000 --- a/testsuite/systemtap.samples/pfaults.stp +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/env stap - -global pidnames, faults, fault_types - -probe vm.pagefault { - # Maintain a pid-to-execname mapping. This logic should get transplanted - # into a tapset script that is automatically included upon reference to - # its exported global variable. - pidnames[pid()] = execname() - - faults [pid(), $write_access ? 1 : 0] ++ -} - -probe vm.pagefault.return { - fault_types [pid(), $return] ++ -} - - -# Some constants, to come from a future "VM tapset" - -global VM_FAULT_OOM, VM_FAULT_SIGBUS, VM_FAULT_MINOR, VM_FAULT_MAJOR -probe begin { - VM_FAULT_OOM=-1 - VM_FAULT_SIGBUS=0 - VM_FAULT_MINOR=1 - VM_FAULT_MAJOR=2 -} - - -# Shut down the probing session after a while -probe timer.ms(1000) { report() } -probe timer.ms(10000) { exit() } - -function _(n) { return sprint(n) } # let's abbreviate - -function report () { - print ("time=" . _(gettimeofday_s()) . "\n") - foreach ([pid] in pidnames) { - if (faults[pid,0]+faults[pid,1] == 0) continue - print (pidnames[pid] . "[" . _(pid) . "]" . - " reads=" . _(faults[pid,0]) . - " writes=" . _(faults[pid,1]) . - " oom=" . _(fault_types[pid,VM_FAULT_OOM]) . - " sigbus=" . _(fault_types[pid,VM_FAULT_SIGBUS]) . - " minor=" . _(fault_types[pid,VM_FAULT_MINOR]) . - " major=" . _(fault_types[pid,VM_FAULT_MAJOR]) . - "\n") - } - delete faults - delete fault_types -} - -probe begin { - print ("Page fault tracking, start time=" . _(gettimeofday_s()) . "\n") -} -probe end { - print ("Page fault tracking, end time=" . _(gettimeofday_s()) . "\n") -} diff --git a/testsuite/systemtap.samples/primes.exp b/testsuite/systemtap.samples/primes.exp deleted file mode 100644 index f99f67cc..00000000 --- a/testsuite/systemtap.samples/primes.exp +++ /dev/null @@ -1,21 +0,0 @@ -set test "primes" -if {![installtest_p]} { untested $test; return } - -spawn stap $srcdir/$subdir/primes.stp -set ok 0 -expect { - -timeout 150 - -ex {odds[0] = 1} { incr ok; exp_continue } - -ex {odds[1] = 3} { incr ok; exp_continue } - -ex {odds[3] = 7} { incr ok; exp_continue } - -ex {odds[4] = 9} { incr ok; exp_continue } - -ex {evens[2] = 6} { incr ok; exp_continue } - -ex {evens[1] = 4} { incr ok; exp_continue } - -ex {evens[0] = 2} { incr ok; exp_continue } - timeout { fail "$test (timeout)" } - eof { } -} -#FIXME does not handle case of hanging primes.stp correctly -wait - -if {$ok == 7} { pass "$test" } { fail "$test" } diff --git a/testsuite/systemtap.samples/primes.stp b/testsuite/systemtap.samples/primes.stp deleted file mode 100644 index 1072b4b2..00000000 --- a/testsuite/systemtap.samples/primes.stp +++ /dev/null @@ -1,23 +0,0 @@ -#! stap - -global odds, evens - -probe begin { - # "no" and "ne" are local integers - for (i=1; i<10; i++) { - if (i % 2) odds [no++] = i - else evens [ne++] = i - } - delete odds[2] - delete evens[3] - exit () -} - -probe end { - foreach (x+ in odds) { - printf("odds[%d] = %d\n", x, odds[x]) - } - foreach (x in evens-) { - printf("evens[%d] = %d\n", x, evens[x]) - } -} diff --git a/testsuite/systemtap.samples/profile.exp b/testsuite/systemtap.samples/profile.exp deleted file mode 100644 index 87174d2c..00000000 --- a/testsuite/systemtap.samples/profile.exp +++ /dev/null @@ -1,15 +0,0 @@ -set test "profile" -if {![installtest_p]} { untested $test; return } - -spawn stap -DMAXMAPENTRIES=10000 $srcdir/$subdir/profile.stp -set ok 0 -expect { - -timeout 360 - -re {kernel.function[^\r]*ttime=[0-9]*\r} { incr ok; exp_continue } - timeout { fail "$test (timeout)" } - eof { } -} -#FIXME does not handle case of hanging primes.stp correctly -wait - -if {$ok > 0} { pass $test } { fail $test } diff --git a/testsuite/systemtap.samples/profile.stp b/testsuite/systemtap.samples/profile.stp deleted file mode 100644 index 62af76ae..00000000 --- a/testsuite/systemtap.samples/profile.stp +++ /dev/null @@ -1,35 +0,0 @@ -#! /usr/bin/env stap - -global command, syscall_count, syscall_times, this_syscall_time, this_syscall - -function accumulate () { - tid = tid() - if (! ([tid] in command)) command[tid] = execname() - syscall=pp() # just the substring ideally - syscall_count[tid,syscall] ++ - this_syscall[tid] = syscall - this_syscall_time[tid] = gettimeofday_us() -} -function decumulate () { - tid = tid() - syscall = this_syscall[tid] - syscall_times[tid,syscall] += gettimeofday_us() - this_syscall_time[tid] - # free up memory - delete(this_syscall[tid]) - delete(this_syscall_time[tid]) -} -probe kernel.function("sys_*").call { - accumulate () -} -probe kernel.function("sys_*").return { - decumulate () -} -probe timer.ms(5000) { - exit () -} -probe end { - foreach ([tid,syscall] in syscall_count- limit 30) { - printf("%s(%d) %s count=%d ttime=%d\n", command[tid], tid, syscall, - syscall_count[tid,syscall], syscall_times[tid,syscall]) - } -} diff --git a/testsuite/systemtap.samples/queue_demo.exp b/testsuite/systemtap.samples/queue_demo.exp deleted file mode 100644 index 49dfac05..00000000 --- a/testsuite/systemtap.samples/queue_demo.exp +++ /dev/null @@ -1,13 +0,0 @@ -set test "queue_demo" -if {![installtest_p]} { untested $test; return } - -spawn stap $srcdir/$subdir/queue_demo.stp -set ok 0 -expect { - -timeout 240 - -re {block-[^\r]*} { incr ok; exp_continue } - timeout { fail "$test (timeout)" } - eof { } -} - -if {$ok > 4 && $ok < 10} { pass "$test" } { fail "$test" } diff --git a/testsuite/systemtap.samples/queue_demo.stp b/testsuite/systemtap.samples/queue_demo.stp deleted file mode 100644 index 61a3b6d1..00000000 --- a/testsuite/systemtap.samples/queue_demo.stp +++ /dev/null @@ -1,32 +0,0 @@ - -probe begin { - qsq_start ("block-read") - qsq_start ("block-write") -} - -probe timer.ms(3500), end { - qsq_print ("block-read") - qsq_start ("block-read") - qsq_print ("block-write") - qsq_start ("block-write") -} - -probe timer.ms(10000) { exit () } - - -# synthesize queue work/service using three randomized "threads" for each queue. - -global tc -function qs_doit (thread, name) { - n = tc[thread] = (tc[thread]+1) % 3 # per-thread state counter - if (n==1) qs_wait (name) - else if (n==2) qs_run (name) - else if (n==0) qs_done (name) -} - -probe timer.ms(100).randomize(100) { qs_doit (0, "block-read") } -probe timer.ms(100).randomize(100) { qs_doit (1, "block-read") } -probe timer.ms(100).randomize(100) { qs_doit (2, "block-read") } -probe timer.ms(100).randomize(100) { qs_doit (3, "block-write") } -probe timer.ms(100).randomize(100) { qs_doit (4, "block-write") } -probe timer.ms(100).randomize(100) { qs_doit (5, "block-write") } diff --git a/testsuite/systemtap.samples/scf.stp b/testsuite/systemtap.samples/scf.stp deleted file mode 100644 index 1108fdea..00000000 --- a/testsuite/systemtap.samples/scf.stp +++ /dev/null @@ -1,25 +0,0 @@ -# scf.stp -# A reimplementation of user script:smp_call_function example given at OLS 2005 -# in the current language. -# -# Will Cohen -# 9/22/2005 - -global traces - -probe kernel.function("smp_call_function") -{ - traces[pid(), pexecname(), backtrace()] += 1; -} - -probe begin { print( "starting probe\n" ); } - -probe end { - print("end of data collection\n"); - foreach( [pid, name, stack] in traces){ - print( "traces[" . sprint(pid) . "," . name . ",\n" ); - print_stack(stack) - print( "] = " . sprint(traces[pid, name, stack]) ); - print( "\n" ); - } -} diff --git a/testsuite/systemtap.samples/scf2.stp b/testsuite/systemtap.samples/scf2.stp deleted file mode 100644 index 5ad46350..00000000 --- a/testsuite/systemtap.samples/scf2.stp +++ /dev/null @@ -1,13 +0,0 @@ -global traces - -probe kernel.function("smp_call_function") { - traces[pid(), pexecname(), backtrace()] ++ -} -probe timer.ms(1000) { exit () } -probe end { - foreach ([pid+, name, stack] in traces) { # sort by pid - printf ("traces[%d,%s,\n", pid, name) - print_stack (stack) - printf ("] = %d\n", traces[pid, name, stack]); - } -} diff --git a/testsuite/systemtap.samples/syscalls.stp b/testsuite/systemtap.samples/syscalls.stp deleted file mode 100644 index 3ccfb8e5..00000000 --- a/testsuite/systemtap.samples/syscalls.stp +++ /dev/null @@ -1,7 +0,0 @@ -#! stap - -global count -probe kernel.function("sys_*").call { - printf("%d %s\n", pid(), pp()) - if (++count > 100) exit() -} diff --git a/testsuite/systemtap.samples/syscalls1.exp b/testsuite/systemtap.samples/syscalls1.exp deleted file mode 100644 index eb8a0c6d..00000000 --- a/testsuite/systemtap.samples/syscalls1.exp +++ /dev/null @@ -1,14 +0,0 @@ -set test "syscalls-count" -if {![installtest_p]} { untested $test; return } - -spawn stap -p2 $srcdir/$subdir/syscalls.stp -set ok 0 -expect { - -timeout 180 - -re {kernel.function[^\r]*sys_[^\r]*\r} { incr ok; exp_continue } - timeout { fail "$test (timeout)" } - eof { } -} -#FIXME does not handle case of hanging psyscalls.stp correctly -wait -if {$ok > 200 && $ok < 350} { pass "$test ($ok)" } { fail "$test ($ok)" } diff --git a/testsuite/systemtap.samples/syscalls2.exp b/testsuite/systemtap.samples/syscalls2.exp deleted file mode 100644 index 7bbd9a51..00000000 --- a/testsuite/systemtap.samples/syscalls2.exp +++ /dev/null @@ -1,15 +0,0 @@ -set test "syscalls-run" -if {![installtest_p]} { untested $test; return } -spawn stap $srcdir/$subdir/syscalls.stp -set ok 0 -expect { - -timeout 240 - -re {[0-9]* kernel.function[^\r]*\r} { incr ok; exp_continue } - timeout { fail "$test (timeout)" } - eof { } -} -#FIXME does not handle case of hanging psyscalls.stp correctly -wait -# 150 is conservative - it's larger than 100 to allow a bit of slop -# between the exit() call and the actual shutdown -if {$ok >= 100 && $ok < 150} { pass "$test ($ok)" } { fail "$test ($ok)" } diff --git a/testsuite/systemtap.samples/tcp_connections.stp b/testsuite/systemtap.samples/tcp_connections.stp deleted file mode 100644 index a4449b60..00000000 --- a/testsuite/systemtap.samples/tcp_connections.stp +++ /dev/null @@ -1,49 +0,0 @@ -#! stap - -%{ -#include <linux/version.h> -#include <net/sock.h> -#include <net/tcp.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 -%} - -function get_local_port:long(sock) -%{ - unsigned long ptr = (unsigned long) THIS->sock; - - struct inet_sock *inet = (struct inet_sock *) ptr; - THIS->__retvalue = (long long) LPORT; -%} - -function get_ip_source:string(sock) -%{ - unsigned long ptr = (unsigned long) THIS->sock; - struct inet_sock *inet = (struct inet_sock *) ptr; - unsigned char addr[4]; - memcpy(addr, DADDR, sizeof(addr)); - sprintf(THIS->__retvalue, "%d.%d.%d.%d", - addr[0], addr[1], addr[2], addr[3]); - -%} - - -probe begin { - log ("UID\tCMD\t\tPID\t\tPORT\tIP_SOURCE") -} - -probe kernel.function("tcp_accept").return { - sock = $return - if (sock != 0) - log(sprint(uid())."\t". - execname()."\t\t". - sprint(pid())."\t\t ". - sprint(get_local_port(sock))."\t". - get_ip_source(sock)) -} diff --git a/testsuite/systemtap.samples/tcp_connections_wa.stp b/testsuite/systemtap.samples/tcp_connections_wa.stp deleted file mode 100644 index 4c5e2399..00000000 --- a/testsuite/systemtap.samples/tcp_connections_wa.stp +++ /dev/null @@ -1,55 +0,0 @@ -%{ -#include <linux/version.h> -#include <net/sock.h> -#include <net/tcp.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 -%} - - -function get_eax:long () %{ - if (CONTEXT && CONTEXT->regs) - THIS->__retvalue = CONTEXT->regs->eax; - else - THIS->__retvalue = 0; -%} - -function get_local_port:long(sock) -%{ - unsigned long ptr = (unsigned long) THIS->sock; - - struct inet_sock *inet = (struct inet_sock *) ptr; - THIS->__retvalue = (long long) LPORT; -%} - -function get_ip_source:string(sock) -%{ - unsigned long ptr = (unsigned long) THIS->sock; - struct inet_sock *inet = (struct inet_sock *) ptr; - unsigned char addr[4]; - memcpy(addr, DADDR, sizeof(addr)); - sprintf(THIS->__retvalue, "%d.%d.%d.%d", - addr[0], addr[1], addr[2], addr[3]); - -%} - -probe begin { - log ("UID\tCMD\t\tPID\t\tPORT\tIP_SOURCE") -} -probe kernel.function("tcp_accept").return { - sock = get_eax() - if (sock != 0) - log(sprint(uid())."\t". - execname()."\t\t". - sprint(pid())."\t\t ". - sprint(get_local_port(sock))."\t". - get_ip_source(sock)) -} - - diff --git a/testsuite/systemtap.samples/testlog.stp b/testsuite/systemtap.samples/testlog.stp deleted file mode 100644 index 5b702aa9..00000000 --- a/testsuite/systemtap.samples/testlog.stp +++ /dev/null @@ -1,6 +0,0 @@ -probe begin -{ - printf("Hello"); - printf("World"); - printf("\n"); -} diff --git a/testsuite/systemtap.samples/topsys.stp b/testsuite/systemtap.samples/topsys.stp deleted file mode 100644 index da31c858..00000000 --- a/testsuite/systemtap.samples/topsys.stp +++ /dev/null @@ -1,69 +0,0 @@ -#! stap -g -# -# This script continuously lists the top 20 systemcalls in the interval -# of 2000 jiffies. -# - -global syscalls_count, syscalls - -function syscall_name:string () %{ - char *str, buff[80]; - char *tok; - str = buff; - strlcpy(str, CONTEXT->probe_point, sizeof(buff)); - tok = strsep(&str, "\""); - tok = strsep(&str, "@"); - sprintf(str, "%-25s", tok); - strlcpy(THIS->__retvalue, str, MAXSTRINGLEN); -%} - -function reset_maxaction () %{ - if (CONTEXT && CONTEXT->actioncount) - CONTEXT->actioncount=0; -%} - -function accumulate () { - syscall=syscall_name() - syscalls_count[syscall]++ - # I use this array to refer to syscalls_count array in - # the reset_syscalls_count. Initalize with a non-zero. - syscalls[syscall]=1 -} - - -function print_top () { - lcnt=0 - reset_maxaction () - foreach ([syscall] in syscalls_count-) { - sys_cnt = syscalls_count[syscall] - log (syscall . "\t\t\t\t" . sprint(sys_cnt)) - if (lcnt++ == 20) - break; - } - syscalls_count[lsyscall]=0 -} - -function reset_syscalls_count () { - # For some reason, I have to do this to get pass the elaboration - # phase on RHEL4 (seg fault). Under FC4, it works fine with out - # the 'dummy_init' - syscalls["dummy_init"]=0 - foreach ([sys] in syscalls) - syscalls_count[sys]=0 -} - -function print_systop () { - log ("SYSCALL \t\t\t\tCOUNT") - print_top() - reset_syscalls_count () -} - -probe kernel.function("sys_*").call { - accumulate () -} - -probe timer.jiffies(2000) { - print_systop () - log("--------------------------------------------------------------") -} - diff --git a/testsuite/systemtap.syscall/ChangeLog b/testsuite/systemtap.syscall/ChangeLog deleted file mode 100644 index e3a1f8de..00000000 --- a/testsuite/systemtap.syscall/ChangeLog +++ /dev/null @@ -1,229 +0,0 @@ -2008-11-27 Mark Wielaard <mjw@redhat.com> - - * forkwait.c: clone (CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD) - is just fork (). - -2008-10-04 Mark Wielaard <mjw@redhat.com> - - * access.c: sys_access() calls through to sys_faccessat(). - * chmod.c: sys_chmod() calls through to sys_fchmodat(). - * link.c: sys_link() calls through to sys_linkat(), - sys_symlink() calls through to sys_symlinkat(), - sys_readlink() calls through to sys_readlinkat(). - -2008-09-17 Mark Wielaard <mjw@redhat.com> - - * forkwait.c: Low byte of flags is always set to SIGCHLD. - -2008-09-17 Mark Wielaard <mjw@redhat.com> - - * timer.c: Timer id can be arbitrary number. - -2008-09-17 Mark Wielaard <mjw@redhat.com> - - * swap.c: Don't try including unnecessary asm/page.h. - -2008-02-22 Frank Ch. Eigler <fche@elastic.org> - - * test.tcl: Support noexec /tmp by creating test directory - under build tree instead of /tmp. - -2007-10-12 David Wilder <dwilder@us.ibm.com> - - * timer.c: init tid to 0 to workaround bug on s390x. - -2007-10-11 David Wilder <dwilder@us.ibm.com> - - * futimes.c: Only test system calls that have - numbers assigned in asm/unistd.h. (see PR:4902) - -2007-10-09 Martin Hunt <hunt@redhat.com> - - * rt_signal.c: Fix expected results for IA64. - -2007-10-09 Martin Hunt <hunt@redhat.com> - - * rt_signal.c: Fix expected patterns to match - recent changes in tapsets. - - * signal.c: Use syscall(). Fix expected patterns. - -2007-10-01 Martin Hunt <hunt@redhat.com> - - * test.tcl (run_one_test): Append newlines when - using send_log(). - -2007-09-25 Martin Hunt <hunt@redhat.com> - - * test.tcl (run_one_test): Fix unsupported results. - Send failure diffs to log. - -2007-09-24 Martin Hunt <hunt@redhat.com> - - * link.c (main): Don't check result code. - -2007-09-19 Martin Hunt <hunt@redhat.com> - PR 4931 - * test-debug.tcl (cleanup): Remove print. - * README: Update. - * syscall.exp: Source test.tcl and call run_one_test() - from there. - * test.tcl: Rewrite as a function. Do compilation - as well as testing. Compile into and execute in - a directory in /tmp. - -2007-09-17 Martin Hunt <hunt@redhat.com> - - * timer.c (main): Remove the return value checks. - -2007-08-22 Martin Hunt <hunt@redhat.com> - - * futimes.c (main): Add utimensat tests. - -2007-08-16 Martin Hunt <hunt@redhat.com> - - * all_syscalls.stp: New file. Useful for debugging. - -2007-07-31 Martin Hunt <hunt@redhat.com> - - * clock.c (main): Change flags to hex. - -2007-07-30 David Wilder <dwilder@us.ibm.com> - - * readdwrite.c: Added pwrite and pread test - -2007-07-17 Martin Hunt <hunt@redhat.com> - - * poll.c (main): Don't hardcode fd. - -2007-07-16 Martin Hunt <hunt@redhat.com> - - * select.c (main): Ifdef SYS_pselect6. - * poll.c (main): Ifdef SYS_ppoll. - -2007-07-16 Martin Hunt <hunt@redhat.com> - - * select.c, poll.c: New. - -2007-07-10 Martin Hunt <hunt@redhat.com> - - * futimes.c (main): Ifdef out futimesat tests - if not defined. - - * uid16.c (main): 16-bit syscalls now have - the same name as 32-bit. Fix patterns. - -2007-07-03 Martin Hunt <hunt@redhat.com> - - * futimes.c: New test. - -2007-06-21 Martin Hunt <hunt@redhat.com> - - * chmod.c, dir.c, mmap.c, net1.c, readwrite.c, stat.c, - sync.c, trunc.c: Eliminated hardcoded fd numbers. - -2007-06-18 Martin Hunt <hunt@redhat.com> - - * syscall.exp (test_procedure): Use switch statements to clean - up the logic for setting flags for 64 and 32-bit passes. - -2007-05-25 Martin Hunt <hunt@redhat.com> - - * syscall.exp (test_procedure): Remove stray timeout assignment. - -2007-05-07 Martin Hunt <hunt@redhat.com> - - * signal.c (main): Fix expected expression to accept - both 32 and 64-bit pointers. - -2007-05-01 Martin Hunt <hunt@redhat.com> - - * statfs.c (main): Fix expected expression to accept - both 32 and 64-bit pointers. - -2007-04-24 David Wilder <dwilder@us.ibm.com> - - * syscall.exp: Enabled 64-bit tests on s390, 32-bit test to use -m31 - on s390. - -2007-04-23 Martin Hunt <hunt@redhat.com> - - * clock.c (main): Ifdef SYS_time. - -2007-04-23 Martin Hunt <hunt@redhat.com> - - * mmap.c (main): Use open() instead of creat(). - -2007-04-23 Martin Hunt <hunt@redhat.com> - - * syscall.exp (test_procedure): For 64-bit machines, first - run with "-m64" and then with "-m32". - -2007-04-10 Martin Hunt <hunt@redhat.com> - - * syscall.exp (test_procedure): Remove - test binaries when done. - -2007-01-17 Martin Hunt <hunt@redhat.com> - - * test.exp: Renamed to syscall.exp. - -2007-01-15 Mike Mason <mmlnx@us.ibm.com> - - * test.exp: test 32-bit binaries on ppc64 - -2007-01-09 Martin Hunt <hunt@redhat.com> - - * test.exp, test.tcl, test-debug.tcl: PR 3524. - Support for separtet source and obj trees. - -2006-10-27 Martin Hunt <hunt@redhat.com> - - * test.exp, test.tcl: Remove our own caching code - and just use systemtap's new caching. - - * acct.c (main): Make pattern less selective so - it works when run by root. - -2006-10-23 David Smith <dsmith@redhat.com> - - * test.exp (test_procedure): Handles cached module. - -2006-09-26 David Smith <dsmith@redhat.com> - - * test.tcl: Looks for 'staprun' instead of 'stpd'. - -2006-07-21 Martin Hunt <hunt@redhat.com> - - * signal.c: Fix expected pattern. - -2006-06-26 Martin Hunt <hunt@redhat.com> - * stat.c: Add utime() test - -2006-06-15 Martin Hunt <hunt@redhat.com> - * chmod.c: Results for some archs have - 4294967295 instead of -1. Fix expected results - for now. - -2006-06-15 Martin Hunt <hunt@redhat.com> - * chmod.c: New test. - -2006-06-14 Martin Hunt <hunt@redhat.com> - * test.tcl: Escape "|". - * uid.c: Add setfsuid and setfsgid tests. - * uid16.c: Ditto. - * mmap.c, openclose.c, readwrite.c, stat.c: Fix - expected results for sys_open calls. - -2006-06-14 Martin Hunt <hunt@redhat.com> - * setgetgid.c: Renamed to uid.c. Added more syscalls. - * uid16.c: Add some more calls. - -2006-06-13 Martin Hunt <hunt@redhat.com> - * test.exp: Modify to recognize unsupported tests. - * test.tcl: Ditto. - * uid16.c: ifdef out for all but i386. - -2006-06-13 Martin Hunt <hunt@redhat.com> - * sys.stp: Add indentation for nested syscalls. - * uid16.c: New. diff --git a/translate.cxx b/translate.cxx index cfd83438..f2ebf762 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1,5 +1,5 @@ // translation pass -// Copyright (C) 2005-2008 Red Hat Inc. +// Copyright (C) 2005-2009 Red Hat Inc. // Copyright (C) 2005-2008 Intel Corporation. // // This file is part of systemtap, and is free software. You can @@ -150,6 +150,7 @@ struct c_unparser: public unparser, public visitor void visit_print_format (print_format* e); void visit_stat_op (stat_op* e); void visit_hist_op (hist_op* e); + void visit_cast_op (cast_op* e); }; // A shadow visitor, meant to generate temporary variable declarations @@ -863,14 +864,14 @@ c_unparser::emit_common_header () o->newline() << "#define STAP_SESSION_ERROR 2"; o->newline() << "#define STAP_SESSION_STOPPING 3"; o->newline() << "#define STAP_SESSION_STOPPED 4"; - o->newline() << "atomic_t session_state = ATOMIC_INIT (STAP_SESSION_STARTING);"; - o->newline() << "atomic_t error_count = ATOMIC_INIT (0);"; - o->newline() << "atomic_t skipped_count = ATOMIC_INIT (0);"; + o->newline() << "static atomic_t session_state = ATOMIC_INIT (STAP_SESSION_STARTING);"; + o->newline() << "static atomic_t error_count = ATOMIC_INIT (0);"; + o->newline() << "static atomic_t skipped_count = ATOMIC_INIT (0);"; o->newline() << "#ifdef STP_TIMING"; - o->newline() << "atomic_t skipped_count_lowstack = ATOMIC_INIT (0);"; - o->newline() << "atomic_t skipped_count_reentrant = ATOMIC_INIT (0);"; - o->newline() << "atomic_t skipped_count_uprobe_reg = ATOMIC_INIT (0);"; - o->newline() << "atomic_t skipped_count_uprobe_unreg = ATOMIC_INIT (0);"; + o->newline() << "static atomic_t skipped_count_lowstack = ATOMIC_INIT (0);"; + o->newline() << "static atomic_t skipped_count_reentrant = ATOMIC_INIT (0);"; + o->newline() << "static atomic_t skipped_count_uprobe_reg = ATOMIC_INIT (0);"; + o->newline() << "static atomic_t skipped_count_uprobe_unreg = ATOMIC_INIT (0);"; o->newline() << "#endif"; o->newline(); o->newline() << "struct context {"; @@ -884,7 +885,6 @@ c_unparser::emit_common_header () // While it's 0, execution continues // When it's "something", probe code unwinds, _stp_error's, sets error state o->newline() << "const char *last_stmt;"; - o->newline() << "struct pt_regs regs_buffer;"; // reserved for synthetic o->newline() << "struct pt_regs *regs;"; o->newline() << "unsigned long *unwaddr;"; // unwaddr is caching unwound address in each probe handler on ia64. @@ -1002,7 +1002,7 @@ c_unparser::emit_common_header () } o->newline(-1) << "} locals [MAXNESTING];"; o->newline(-1) << "};\n"; - o->newline() << "void *contexts = NULL; /* alloc_percpu */\n"; + o->newline() << "static void *contexts = NULL; /* alloc_percpu */\n"; emit_map_type_instantiations (); @@ -1055,7 +1055,7 @@ c_unparser::emit_global (vardecl *v) o->newline() << "rwlock_t s_" << vn << "_lock;"; o->newline() << "#ifdef STP_TIMING"; o->newline() << "atomic_t s_" << vn << "_lock_skip_count;"; - o->newline() << "#endif" << endl; + o->newline() << "#endif\n"; } @@ -1097,7 +1097,7 @@ c_unparser::emit_module_init () g[i]->emit_module_decls (*session); o->newline(); - o->newline() << "int systemtap_module_init (void) {"; + o->newline() << "static int systemtap_module_init (void) {"; o->newline(1) << "int rc = 0;"; o->newline() << "int i=0, j=0;"; // for derived_probe_group use o->newline() << "const char *probe_point = \"\";"; @@ -1244,7 +1244,7 @@ c_unparser::emit_module_init () void c_unparser::emit_module_exit () { - o->newline() << "void systemtap_module_exit (void) {"; + o->newline() << "static void systemtap_module_exit (void) {"; // rc? o->newline(1) << "int holdon;"; o->newline() << "int i=0, j=0;"; // for derived_probe_group use @@ -1391,7 +1391,7 @@ c_unparser::emit_module_exit () void c_unparser::emit_function (functiondecl* v) { - o->newline() << "void function_" << c_varname (v->name) + o->newline() << "static void function_" << c_varname (v->name) << " (struct context* __restrict__ c) {"; o->indent(1); this->current_probe = 0; @@ -3489,6 +3489,13 @@ c_unparser::visit_target_symbol (target_symbol* e) void +c_unparser::visit_cast_op (cast_op* e) +{ + throw semantic_error("cannot translate general cast expression", e->tok); +} + + +void c_tmpcounter::load_map_indices(arrayindex *e) { symbol *array; @@ -4522,13 +4529,22 @@ dump_unwindsyms (Dwfl_Module *m, // we're already iterating over the same data here... if (modname == "kernel" && !strcmp(name, "_stext")) { + int ki; extra_offset = sym.st_value; + ki = dwfl_module_relocate_address (m, &extra_offset); + dwfl_assert ("dwfl_module_relocate_address extra_offset", + ki >= 0); if (c->session.verbose > 2) clog << "Found kernel _stext 0x" << hex << extra_offset << dec << endl; } + // We only need the function symbols to identify kernel-mode + // PC's, so we omit undefined or "fake" absolute addresses. + // These fake absolute addresses occur in some older i386 + // kernels to indicate they are vDSO symbols, not real + // functions in the kernel. if (GELF_ST_TYPE (sym.st_info) == STT_FUNC && - sym.st_shndx != SHN_UNDEF) + ! (sym.st_shndx == SHN_UNDEF || sym.st_shndx == SHN_ABS)) { Dwarf_Addr sym_addr = sym.st_value; const char *secname = NULL; @@ -4611,19 +4627,19 @@ dump_unwindsyms (Dwfl_Module *m, void *unwind = get_unwind_data (m, &len); if (unwind != NULL) { - c->output << "#if defined(STP_USE_DWARF_UNWINDER) && defined(STP_NEED_UNWIND_DATA)" << endl; + c->output << "#if defined(STP_USE_DWARF_UNWINDER) && defined(STP_NEED_UNWIND_DATA)\n"; c->output << "static uint8_t _stp_module_" << stpmod_idx - << "_unwind_data[] = " << endl; + << "_unwind_data[] = \n"; c->output << " {"; for (size_t i = 0; i < len; i++) { int h = ((uint8_t *)unwind)[i]; c->output << "0x" << hex << h << dec << ","; if ((i + 1) % 16 == 0) - c->output << endl << " "; + c->output << "\n" << " "; } - c->output << "};" << endl; - c->output << "#endif /* STP_USE_DWARF_UNWINDER && STP_NEED_UNWIND_DATA */" << endl; + c->output << "};\n"; + c->output << "#endif /* STP_USE_DWARF_UNWINDER && STP_NEED_UNWIND_DATA */\n"; } else { @@ -4638,11 +4654,11 @@ dump_unwindsyms (Dwfl_Module *m, for (unsigned secidx = 0; secidx < seclist.size(); secidx++) { - c->output << "struct _stp_symbol " - << "_stp_module_" << stpmod_idx<< "_symbols_" << secidx << "[] = {" << endl; + c->output << "static struct _stp_symbol " + << "_stp_module_" << stpmod_idx<< "_symbols_" << secidx << "[] = {\n"; // Only include symbols if they will be used - c->output << "#ifdef STP_NEED_SYMBOL_DATA" << endl; + c->output << "#ifdef STP_NEED_SYMBOL_DATA\n"; // We write out a *sorted* symbol table, so the runtime doesn't have to sort them later. for (addrmap_t::iterator it = addrmap[secidx].begin(); it != addrmap[secidx].end(); it++) @@ -4651,79 +4667,79 @@ dump_unwindsyms (Dwfl_Module *m, continue; // skip symbols that occur before our chosen base address c->output << " { 0x" << hex << it->first-extra_offset << dec - << ", " << lex_cast_qstring (it->second) << " }," << endl; + << ", " << lex_cast_qstring (it->second) << " },\n"; } - c->output << "#endif /* STP_NEED_SYMBOL_DATA */" << endl; + c->output << "#endif /* STP_NEED_SYMBOL_DATA */\n"; - c->output << "};" << endl; + c->output << "};\n"; } - c->output << "struct _stp_section _stp_module_" << stpmod_idx<< "_sections[] = {" << endl; + c->output << "static struct _stp_section _stp_module_" << stpmod_idx<< "_sections[] = {\n"; for (unsigned secidx = 0; secidx < seclist.size(); secidx++) { - c->output << "{" << endl - << ".name = " << lex_cast_qstring(seclist[secidx]) << "," << endl - << ".symbols = _stp_module_" << stpmod_idx << "_symbols_" << secidx << "," << endl - << ".num_symbols = sizeof(_stp_module_" << stpmod_idx << "_symbols_" << secidx << ")/sizeof(struct _stp_symbol)" << endl - << "}," << endl; + c->output << "{\n" + << ".name = " << lex_cast_qstring(seclist[secidx]) << ",\n" + << ".symbols = _stp_module_" << stpmod_idx << "_symbols_" << secidx << ",\n" + << ".num_symbols = sizeof(_stp_module_" << stpmod_idx << "_symbols_" << secidx << ")/sizeof(struct _stp_symbol)\n" + << "},\n"; } - c->output << "};" << endl; + c->output << "};\n"; - c->output << "struct _stp_module _stp_module_" << stpmod_idx << " = {" << endl; - c->output << ".name = " << lex_cast_qstring (modname) << ", " << endl; - c->output << ".dwarf_module_base = 0x" << hex << base << dec << ", " << endl; + c->output << "static struct _stp_module _stp_module_" << stpmod_idx << " = {\n"; + c->output << ".name = " << lex_cast_qstring (modname) << ", \n"; + c->output << ".dwarf_module_base = 0x" << hex << base << dec << ", \n"; if (unwind != NULL) { - c->output << "#if defined(STP_USE_DWARF_UNWINDER) && defined(STP_NEED_UNWIND_DATA)" << endl; + c->output << "#if defined(STP_USE_DWARF_UNWINDER) && defined(STP_NEED_UNWIND_DATA)\n"; c->output << ".unwind_data = " - << "_stp_module_" << stpmod_idx << "_unwind_data, " << endl; - c->output << ".unwind_data_len = " << len << ", " << endl; - c->output << "#else" << endl; + << "_stp_module_" << stpmod_idx << "_unwind_data, \n"; + c->output << ".unwind_data_len = " << len << ", \n"; + c->output << "#else\n"; } - c->output << ".unwind_data = NULL, " << endl; - c->output << ".unwind_data_len = 0, " << endl; + c->output << ".unwind_data = NULL,\n"; + c->output << ".unwind_data_len = 0,\n"; if (unwind != NULL) - c->output << "#endif /* STP_USE_DWARF_UNWINDER && STP_NEED_UNWIND_DATA*/" << endl; + c->output << "#endif /* STP_USE_DWARF_UNWINDER && STP_NEED_UNWIND_DATA*/\n"; - c->output << ".unwind_hdr = NULL, " << endl; - c->output << ".unwind_hdr_len = 0, " << endl; - c->output << ".unwind_is_ehframe = 0, " << endl; + c->output << ".unwind_hdr = NULL,\n"; + c->output << ".unwind_hdr_len = 0,\n"; + c->output << ".unwind_is_ehframe = 0,\n"; - c->output << ".sections = _stp_module_" << stpmod_idx << "_sections" << ", " << endl; + c->output << ".sections = _stp_module_" << stpmod_idx << "_sections" << ",\n"; c->output << ".num_sections = sizeof(_stp_module_" << stpmod_idx << "_sections)/" - << "sizeof(struct _stp_section), " << endl; + << "sizeof(struct _stp_section),\n"; if (build_id_len > 0) { - c->output << ".build_id_bits = \"" ; - for (int j=0; j<build_id_len;j++) - c->output << "\\x" << hex - << (unsigned short) *(build_id_bits+j) << dec; - - c->output << "\", " << endl; - c->output << ".build_id_len = " << build_id_len << ", " << endl; - - /* XXX: kernel data boot-time relocation works differently from text. - This hack disables relocation altogether, but that's not necessarily - correct either. We may instead need a relocation basis different - from _stext, such as __start_notes. */ - if (modname == "kernel") - c->output << ".build_id_offset = 0x" << hex << build_id_vaddr - << dec << ", " << endl; - else - c->output << ".build_id_offset = 0x" << hex - << build_id_vaddr - base - << dec << ", " << endl; + c->output << ".build_id_bits = \"" ; + for (int j=0; j<build_id_len;j++) + c->output << "\\x" << hex + << (unsigned short) *(build_id_bits+j) << dec; + + c->output << "\",\n"; + c->output << ".build_id_len = " << build_id_len << ",\n"; + + /* XXX: kernel data boot-time relocation works differently from text. + This hack disables relocation altogether, but that's not necessarily + correct either. We may instead need a relocation basis different + from _stext, such as __start_notes. */ + if (modname == "kernel") + c->output << ".build_id_offset = 0x" << hex << build_id_vaddr + << dec << ",\n"; + else + c->output << ".build_id_offset = 0x" << hex + << build_id_vaddr - base + << dec << ",\n"; } else - c->output << ".build_id_len = 0, " << endl; - + c->output << ".build_id_len = 0,\n"; + //initialize the note section representing unloaded - c->output << ".notes_sect = 0," << endl; + c->output << ".notes_sect = 0,\n"; - c->output << "};" << endl << endl; + c->output << "};\n\n"; c->undone_unwindsym_modules.erase (modname); @@ -4836,14 +4852,14 @@ emit_symbol_data (systemtap_session& s) // Print out a definition of the runtime's _stp_modules[] globals. - kallsyms_out << endl; - kallsyms_out << "struct _stp_module *_stp_modules [] = {" << endl; + kallsyms_out << "\n"; + kallsyms_out << "static struct _stp_module *_stp_modules [] = {\n"; for (unsigned i=0; i<ctx.stp_module_index; i++) { - kallsyms_out << "& _stp_module_" << i << "," << endl; + kallsyms_out << "& _stp_module_" << i << ",\n"; } - kallsyms_out << "};" << endl; - kallsyms_out << "unsigned _stp_num_modules = " << ctx.stp_module_index << ";" << endl; + kallsyms_out << "};\n"; + kallsyms_out << "static unsigned _stp_num_modules = " << ctx.stp_module_index << ";\n"; // Some nonexistent modules may have been identified with "-d". Note them. for (set<string>::iterator it = ctx.undone_unwindsym_modules.begin(); @@ -5011,11 +5027,11 @@ translate_pass (systemtap_session& s) s.op->newline(); // XXX impedance mismatch - s.op->newline() << "int probe_start () {"; + s.op->newline() << "static int probe_start () {"; s.op->newline(1) << "return systemtap_module_init () ? -1 : 0;"; s.op->newline(-1) << "}"; s.op->newline(); - s.op->newline() << "void probe_exit () {"; + s.op->newline() << "static void probe_exit () {"; s.op->newline(1) << "systemtap_module_exit ();"; s.op->newline(-1) << "}"; s.op->assert_0_indent(); @@ -5046,3 +5062,5 @@ translate_pass (systemtap_session& s) return rc + s.num_errors(); } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/translate.h b/translate.h index 9921acd5..fdff9521 100644 --- a/translate.h +++ b/translate.h @@ -101,3 +101,5 @@ int translate_pass (systemtap_session& s); #endif // TRANSLATE_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -248,3 +248,4 @@ const string cmdstr_quoted(const string& cmd) return quoted_cmd; } +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ @@ -86,3 +86,5 @@ lex_cast_qstring(IN const & in) out2 += '"'; return out2; } + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ |