diff options
Diffstat (limited to 'testsuite')
75 files changed, 977 insertions, 3439 deletions
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. |