]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoRevert "Make stap-prep script available in the RPM"
William Cohen [Fri, 12 Mar 2010 18:57:56 +0000 (13:57 -0500)]
Revert "Make stap-prep script available in the RPM"

This reverts commit da3dfc346ff926f0f1bdd2872fe4f5f8e920953a.

14 years agoMake stap-prep script available in the RPM
William Cohen [Fri, 12 Mar 2010 18:56:15 +0000 (13:56 -0500)]
Make stap-prep script available in the RPM

14 years agoPR11373 kludge: clean up testsuite/stap_*.ko upon 'make clean'
Frank Ch. Eigler [Fri, 12 Mar 2010 19:12:49 +0000 (14:12 -0500)]
PR11373 kludge: clean up testsuite/stap_*.ko upon 'make clean'

14 years agolangref.tex editing
William Cohen [Fri, 12 Mar 2010 16:31:24 +0000 (11:31 -0500)]
langref.tex editing

Reviewed the language reference manual and made editing changes:

-Reorderd sections for better grouping
-Added description of the @defined operation
-Corrected limits for MAXSTRENLEN and number of indices in associate array
-Adjusted language in aggregates section
-Corrected @hist example writeup.
-Make output for @hist avoid page breaks
-Updated information about manpages in "For Futher References" section

14 years agosmileytap logo: inserted GPLv2 RDF tag
Frank Ch. Eigler [Fri, 12 Mar 2010 14:29:15 +0000 (09:29 -0500)]
smileytap logo: inserted GPLv2 RDF tag

14 years agoAdd startswith/endswith helpers
Josh Stone [Fri, 12 Mar 2010 03:19:33 +0000 (19:19 -0800)]
Add startswith/endswith helpers

Inspired by the Python equivalents, these new utility functions just
make it a little cleaner to match at the beginning or end of a string.

14 years agoFix the edge-case of MAXTRYLOCK=0
Josh Stone [Fri, 12 Mar 2010 01:14:59 +0000 (17:14 -0800)]
Fix the edge-case of MAXTRYLOCK=0

We didn't really have good semantics for what is meant by MAXTRYLOCK=0,
so when skipped.exp tried it, we ended up locking the variable and then
reporting a skip without ever unlocking it.

This is now cleaning up the semantics such that MAXTRYLOCK defines how
many times we should loop if the lock is busy.  Thus MAXTRYLOCK=0 means
we try only once and fail immediately.

The testcase was accidentally creating contention due to the broken
unlock behavior.  We now have to try a bit harder to create real
contention, so some lengthy delays are inserted to hoard the lock.

* runtime/probe_lock.h (stp_probe_lock): Fix the skip behavior.
* testsuite/systemtap.base/skipped.exp: Add a big udelay.

14 years agoFix proc_mem.stp for RHEL5.
David Smith [Thu, 11 Mar 2010 21:07:43 +0000 (15:07 -0600)]
Fix proc_mem.stp for RHEL5.

* tapset/proc_mem.stp: Move header file so that it will compile on RHEL5
  systems.

14 years agoRevoke unprivileged from ftrace()
Josh Stone [Thu, 11 Mar 2010 20:52:26 +0000 (12:52 -0800)]
Revoke unprivileged from ftrace()

It's writing into a system-wide resource, so it shouldn't be permitted
to just anyone.  Also remove the printk fallback that isn't actually
functional.

* tapset/logging.stp (ftrace): Remove unprivileged and printk.

14 years agoUpdate tapset proc_mem for 2.6.34
Wenji Huang [Thu, 11 Mar 2010 09:59:16 +0000 (17:59 +0800)]
Update tapset proc_mem for 2.6.34

* tapset/proc_mem.stp(_stp_get_mm_counter_file_rss,
   _stp_get_mm_counter_anon_rss): Use embedded function.

14 years agoPR11370: Add multi-header @casts
Josh Stone [Thu, 11 Mar 2010 03:17:40 +0000 (19:17 -0800)]
PR11370: Add multi-header @casts

Sometimes you need multiple headers to fully describe a type, so we now
permit them to be listed together, e.g. "kernel<foo.h><bar.h>".

* buildrun.cxx (make_typequery): Split the input string into a vector.
  (make_typequery_kmod, make_typequery_umod): Use the vector of headers.
* testsuite/semok/cast.stp: Add a multi-header case.
* stap.1.in, NEWS: Document it.

14 years agoRevert "Remove unnecessary embedded-c function __dentry_get_current_root()."
Mark Wielaard [Wed, 10 Mar 2010 22:12:26 +0000 (23:12 +0100)]
Revert "Remove unnecessary embedded-c function __dentry_get_current_root()."

This reverts commit 5ab0b1b6c4d3a7f1ea156835a32000669e378886.
Wrongly pushed commit.

14 years agoBe pessimistic about the gcc version as debuginfo has an undependable case (RH572260).
Stan Cox [Wed, 10 Mar 2010 21:52:37 +0000 (16:52 -0500)]
Be pessimistic about the gcc version as debuginfo has an undependable case (RH572260).

* sdt.h (GNUC_VERSION): Check against gcc 4.5.0

14 years agoPR 11210 move stapprobe.* man pages to tapset::*
William Cohen [Wed, 10 Mar 2010 20:53:32 +0000 (15:53 -0500)]
PR 11210 move stapprobe.* man pages to tapset::*

make on RHEL-5 and earlier cannot deal with the :: in the man page names.
This work around uses the install-data-local rule to install the
manpages to avoid confusing the older versions of make.

14 years agoRemoved unneeded '-u' switch from 3 tests.
David Smith [Wed, 10 Mar 2010 17:46:29 +0000 (11:46 -0600)]
Removed unneeded '-u' switch from 3 tests.

* testsuite/buildok/scheduler-test-tracepoints.stp: Removed unneeded '-u'
  option.
* testsuite/buildok/vm.tracepoints.kmalloc.stp: Ditto.
* testsuite/buildok/vm.tracepoints.stp: Ditto.

14 years agosdt.h: rename volatile-control macro to STAP_SDT_VOLATILE. Document in NEWS.
Frank Ch. Eigler [Wed, 10 Mar 2010 16:18:11 +0000 (11:18 -0500)]
sdt.h: rename volatile-control macro to STAP_SDT_VOLATILE.  Document in NEWS.

14 years agoPR11366 Always call semantic_pass_const_fold.
Mark Wielaard [Wed, 10 Mar 2010 15:44:38 +0000 (16:44 +0100)]
PR11366 Always call semantic_pass_const_fold.

Even in unoptimized mode we want constant folding to work to make sure
non-existing $variable expressions (detected through @defined) aren't
included.

* elaborate.cxx (semantic_pass_optimize1): Call semantic_pass_const_fold()
  unconditionally.

14 years agoRemove unnecessary embedded-c function __dentry_get_current_root().
Mark Wielaard [Mon, 8 Mar 2010 16:15:52 +0000 (17:15 +0100)]
Remove unnecessary embedded-c function __dentry_get_current_root().

* tapset/dentry.stp: Removed embedded-c include and function
  __dentry_get_current_root(). Use task_current and @cast in d_path().

14 years agotapset/task.stp remove redundant extra @defined in task_cpu().
Mark Wielaard [Wed, 10 Mar 2010 12:57:07 +0000 (13:57 +0100)]
tapset/task.stp remove redundant extra @defined in task_cpu().

14 years agoUse exported print_context_stack for 2.6.33
Wenji Huang [Wed, 10 Mar 2010 09:06:26 +0000 (17:06 +0800)]
Use exported print_context_stack for 2.6.33

* runtime/stack.c(print_stack_ops): Use print_context_stack and
  adjust version code.

14 years agoNEWS: mention man page renames
Frank Ch. Eigler [Wed, 10 Mar 2010 03:02:37 +0000 (22:02 -0500)]
NEWS: mention man page renames

14 years agoPR 11210 move stapprobe.* man pages to tapset::*
William Cohen [Wed, 10 Mar 2010 00:53:52 +0000 (19:53 -0500)]
PR 11210 move stapprobe.* man pages to tapset::*

Complete the renaming scheme with prefix of "tapset::" for the man
pages related to over all description of groups of probes.

14 years agoPR11360: Make @defined and -L play nice
Josh Stone [Tue, 9 Mar 2010 23:32:58 +0000 (15:32 -0800)]
PR11360: Make @defined and -L play nice

The constant-folding is now enabled for s.listing_mode_vars, despite all
other optimizations being disabled.  This is needed so we can prune any
invalid branches that are gated by @defined.

* elaborate.cxx (semantic_pass): Leave the optimization decision to the
  optimization passes themselves.
  (semantic_pass_optimize1): Predicate most optimizations, but enable the
  constant-folding for listing_mode_vars too.
  (semantic_pass_optimize2): Predicate all (1) optimizations.
* testsuite/semok/defined_list_vars.stp: New test.

14 years agoInclude __GNUC_RH_RELEASE__ in the volatile check.
Stan Cox [Tue, 9 Mar 2010 22:40:04 +0000 (17:40 -0500)]
Include __GNUC_RH_RELEASE__ in the volatile check.

sdt.h (GNUC_VERSION) Include __GNUC_RH_RELEASE__.  Check for at least gcc 4.4.4

14 years agoPR 11338 (partial): Used '@defined()' in task, dentry, and scsi tapsets.
David Smith [Tue, 9 Mar 2010 21:39:15 +0000 (15:39 -0600)]
PR 11338 (partial): Used '@defined()' in task, dentry, and scsi tapsets.

* tapset/task.stp: Used '@defined()' to remove kernel version checks.
* tapset/dentry.stp: Ditto.
* tapset/scsi.stp: Ditto.

14 years agoUpdate tests to check for uprobes instead of utrace.
David Smith [Tue, 9 Mar 2010 20:22:56 +0000 (14:22 -0600)]
Update tests to check for uprobes instead of utrace.

* testsuite/systemtap.context/uprobe_stmt_num.exp: Change utrace test to
  uprobes test.
* testsuite/systemtap.context/uprobe_uaddr.exp: Ditto.
* testsuite/systemtap.base/bz5274.exp: Ditto.

14 years agoCheck the gcc version using polynomial representation.
Stan Cox [Tue, 9 Mar 2010 19:57:41 +0000 (14:57 -0500)]
Check the gcc version using polynomial representation.

* sdt.h (GNUC_VERSION): New.

14 years agoFix PR 11363 by using logrotate to ensure logfile doesn't grow too large.
David Smith [Tue, 9 Mar 2010 17:51:10 +0000 (11:51 -0600)]
Fix PR 11363 by using logrotate to ensure logfile doesn't grow too large.

* initscript/logrotate.stap-server: Add logrotate config file to make sure
  stap-server logfile doesn't grow too large.
* systemtap.spec: Install logrotate config file.  Also follow
  <https://fedoraproject.org/wiki/PackagingDrafts/Logfiles> to correctly
  create the logfile.

14 years agoImproved PR 11309 by fixing directory and file permissions.
David Smith [Tue, 9 Mar 2010 17:33:59 +0000 (11:33 -0600)]
Improved PR 11309 by fixing directory and file permissions.

* systemtap.spec: Fixed directory and file permissions on
  /usr/share/systemtap/runtime/uprobes and /var/log/stap-server.

14 years agoPR 11210 Eliminate man page collisions
William Cohen [Tue, 9 Mar 2010 16:05:25 +0000 (11:05 -0500)]
PR 11210 Eliminate man page collisions

The various man pages for each systemtap probe and function
are prepended with "probe::" and "function::" respectively to avoid
collisions with other man3 pages with the same name.  For example
systemtap's strlen function was colliding with glibc's strlen function.

14 years agoOnly use volatile for sdt.h arguments when needed.
Stan Cox [Tue, 9 Mar 2010 15:50:14 +0000 (10:50 -0500)]
Only use volatile for sdt.h arguments when needed.

sdt.h (VOLATILE_ARG): gcc 4.4.3 support for inline asm
argument debug info means volatile is not needed.

14 years agobuild: re-enable librpm checking
Frank Ch. Eigler [Mon, 8 Mar 2010 21:22:42 +0000 (16:22 -0500)]
build: re-enable librpm checking

* configure.ac: With AC_CHECK_LIB()'s four-parameter variant,
  the default AC_DEFINE etc. is removed, so restore the key
  parts by hand.

14 years agotypo 7754 -> 775
Dave Brolley [Mon, 8 Mar 2010 20:46:55 +0000 (15:46 -0500)]
typo 7754 -> 775

14 years agoPRs 11205, 11309: Specfile problems for stap-server:
Dave Brolley [Mon, 8 Mar 2010 19:37:06 +0000 (14:37 -0500)]
PRs 11205, 11309: Specfile problems for stap-server:

- Use assigned gid/uid of 155/155 for stap-server.
- Create stap-server group in main systemtap rpm.
- Make uprobes runtime directory read/write/search by members
  of stap-server group in main systemtap rpm.
- Keep stap-server log in %{_localstatedir}/log/stap-server/log

14 years agoPR 11338 (partial): Used '@defined()' in tty, scheduler, and vfs tapsets.
David Smith [Mon, 8 Mar 2010 19:38:51 +0000 (13:38 -0600)]
PR 11338 (partial): Used '@defined()' in tty, scheduler, and vfs tapsets.

* tapset/tty.stp: Used '@defined()' to remove kernel version checks.
* tapset/scheduler.stp: Ditto.
* tapset/vfs.stp: Used '@defined()' to remove kernel version checks.  Also
  made several probe points optional instead of using kernel version
  checks to know when to include them.
* testsuite/buildok/vfs_testcase.stp: Removed stap '-u' (unoptimized mode)
  switch, since '@defined()' doesn't work in unoptimized mode.

14 years agodocs: clarify that only -> is used for $var dereferencing, not .
Frank Ch. Eigler [Mon, 8 Mar 2010 14:06:41 +0000 (09:06 -0500)]
docs: clarify that only -> is used for $var dereferencing, not .

14 years agonew sample: varwatch
Frank Ch. Eigler [Mon, 8 Mar 2010 02:13:39 +0000 (21:13 -0500)]
new sample: varwatch

14 years agoMove semko/nineteen.stp to semok
Josh Stone [Sat, 6 Mar 2010 21:08:22 +0000 (13:08 -0800)]
Move semko/nineteen.stp to semok

The *ko tests are for things that SHOULD fail, but semko/nineteen is a
test that should pass but often doesn't (due to inline var trouble).  It
should be in semok to set the expectation properly.

It does pass on F12 now, but if we want to silence the error for older
gcc, setup_kfail is the right approach.

14 years agoPR11352: Assign tokens to all SDT-synthesized elements
Josh Stone [Sat, 6 Mar 2010 19:41:49 +0000 (11:41 -0800)]
PR11352: Assign tokens to all SDT-synthesized elements

* tapsets.cxx (sdt_query::convert_probe): Fix a few missing tokens.
  (sdt_var_expanding_visitor::visit_target_symbol): Ditto.
* translate.cxx (c_unparser::record_actions): Add a defensive check,
  which perhaps someday can be an assertion instead.

14 years agoPR11342: Ensure that last_stmt is always set
Josh Stone [Sat, 6 Mar 2010 01:24:41 +0000 (17:24 -0800)]
PR11342: Ensure that last_stmt is always set

* translate.cxx (c_unparser::record_actions): Take a token to fill in
  last_stmt for MAXACTION errors.
  (c_unparser::*): Pass a token to record_actions.
  (c_unparser::visit_try_block): The try/catch blocks are also basic
  blocks, so they should flush record_actions when done.
  (c_unparser_assignment::c_assignop): Set last_stmt for /= and %=.
  (c_unparser::visit_foreach_loop): Set last_stmt for agg. overflow.
  (c_unparser::visit_print_format): Set last_stmt for %m errors.

14 years agoMake sure synthesized var display is tokenful
Josh Stone [Sat, 6 Mar 2010 02:21:00 +0000 (18:21 -0800)]
Make sure synthesized var display is tokenful

* elaborate.cxx (add_global_var_display): Assign a few token*s.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
David Smith [Fri, 5 Mar 2010 19:35:19 +0000 (13:35 -0600)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoUpdate example indices.
William Cohen [Fri, 5 Mar 2010 19:32:50 +0000 (14:32 -0500)]
Update example indices.

14 years agoImproved 'mm_struct' casting for RHEL5.
David Smith [Fri, 5 Mar 2010 19:31:12 +0000 (13:31 -0600)]
Improved 'mm_struct' casting for RHEL5.

* tapset/context.stp: Improved casting to 'mm_struct' on RHEL5 by changing
  the header file referenced from '<linux/mm_types.h>' to
  '<linux/sched.h>' (since mm_types.h doesn't exist on RHEL5).  On newer
  kernels, sched.h includes mm_types.h.
* tapset/proc_mem.stp: Ditto.

14 years agoPR 11338 (partial): Used '@defined()' in syscall tapsets.
David Smith [Fri, 5 Mar 2010 17:14:46 +0000 (11:14 -0600)]
PR 11338 (partial): Used '@defined()' in syscall tapsets.

* tapset/syscalls.stp: Used '@defined()' to remove kernel version checks.
* tapset/syscalls2.stp: Ditto.
* tapset/x86_64/syscalls.stp: Ditto.
* tapset/nd_syscalls.stp: Updated to match tapset/syscalls.stp.
* tapset/nd_syscalls2.stp: Updated to match tapset/syscalls2.stp.
* tapset/x86_64/nd_syscalls.stp: Updated to match
  tapset/x86_64/syscalls.stp.

14 years agoRemove unneeded embedded-c include block from tapset/udp.stp.
Mark Wielaard [Fri, 5 Mar 2010 10:58:37 +0000 (11:58 +0100)]
Remove unneeded embedded-c include block from tapset/udp.stp.

14 years agoPR11346: Make @defined() independent of --skip-badvars
Josh Stone [Fri, 5 Mar 2010 02:05:06 +0000 (18:05 -0800)]
PR11346: Make @defined() independent of --skip-badvars

* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Don't
  squash target_symbol errors in the operand of @defined().

14 years agoAdd cmdline argument fetching for current process to context.stp tapset.
Mark Wielaard [Thu, 4 Mar 2010 21:13:03 +0000 (22:13 +0100)]
Add cmdline argument fetching for current process to context.stp tapset.

* tapset/context.stp: Add cmdline_str, cmdline_arg and cmdline_args.
* testsuite/buildok/context_test.stp: Add tests for new functions.

14 years agoFilter the path of stap as called by the client and server.
Dave Brolley [Thu, 4 Mar 2010 20:00:34 +0000 (15:00 -0500)]
Filter the path of stap as called by the client and server.

14 years agoComment on the use of PR_ErrorToString vs static table.
Dave Brolley [Thu, 4 Mar 2010 19:11:02 +0000 (14:11 -0500)]
Comment on the use of PR_ErrorToString vs static table.

14 years agoCanonicalize another email->name
Josh Stone [Thu, 4 Mar 2010 19:10:06 +0000 (11:10 -0800)]
Canonicalize another email->name

14 years agoSet a timeout when prompting for consent to trust a server as a SSL peer.
Dave Brolley [Wed, 3 Mar 2010 22:42:28 +0000 (17:42 -0500)]
Set a timeout when prompting for consent to trust a server as a SSL peer.

14 years agoCan't call SEC_PrintCertificateAndTrust.
Dave Brolley [Wed, 3 Mar 2010 20:47:29 +0000 (15:47 -0500)]
Can't call SEC_PrintCertificateAndTrust.

14 years agoPR 10331: Improved certificate management -- client side.
Dave Brolley [Wed, 3 Mar 2010 20:40:05 +0000 (15:40 -0500)]
PR 10331: Improved certificate management -- client side.

stap-client-connect.c: use SSL_BadCertHoook to provide an opportunity for
the user to trust and/or import the server's certificate.

stap-client: Reorganized so that newly trusted certificates can be used.
Also does the actual prompting.

14 years agoImproved NSPR error handling. Use PR_ErrorToString.
Dave Brolley [Wed, 3 Mar 2010 20:03:10 +0000 (15:03 -0500)]
Improved NSPR error handling. Use PR_ErrorToString.

14 years agoLanguage Refrence manual clean up.
William Cohen [Wed, 3 Mar 2010 17:18:22 +0000 (12:18 -0500)]
Language Refrence manual clean up.

-Remove unneeded pagebreak()
-Remove duplicate system() command description
-Clean up the function prototypes

14 years agoDescribe function args and clean up titles for proc_mem.stp and task_time.stp
William Cohen [Wed, 3 Mar 2010 15:52:37 +0000 (10:52 -0500)]
Describe function args and clean up titles for proc_mem.stp and task_time.stp

14 years agoHACKING: emphasize embedded-c testing
Frank Ch. Eigler [Wed, 3 Mar 2010 15:09:21 +0000 (10:09 -0500)]
HACKING: emphasize embedded-c testing

14 years agoAdd task_stime_tid(), task_utime_tid() and task_time_string_tid() support.
Mark Wielaard [Wed, 3 Mar 2010 14:05:36 +0000 (15:05 +0100)]
Add task_stime_tid(), task_utime_tid() and task_time_string_tid() support.

* tapset/task_time.stp: New functions task_stime_tid(), task_utime_tid()
  and task_time_string_tid().
* testsuite/buildok/task_test.stp: Add tests.

14 years agoAdd documentation and tests for proc_mem_*_pid functions.
Mark Wielaard [Mon, 1 Mar 2010 11:42:59 +0000 (12:42 +0100)]
Add documentation and tests for proc_mem_*_pid functions.

14 years agoAdd proc_mem_*_pid tapset function variants.
Mark Wielaard [Mon, 15 Feb 2010 10:28:38 +0000 (11:28 +0100)]
Add proc_mem_*_pid tapset function variants.

* tapset/proc_mem.stp: Add proc_mem_size_pid, proc_mem_rss_pid,
  proc_mem_shr_pid, proc_mem_txt_pid, proc_mem_data_pid and
  proc_mem_string_pid functions to tapset.

14 years agogit_version.sh: Don't unnecessarily write to builddir during make install.
Mark Wielaard [Thu, 25 Feb 2010 21:06:42 +0000 (22:06 +0100)]
git_version.sh: Don't unnecessarily write to builddir during make install.

Ideally make install wouldn't touch the src or build dirs. When the build
dir is mounted so root cannot write to it a make install would fail
because git_version.sh tried to create a temporary file. Fix by creating
temporary git_version.h.new file in temp dir.

* git_version.sh: Create temp dir and git_version.h.new outside src
  and build dir. Change all occurances of $outfile.new to $outfilenew.

14 years agoPR11004: try / catch error-handling script syntax
Frank Ch. Eigler [Wed, 3 Mar 2010 05:28:22 +0000 (00:28 -0500)]
PR11004: try / catch error-handling script syntax

* parse.h (try_block): New class.  Update basic visitors.
* staptree.cxx: Implement basic visitors.
* parse.cxx (expect_kw): Fix to actually look for keywords.
  (parse_try_block): New function.
  (lexer ctor): Designate 'try' and 'catch' as keywords.
* elaborate.cxx (dead_assignment_remover, dead_statmtexpr_remover): Optimize.
  (other visitors): Implement.
* translate.cxx (c_unparser): Implement via super-handy __local__ labels.
  (emit_probe, emit_function): Make outer out: label also __local__.
* testsuite/buildok/fortyone.stp, semko/fortynine.stp,
  systemtap.base/trycatch.exp: Test it.
* NEWS, doc/langref.txt, stap.1.in: Document it.

14 years agoPR11246 cont'd: Add options for cache control
Josh Stone [Tue, 2 Mar 2010 23:57:58 +0000 (15:57 -0800)]
PR11246 cont'd: Add options for cache control

--disable-cache : turn off all caching
--clean-cache   : clean up stale entries and then quit
--poison-cache  : force regeneration of items that would have hit the cache

These are undocumented for now, until we decide whether they are
generally useful.

* main.cxx (main): Parse the new options.
* session.h (systemtap_session): Add poison_cache; document the others.
* clean.cxx (clean_cache): No longer static.
  (get_stapconf_from_cache, get_script_from_cache): Respect poison.
* tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto.
  (dwarf_cast_expanding_visitor::filter_special_modules): Ditto.

14 years agoPR11246 cont'd: Separate script/stapconf caching
Josh Stone [Tue, 2 Mar 2010 02:42:18 +0000 (18:42 -0800)]
PR11246 cont'd: Separate script/stapconf caching

I'm separating the caching and creation logic for stapconf, so it can be
conditionalized on s.use_cache instead of s.use_script_cache.

* session.h (systemtap_session): Store base_hash for better reuse.
* hash.cxx (get_base_hash): Get the base from the session, or build it.
  (find_hash): Split into separate script/stapconf versions.
* cache.cxx (add_to_cache, get_from_cache): Ditto.
* main.cxx (main): Adapt caller, and delay stapconf until pass-4.

14 years agoMove pass-3/4 cache checks after the reported pass-2 end
Josh Stone [Tue, 2 Mar 2010 01:48:54 +0000 (17:48 -0800)]
Move pass-3/4 cache checks after the reported pass-2 end

* main.cxx (main): Reorganize the end of pass-2 a bit.

14 years agoPR11246: Add more granular cache control
Josh Stone [Tue, 2 Mar 2010 01:27:53 +0000 (17:27 -0800)]
PR11246: Add more granular cache control

There are some module options that require us to disable caching for the
script, but before now this had a global effect.  There are some cache
objects, like tracepoint and @cast query modules, which we would like to
cache even when the script itself needs to be uncached.

* session.h (systemtap_session): New use_script_cache flag.
* main.cxx (main): -m & -k can just disable the script cache.  Failure to
  create the cache directories still disables all caching.
* hash.cxx (create_hashdir): Failure disables all caching.
* cache.cxx (add_to_cache): Failure only toggles the script caching. If
  the stapconf fails though, we don't need to block the .ko reuse.

14 years agoRevise the embedded-C.stp example to something more portable.
William Cohen [Tue, 2 Mar 2010 17:45:27 +0000 (12:45 -0500)]
Revise the embedded-C.stp example to something more portable.

14 years agoMinor clean-up in tutorial.
William Cohen [Mon, 1 Mar 2010 22:56:45 +0000 (17:56 -0500)]
Minor clean-up in tutorial.

14 years agoMake the inode-watch.stp example work on newer kernels.
William Cohen [Mon, 1 Mar 2010 20:39:23 +0000 (15:39 -0500)]
Make the inode-watch.stp example work on newer kernels.

14 years agoFixed PR 11336 by using a wait queue to wait on procfs file availability.
David Smith [Mon, 1 Mar 2010 21:17:09 +0000 (15:17 -0600)]
Fixed PR 11336 by using a wait queue to wait on procfs file availability.

* runtime/procfs-probes.c: Removed old kernel 2.6.16 code.  Simplified
  _spp_lock macros.
  (_stp_proc_open_file): If file is busy, use a wait queue to wait on it
  being available.
  (_stp_proc_release_file): Decrease open count.
* tapset-procfs.cxx (emit_module_init): Updated procfs probe
  initialization/shutdown routine names.
  (emit_module_exit): Ditto.

14 years agoPR11229: Make parse_kernel_config return int and suggest that the user check their...
Charley Wang [Mon, 1 Mar 2010 15:22:08 +0000 (10:22 -0500)]
PR11229: Make parse_kernel_config return int and suggest that the user check their installation of kernel devel

14 years agoSquash elision warnings on synthetic functions
Josh Stone [Sat, 27 Feb 2010 00:25:45 +0000 (16:25 -0800)]
Squash elision warnings on synthetic functions

* staptree.h (functiondecl): Add a synthetic flag.
* elaborate.cxx (semantic_pass_opt1): Don't warn about synthetic funcs.
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Mark
  the new function as synthetic.
  (dwarf_cast_expanding_visitor::visit_cast_op): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.
* tapset-perfmon.cxx
  (perfmon_var_expanding_visitor::visit_target_symbol): Ditto.
* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol):
  Ditto.
* testsuite/semok/thirtyeight.stp: New check with -W and @defined.

14 years agoAdd package check for librpm
Stan Cox [Fri, 26 Feb 2010 21:07:27 +0000 (16:07 -0500)]
Add package check for librpm

* configure (have_librpm): Move to AC_CHECK_LIB
* configure.ac: Regenerate.

14 years agoAdd package check for librpm
Stan Cox [Fri, 26 Feb 2010 19:58:57 +0000 (14:58 -0500)]
Add package check for librpm

* configure (have_librpm): Define.
* configure.ac: Regenerate.

14 years agoPR11075: -W option to turn warnings into errors
Frank Ch. Eigler [Fri, 26 Feb 2010 02:14:52 +0000 (21:14 -0500)]
PR11075: -W option to turn warnings into errors

* session.h
* NEWS: Discuss it.
* main.cxx: Parse it.
* session.h (num_errors): Provide it.
* semok/fortyeight.stp, semok/thirtyseven.stp: Test it.

14 years agoExpand the comment around @defined pass-through
Josh Stone [Fri, 26 Feb 2010 01:06:30 +0000 (17:06 -0800)]
Expand the comment around @defined pass-through

14 years agoEnsure that @defined()==1 goes the right way
Josh Stone [Fri, 26 Feb 2010 00:30:48 +0000 (16:30 -0800)]
Ensure that @defined()==1 goes the right way

We need to poison the false case of valid "@defined(x)?x:y", so we know
that the @defined is correctly leading to the true case only.

* testsuite/semok/thirtysix.stp: poison false in valid cases.

14 years agoExpand @defined to support more cases
Josh Stone [Fri, 26 Feb 2010 00:20:50 +0000 (16:20 -0800)]
Expand @defined to support more cases

* tapsets.cxx (var_expanding_visitor::visit_defined_op): If no error was
  raised or replacement made on a target_symbol, then its @defined state
  is still indeterminate.  Some later pass (like @cast) might handle it.
* elaborate.cxx (const_folder::visit_defined_op): Squash any escapees.
* testsuite/semok/thirtysix.stp: Add more variants.

14 years agoPR11326: Make an early check for saved-return-$var validity
Josh Stone [Thu, 25 Feb 2010 23:15:19 +0000 (15:15 -0800)]
PR11326: Make an early check for saved-return-$var validity

We now check validity *before* the entry-probe is generated, so invalid
$vars have a chance to be properly optimized without error.

* tapsets.cxx
  (dwarf_var_expanding_visitor::visit_target_symbol_saved_return):
  Attempt variable expansion immediately, and skip out on failure.
* testsuite/semok/thirtysix.stp: unblock the previously broken part.

14 years agoFixed pr 10690 by adding '.maxsize(NNN)' procfs read probe parameter.
David Smith [Thu, 25 Feb 2010 22:29:50 +0000 (16:29 -0600)]
Fixed pr 10690 by adding '.maxsize(NNN)' procfs read probe parameter.

* tapset-procfs.cxx (procfs_derived_probe::procfs_derived_probe): Added
  'maxsize_val' initialization.
  (procfs_derived_probe::join_group): Updated '_stp_procfs_data'
  definition and added STP_PROCFS_BUFSIZE.
  (procfs_derived_probe_group::emit_module_decls): Emits structure to
  contain procfs file buffers.  Initializes '.bufsize' structure member.
  (procfs_var_expanding_visitor::visit_target_symbol): Uses 'bufsize' for
  maximum buffer size instead of using MAXSTRINGLEN.
  (procfs_builder::build): Looks for '.maxsize(NNN)' parameter.
  (register_tapset_procfs): Added '.maxsize(NNN)' parameter binding.
* runtime/procfs-probes.c (stap_procfs_probe): Converted 'buffer' to a
  pointer and added 'bufsize' member.
* testsuite/semko/procfs13.stp: New testcase.
* testsuite/semko/procfs14.stp: Ditto.
* testsuite/semko/procfs15.stp: Ditto.
* testsuite/systemtap.base/procfs_maxsize.exp: Ditto.
* testsuite/systemtap.base/procfs.exp: Minor fix.
* stapprobes.3stap.in: Added '.maxsize(NNN)' documentation.
* stap.1.in: Added STP_PROCFS_BUFSIZE documentation.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Charley Wang [Thu, 25 Feb 2010 21:25:34 +0000 (16:25 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoPR11224: Documentation for module arguments
Charley Wang [Thu, 25 Feb 2010 21:25:22 +0000 (16:25 -0500)]
PR11224: Documentation for module arguments

14 years agoPR11114: simplify librpm autoconf
Frank Ch. Eigler [Thu, 25 Feb 2010 20:22:14 +0000 (15:22 -0500)]
PR11114: simplify librpm autoconf

* configure.ac: Check for -lrpm with simple AC_CHECK_LIB.
* Makefile.am: Forget about @rpm_LIBS@

14 years agoPR11224: added test case for module arguments in testsuite/systemtap.base
Charley Wang [Thu, 25 Feb 2010 19:21:27 +0000 (14:21 -0500)]
PR11224: added test case for module arguments in testsuite/systemtap.base

14 years agoPR11005: @defined part 2: clarify/standardize internal handling of unresolvable ...
Frank Ch. Eigler [Thu, 25 Feb 2010 18:33:28 +0000 (13:33 -0500)]
PR11005: @defined part 2: clarify/standardize internal handling of unresolvable $variables

* staptree.cxx (target_symbol::chain): New function.
* staptree.h: Declare it.
* (*): Use it instead of hand-chaining to target_symbol->saved_conversion_error.
* tapset-mark.cxx (*::visit_target_symbol): Chain resolution error object,
  do not throw.
* tapset-procfs.cxx (*::visit_target_symbol): Ditto.
* tapset-utrace.cxx (*::visit_target_symbol): Ditto.
* tapsets.cxx (*::visit_target_symbol): Ditto.
  (*::visit_defined_op): Explain & enforce the above.
* testsuite/semok/thirtysix.stp: Expand.

* testsuite/systemtap.base/sdt_misc.exp: Bonus fix: make work with blddir != srcdir.

14 years agoPR10719 cont'd: const-fold binary expressions
Josh Stone [Thu, 25 Feb 2010 02:51:51 +0000 (18:51 -0800)]
PR10719 cont'd: const-fold binary expressions

We can compute results between two literals, we can reduce identity
elements, and reduce constants if the non-literal side has no side
effects.

* elaborate.cxx (const_folder::visit_binary_expression): Implement.

14 years agoPermit chained unary operators
Josh Stone [Thu, 25 Feb 2010 01:12:09 +0000 (17:12 -0800)]
Permit chained unary operators

The operand of a unary may be yet another unary.  This is useful for
things like boolean normalization, !!x.

* parse.cxx (parser::parse_unary): Recurse the operand.
* testsuite/parseok/eleven.stp: Add chained unary operators.

14 years agoPR10719 cont'd: const-fold logical ops
Josh Stone [Thu, 25 Feb 2010 00:43:06 +0000 (16:43 -0800)]
PR10719 cont'd: const-fold logical ops

We can compute results between two literals, we can short-circuit some
literals on the left ("0&&x", "1||x"), and we can simplify literals on
the right if the left has no side effect ("x&&0", "x||1").

* elaborate.cxx (const_folder::visit_logical_or_expr): Implement.
  (const_folder::visit_logical_and_expr): Implement.

14 years agoPR10719 cont'd: const-fold comparisons
Josh Stone [Wed, 24 Feb 2010 02:50:05 +0000 (18:50 -0800)]
PR10719 cont'd: const-fold comparisons

We can compute results between two literals, and we can also compute
comparisons to boundary numbers.

(We could also check boundary strings, "" and "\377\377...", but even
I am not THAT pedantic... yet...)

* elaborate.cxx (const_folder::visit_comparison): Implement.

14 years agoPR10719 cont'd: const-fold string concatenation
Josh Stone [Wed, 24 Feb 2010 02:45:22 +0000 (18:45 -0800)]
PR10719 cont'd: const-fold string concatenation

We can concat literal strings directly and discard empty strings.

* elaborate.cxx (const_folder::visit_concatenation): Implement.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Frank Ch. Eigler [Wed, 24 Feb 2010 01:38:56 +0000 (20:38 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

* 'master' of ssh://sources.redhat.com/git/systemtap:
  PR10719 part 1: Partial constant folding
  Simplify null_statement construction
  Fixed PR 11269 by properly handling mmap syscall 'fd' argument.
  Removed rvalue operator check.
  PR 10690 (partial fix).  Handle '.=' operator in procfs probes.

Conflicts:
tapsets.h

14 years agoPR11005: @defined($tvar) predicate, part 1
Frank Ch. Eigler [Wed, 24 Feb 2010 01:31:00 +0000 (20:31 -0500)]
PR11005: @defined($tvar) predicate, part 1

* staptree.h (defined_op): New class.
* all files: Extend all visitors as appropriate, mostly
  dummy/pass-through implementation.
* parse.cxx (parse_target_symbol): New function, factored out
  of parse_symbol().
  (parse_define_op): New function.
* NEWS: Mention it.
* parse.h: Corresponding changes.
* tapsets.cxx (var_expanding_visitor::visit_defined_op):
  Implement @defined() semantics.
  (dwarf_var_expanding_visitor::visit_target_symbol): Adjust.
* tapset-utrace.c (visit_target_symbol_arg): Avoid crashes
  on $argZZZ.
* tapsets.cxx (sdt_var_expanding_visitor): Ditto.
* semok/thirtysix.stp: New test.

14 years agoPR10719 part 1: Partial constant folding
Josh Stone [Sat, 20 Feb 2010 02:32:52 +0000 (18:32 -0800)]
PR10719 part 1: Partial constant folding

This implements constant folding for if/for/foreach, unary expressions,
and ternary expressions.  Binary expressions are TODO...

* elaborate.cxx (const_folder): New visitor to collapse constants.
  (semantic_pass_const_fold): Drive everything through const_folder.
  (semantic_pass_optimize1): Call it.

14 years agoSimplify null_statement construction
Josh Stone [Sat, 20 Feb 2010 01:44:44 +0000 (17:44 -0800)]
Simplify null_statement construction

It only needs a token*, so build that into the constructor.

14 years agoFixed PR 11269 by properly handling mmap syscall 'fd' argument.
David Smith [Tue, 23 Feb 2010 21:57:25 +0000 (15:57 -0600)]
Fixed PR 11269 by properly handling mmap syscall 'fd' argument.

* testsuite/systemtap.syscall/mmap.c (main): Added mprotect and mremap
  testing (along with testing of anonymous maps).
* tapset/i386/syscalls.stp: In mmap probes, handle the fact that the
  kernel gets an unsigned long 'fd', but the user-side passes a signed
  int.
* tapset/i386/nd_syscalls.stp: Ditto.
* tapset/ia64/syscalls.stp: Ditto.
* tapset/powerpc/nd_syscalls.stp: Ditto.
* tapset/powerpc/syscalls.stp: Ditto.
* tapset/x86_64/nd_syscalls.stp: Ditto.
* tapset/x86_64/syscalls.stp: Ditto.

14 years agoRemoved rvalue operator check.
David Smith [Tue, 23 Feb 2010 20:40:18 +0000 (14:40 -0600)]
Removed rvalue operator check.

* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol):
  Removed unneeded rvalue operator check.

14 years agoPR 10690 (partial fix). Handle '.=' operator in procfs probes.
David Smith [Tue, 23 Feb 2010 18:48:49 +0000 (12:48 -0600)]
PR 10690 (partial fix).  Handle '.=' operator in procfs probes.

* tapsets.h (var_expanding_visitor): Add 'valid_ops' and 'op' member
  variables.
* tapsets.cxx (var_expanding_visitor::var_expanding_visitor): Set
  'valid_ops' to '='.  By default, var_expanding_visitor classes only
  handle the '=' operator.
  (var_expanding_visitor::visit_assignment): Remember what operator we're
  handling.  When an operator is found that isn't in the 'valid_ops' set,
  error.
* tapset-procfs.cxx
  (procfs_var_expanding_visitor::procfs_var_expanding_visitor): Add '.='
  to the 'valid_ops' set.
  (procfs_var_expanding_visitor::visit_target_symbol): Handle the '.='
  operator when the target variable is an lvalue.

14 years agohashing: add in the -Werror-defeating flag
Frank Ch. Eigler [Mon, 22 Feb 2010 17:14:48 +0000 (12:14 -0500)]
hashing: add in the -Werror-defeating flag

14 years agoCheck for/build elfutils iff translator is enabled.
Przemyslaw Pawelczyk [Mon, 22 Feb 2010 01:05:59 +0000 (02:05 +0100)]
Check for/build elfutils iff translator is enabled.

* configure.ac: Don't bother with elfutils if $enable_translator = no.

This page took 0.061284 seconds and 5 git commands to generate.