]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoUpdate marker probe information in Language Reference.
Robb Romans [Wed, 9 Sep 2009 16:49:19 +0000 (11:49 -0500)]
Update marker probe information in Language Reference.

Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
14 years agoAdd pointer typecasting information to Language Reference.
Robb Romans [Tue, 8 Sep 2009 20:34:10 +0000 (15:34 -0500)]
Add pointer typecasting information to Language Reference.

14 years agoAdd error probe information.
Robb Romans [Tue, 8 Sep 2009 20:15:37 +0000 (15:15 -0500)]
Add error probe information.

14 years agoPR10602 prime: runtime: shrink stack frame of _stp_do_relocation().
Frank Ch. Eigler [Wed, 9 Sep 2009 17:46:42 +0000 (13:46 -0400)]
PR10602 prime: runtime: shrink stack frame of _stp_do_relocation().

* transport/symbols.c (_stp_do_relocation): Make msg static.

14 years agoexamples: regenerate index files
Frank Ch. Eigler [Wed, 9 Sep 2009 17:37:49 +0000 (13:37 -0400)]
examples: regenerate index files

14 years agoPR10602: improved fix for REG_IP lvalue
Frank Ch. Eigler [Wed, 9 Sep 2009 17:33:51 +0000 (13:33 -0400)]
PR10602: improved fix for REG_IP lvalue

* runtime/regs.h (SET_REG_IP): Define.
  (REG_IP_LVALUE): Undefine.
* tapsets.cxx (*::emit_module_decls): Use SET_REG_IP() instead
  of old LVALUE? conditional.

Written by jkenisto & jistone.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
David Smith [Wed, 9 Sep 2009 17:27:02 +0000 (12:27 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoFix relay_old implementation of fsize_max and fnum_max.
Masami Hiramatsu [Wed, 9 Sep 2009 16:53:25 +0000 (12:53 -0400)]
Fix relay_old implementation of fsize_max and fnum_max.

With old relayfs, out_fd is used only when non-bulk mode. However,
open_oldoutfile and open_relayfs_files open files with fopen and
set only percpu_tmpfile. This will cause a problem with -S option,
that out_fd will be closed when the file size reaches fsize_max
and new fd will be opened only on percpu_tmpfile.

So, out_fd should be synchronized with percpu_tmpfile.

* runtime/staprun/relay_old.c (open_oldoutfile): Set fd of output file
  to out_fd[cpu].
  (open_relayfs_files): Ditto.

14 years agoRemoved unneeded casts.
David Smith [Wed, 9 Sep 2009 16:04:05 +0000 (11:04 -0500)]
Removed unneeded casts.
* runtime/transport/ring_buffer.c (_stp_event_to_user): Removed unneeded
  cast.
  (_stp_data_write_reserve): Ditto.
  (_stp_data_write_commit): Ditto.

14 years agoPR10524: brag in NEWS
Frank Ch. Eigler [Wed, 9 Sep 2009 11:28:19 +0000 (07:28 -0400)]
PR10524: brag in NEWS

14 years agoPR10604: check availability for example test cases
Wenji Huang [Tue, 8 Sep 2009 22:38:14 +0000 (18:38 -0400)]
PR10604: check availability for example test cases

* testsuite/systemtap.examples/check.exp: Handle with test_support.
* testsuite/systemtap.examples/io/iostat-scsi.meta: Add meta-tag test_support.
* testsuite/systemtap.examples/memory/mmanonpage.meta: Ditto.
* testsuite/systemtap.examples/memory/mmfilepage.meta: Ditto.
* testsuite/systemtap.examples/memory/mmreclaim.meta: Ditto.
* testsuite/systemtap.examples/memory/mmwriteback.meta: Ditto.
* testsuite/systemtap.examples/network/autofs4.meta: Ditto.
* testsuite/systemtap.examples/network/dropwatch.meta: Ditto.
* testsuite/systemtap.examples/process/schedtimes.meta: Ditto.

14 years agoPR10617: make "make uninstall" work
Frank Ch. Eigler [Wed, 9 Sep 2009 01:00:24 +0000 (21:00 -0400)]
PR10617: make "make uninstall" work

* Makefile.am (uninstall-local): Don't rm libexecdir but remove doc/exmaples.
* Makefile.in: Regenerated.

14 years agoPR10524: reduce massive-uprobe script modules' .data consumption
Frank Ch. Eigler [Wed, 9 Sep 2009 00:23:42 +0000 (20:23 -0400)]
PR10524: reduce massive-uprobe script modules' .data consumption

The general approach is to rip out task_finder_tgt's from all over the
place (including the unwindsym vmcbs, and the stap_uprobe_specs), and
instead have a small handful of them: one for all unwindsyms, and one
per abstract probed process (PID or NAME).  These are in turn shared
by all new stap_unwind_specs by index.

Before:  probe process("./stap").function("*")

-rw-r--r--. 1 fche users 11775283 2009-09-08 20:26 /var/tmp/fche/systemtap/cache/96/stap_96c0479d674db55ec98d8a8750a790e7_7989596.ko
   text    data     bss     dec     hex filename
 445158 8351944 4306472 13103574 c7f1d6 /var/tmp/fche/systemtap/cache/96/stap_96c0479d674db55ec98d8a8750a790e7_7989596.ko

After: (Note how data shrank, though text gained a bit in const-init-data.)

-rw-r--r--. 1 fche users  4021569 2009-09-08 20:27 /var/tmp/fche/systemtap/cache/e4/stap_e46e88634efd850b1586e81c231c239a_8058419.ko
   text    data     bss     dec     hex filename
1896511    2192 4324808 6223511  5ef697 /var/tmp/fche/systemtap/cache/e4/stap_e46e88634efd850b1586e81c231c239a_8058419.ko

* tapsets.cxx (uprobe_derived_probe_group): Rewrite emit_module_decls,
  and adjust emit_module_init.
* runtime/sym.c (_stp_sym_init): Initialize unwindsyms-shared vmcb.
* runtime/sym.h (_stp_module): Remove *vmcb field.
* translate.cxx (emit_module_init, dump_unwindsyms): Adapt.
* translate.h (assert_0_indent): Flush output before possibly assert-failing.

14 years agofix typo: KERN_ERROR -> KERN_ERR from last commit
Frank Ch. Eigler [Tue, 8 Sep 2009 23:04:16 +0000 (19:04 -0400)]
fix typo: KERN_ERROR -> KERN_ERR from last commit

14 years agoPR10575: emit KERN_ERRORs on transport control message failures
Frank Ch. Eigler [Tue, 8 Sep 2009 21:32:26 +0000 (17:32 -0400)]
PR10575: emit KERN_ERRORs on transport control message failures

Suspecting that some kernel->user control messages may be getting
lost, let's more robustly log these occurrences.

* runtime/transport/control.c (_stp_ctl_send): printk(KERN_ERROR)
  instead of ignoring errors.

14 years agotask_finder diagnostics: standardize on STP_DEBUG_PRINTK
Frank Ch. Eigler [Mon, 7 Sep 2009 21:34:39 +0000 (17:34 -0400)]
task_finder diagnostics: standardize on STP_DEBUG_PRINTK

* io.c (DEBUG_TASK_FINDER_PRINTK): Remove conditional.

14 years agotask_finder diagnostics: emit start_task_finder dbug message at end of fn.
Frank Ch. Eigler [Fri, 4 Sep 2009 20:43:35 +0000 (16:43 -0400)]
task_finder diagnostics: emit start_task_finder dbug message at end of fn.

* task_finder.c (stap_start_task_finder): Emit _stp_dbug message at end
  rather at beginning, so printed utrace-engine attach counts reflect
  status at end of initialization rather than at beginning.

14 years agoruntime diagnostics: remove ANSI goo, add -DSTAP_DEBUG_PRINTK option.
Frank Ch. Eigler [Fri, 4 Sep 2009 20:41:55 +0000 (16:41 -0400)]
runtime diagnostics: remove ANSI goo, add -DSTAP_DEBUG_PRINTK option.

* runtime/io.c (_stp_vlog): Don't put ansi highlighting into debugging
  messages.  #if STAP_DEBUG_PRINTK, direct all diagnostics to appropriate
  printk channel instead of runtime trace buffer.

14 years agoTest user markers set in a shared object.
Stan Cox [Tue, 8 Sep 2009 22:12:27 +0000 (18:12 -0400)]
Test user markers set in a shared object.

* sdt_misc:  Add -shared section.

14 years agodocumentation: tweak package description strings for -client / -server pkgs
Frank Ch. Eigler [Tue, 8 Sep 2009 19:26:01 +0000 (15:26 -0400)]
documentation: tweak package description strings for -client / -server pkgs

14 years agoMerge branch 'master' of git://sources.redhat.com/git/systemtap
Dave Brolley [Tue, 8 Sep 2009 21:03:34 +0000 (17:03 -0400)]
Merge branch 'master' of git://sources.redhat.com/git/systemtap

14 years agoWarn if the pid specified by -x does not belong to an unprivileged user.
Dave Brolley [Tue, 8 Sep 2009 21:02:51 +0000 (17:02 -0400)]
Warn if the pid specified by -x does not belong to an unprivileged user.

14 years agoClean up iostat-scsi.stp and add to the regular testing.
William Cohen [Tue, 8 Sep 2009 18:17:45 +0000 (14:17 -0400)]
Clean up iostat-scsi.stp and add to the regular testing.

14 years agotestsuite: reduce verbosity of (deprecated?) nodwf07.stp test
Frank Ch. Eigler [Tue, 8 Sep 2009 14:12:14 +0000 (10:12 -0400)]
testsuite: reduce verbosity of (deprecated?) nodwf07.stp test

* testsuite/semko/nodwf07.stp: Add >/dev/null at end, since stap -p2
  for this script generates turbomucho text.

14 years agoHACKING: add brief git usage blurb
Frank Ch. Eigler [Tue, 8 Sep 2009 14:07:09 +0000 (10:07 -0400)]
HACKING: add brief git usage blurb

14 years agotestsuite: fix buildok test permissions
Frank Ch. Eigler [Tue, 8 Sep 2009 10:35:06 +0000 (06:35 -0400)]
testsuite: fix buildok test permissions

14 years agopackaging: make -client and -system prereq zip & unzip
Frank Ch. Eigler [Tue, 8 Sep 2009 10:30:04 +0000 (06:30 -0400)]
packaging: make -client and -system prereq zip & unzip

14 years agoPR4186 cont'd: Squash both EM_PPC and EM_PPC64 to powerpc.
Mark Wielaard [Tue, 8 Sep 2009 08:42:21 +0000 (10:42 +0200)]
PR4186 cont'd: Squash both EM_PPC and EM_PPC64 to powerpc.

* tapsets.cxx (validate_module_elf): Set expect_machine = "powerpc" for both
  EM_PPC and EM_PPC64 to match session architecture set in main.

14 years agopackaging: make -testsuite prereq /usr/bin/which
Frank Ch. Eigler [Tue, 8 Sep 2009 01:20:47 +0000 (21:20 -0400)]
packaging: make -testsuite prereq /usr/bin/which

14 years agobz10475.exp: Use filp_open which has a constant const char argument for test.
Mark Wielaard [Mon, 7 Sep 2009 15:06:27 +0000 (17:06 +0200)]
bz10475.exp: Use filp_open which has a constant const char argument for test.

For some reason the do_filp_open const char *pathname argument has changed
its name between different kernel versions. Luckily filp_open has a cont char
*filename argument that is constant between versions (the test needs a
const char* argument to do an array operation on).

* testsuite/semok/bz10475.stp: Use filp_open instead of do_filp_open.

14 years agoPR10613 sys32_ustat is renamed compat_sys_ustat in 2.6.30 kernel.
Mark Wielaard [Mon, 7 Sep 2009 09:36:03 +0000 (11:36 +0200)]
PR10613 sys32_ustat is renamed compat_sys_ustat in 2.6.30 kernel.

Note that the new compat_sys_ustat is asmlinkage and has a differently
named argument for the user struct.

* tapset/syscalls2.stp (syscall.ustat32): Add compat_sys_ustat variant.
  (syscall.ustat.return): Likewise.
* tapset/nd_syscalls2.stp (nd_syscall.ustat32): Likewise.
  (nd_syscall.ustat.return): Likewise.

14 years agoFix build-id check for relocatable kernel
Eugeniy Meshcheryakov [Mon, 7 Sep 2009 09:01:14 +0000 (11:01 +0200)]
Fix build-id check for relocatable kernel

Save offset of build id relative to _stext instead of absolute
address for kernel and apply relocations at run-time. This fixes
Debian bug #545277 (http://bugs.debian.org/545277).

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Fri, 4 Sep 2009 20:25:50 +0000 (16:25 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agorc = 0 should be return 0 for database not ownder by root.
Dave Brolley [Fri, 4 Sep 2009 20:25:14 +0000 (16:25 -0400)]
rc = 0 should be return 0 for database not ownder by root.

14 years agoCheck for bad address range or size in lookup_bad_addr.
Dave Brolley [Fri, 4 Sep 2009 16:35:26 +0000 (12:35 -0400)]
Check for bad address range or size in lookup_bad_addr.

14 years agoGet tcpdumplike.stp tested on "make check"
William Cohen [Fri, 4 Sep 2009 14:33:56 +0000 (10:33 -0400)]
Get tcpdumplike.stp tested on "make check"

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Thu, 3 Sep 2009 23:53:24 +0000 (19:53 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoUse task_euid when STAPCONF_TASK_UID is not defined.
Dave Brolley [Thu, 3 Sep 2009 23:52:44 +0000 (19:52 -0400)]
Use task_euid when STAPCONF_TASK_UID is not defined.

14 years agoAdd --unprivileged to the module hash
Josh Stone [Thu, 3 Sep 2009 22:57:48 +0000 (15:57 -0700)]
Add --unprivileged to the module hash

* hash.cxx (find_script_hash): Add s.unprivileged.

14 years agoMerge branch 'master' of sourceware.org:/git/systemtap
Josh Stone [Thu, 3 Sep 2009 21:31:02 +0000 (14:31 -0700)]
Merge branch 'master' of sourceware.org:/git/systemtap

14 years agoDisallow kernel space memory access when unprivileged.
Dave Brolley [Thu, 3 Sep 2009 21:19:05 +0000 (17:19 -0400)]
Disallow kernel space memory access when unprivileged.

2009-09-03  Dave Brolley  <brolley@redhat.com>

        * runtime/addr-map.c (lookup_addr_aux): Now takes size argument.
        Consider the size when looking for overlapping range with the map
        entries.
        (lookup_bad_addr): Now takes size argument. Disallow kernel space access
        when STP_PRIVILEGED is not defined. Pass size to lookup_addr_aux.
        <asm/processor.h>: #include it when STP_PRIVILEGED is not defined.
        (add_bad_addr_entry): Supply a size of 1 to calls to lookup_addr_aux.
        * runtime/loc2c-runtime.h (kread): Pass sizeof (*(ptr)) to
        lookup_bad_addr.
        (kwrite): Likewise.
        (deref): Pass size to lookup_bad_addr.
        (store_deref): Likewise.

14 years agoAllow process begin/end probes for unprivileged users.
Dave Brolley [Thu, 3 Sep 2009 20:13:30 +0000 (16:13 -0400)]
Allow process begin/end probes for unprivileged users.

2009-09-03  Dave Brolley  <brolley@redhat.com>

        * tapsets.cxx (visit_cast_op): Don't disallow unprivileged users.
        Annotate synthesized function with /* unprivileged */.
        * tapset-utrace.cxx (register_tapset_utrace): Call allow_unprivileged
        for process begin and end probes.
        * translate.cxx (translate_pass): Generate '#define STP_PRIVILEGED 1'
        unless --unprivileged was specified.
        * runtime/transport/transport.c: Don't define _stp_unprivileged_user.
        * runtime/task_finder.c (__stp_utrace_attach_match_filename): Check
        that _stp_uid equals the task euid when STP_PRIVILEGED is not defined.
        (stap_start_task_finder): Likewise.
        * runtime/staprun/staprun.c (insert_stap_module): Don't generate
        module option _stp_unprivileged_user.

14 years agoEscape literal '.'s in regular expressions
Josh Stone [Thu, 3 Sep 2009 19:31:21 +0000 (12:31 -0700)]
Escape literal '.'s in regular expressions

* dwflpp.cxx (dwflpp::build_blacklist): Escape '.'s in filenames.

14 years agoUse a regexp for matching blacklist sections
Josh Stone [Thu, 3 Sep 2009 19:26:37 +0000 (12:26 -0700)]
Use a regexp for matching blacklist sections

We already use regexp for function/file blacklisting, so this just makes
the section blacklisting consistent with the rest.

* dwflpp.cxx (dwflpp::blacklisted_p): Use regexec instead of section==.
  (dwflpp::build_blacklist): Build blacklist_section too.

14 years agoFetch the blacklist section only when needed
Josh Stone [Thu, 3 Sep 2009 19:00:10 +0000 (12:00 -0700)]
Fetch the blacklist section only when needed

We only check blacklisting on kernel probes, so it's a waste to dig up
the section name otherwise.

* dwflpp.cxx (dwflpp::blacklisted_p): Lookup the section directly.
  (relocate_address::relocate_address): Don't do blacklisting here.
* tapsets.cxx (dwarf_query::add_probe_point): Don't carry the blacklist
  section directly anymore.

14 years agoPR10573: Squash duplicate inline instances
Josh Stone [Thu, 3 Sep 2009 18:32:59 +0000 (11:32 -0700)]
PR10573: Squash duplicate inline instances

In C++, identical functions included in multiple CUs will get merged at
link time into a single instance.  We need to make sure that inlines
within those merged functions are not probed multiple times.

* tapsets.cxx (inline_instance_info::operator<): Used for set support.
  (dwarf_query::handle_query_module): Clear inline_dupes on each module.
  (query_dwarf_inline_instance): Squash this inline instance if it's
  already in the inline_dupes set.

14 years agoPR10589 followup. More tapsets.cxx _stp_warn formatting fixlets.
Mark Wielaard [Thu, 3 Sep 2009 13:03:35 +0000 (15:03 +0200)]
PR10589 followup. More tapsets.cxx _stp_warn formatting fixlets.

struct kretprobe nmissed an int, but struct kprobe nmissed an unsigned long.

* tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): Adjust _stp_warn
  format string for kprobe nmissed argument.
  (kprobe_derived_probe_group::emit_module_init): Likewise.

14 years agoPR10552 followup, remove -M testcases.
Mark Wielaard [Thu, 3 Sep 2009 12:02:45 +0000 (14:02 +0200)]
PR10552 followup, remove -M testcases.

* testsuite/systemtap.base/cache.exp: Remove MERGE1 and MERGE2 (-M) tests.

14 years agoPR10589 followup. tapsets.cxx _stp_warn formatting fixlets.
Mark Wielaard [Thu, 3 Sep 2009 11:54:07 +0000 (13:54 +0200)]
PR10589 followup. tapsets.cxx _stp_warn formatting fixlets.

* tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Cast _stp_warn
  arguments.
  (kprobe_derived_probe_group::emit_module_init): Likewise.

14 years agoPR10572: Allow duplicate function names in a CU
Josh Stone [Thu, 3 Sep 2009 02:09:50 +0000 (19:09 -0700)]
PR10572: Allow duplicate function names in a CU

We can't assume that a given function name will only appear once in a
CU.  In C++, two functions may have the same name in different classes
or namespaces, or even in the same scope with overloaded parameters.
Even in C, the compiler may generate multiple copies of a single
function with different optimizations.

We now use a multimap for function names, so we shouldn't miss any.

* dwflpp.h (cu_type_cache_t, mod_cu_type_cache_t): New typedef to keep a
  normal map for the global_alias_cache.
  (cu_function_cache_t): Use a multimap for function names.
* dwflpp.cxx (dwflpp::iterate_over_functions): Walk over the range of
  exactly-matching functions.
* tapsets.cxx (query_dwarf_func): Don't abort after seeing an exact
  match -- there could be more to come.

14 years agoDelete stuff that dwflpp newed
Josh Stone [Thu, 3 Sep 2009 01:40:14 +0000 (18:40 -0700)]
Delete stuff that dwflpp newed

* dwflpp.cxx (dwflpp::~dwflpp): Delete all of the caches.

14 years agoProvide backward-compatible unordered_map/set
Josh Stone [Wed, 2 Sep 2009 23:43:58 +0000 (16:43 -0700)]
Provide backward-compatible unordered_map/set

We were defining our own stap_map with a ::type to let us use typedefs
to use the new unordered_map if available, or hash_map otherwise.  Since
unordered_map is the future direction, I'm changing our code to use that
directly.  The backward-compatible version is a #define to hash_map,
which has a compatible interface.

While I'm at it, let's also define unordered_multimap, unordered_set,
and unordered_multiset.

* unordered.h: New.
* dwflpp.h (stap_map): Removed.
  (cache typedefs): Use the unordered name now.

14 years agoUnify lex_cast* and avoid string copies
Josh Stone [Wed, 2 Sep 2009 23:14:08 +0000 (16:14 -0700)]
Unify lex_cast* and avoid string copies

We always use lex_cast either to string or from string, so I made that
explicit, and got rid of some string copies in the process.  There was
also stringify(), which was redundant to lex_cast<string>.

We also always used lex_cast_hex to string, so that's now hard-coded and
again eliminated a string copy.

For lex_cast_qstring<string>, there's no need to write the streamify the
input, so a specialization now operates directly on the input.

Hopefully this is a bit cleaner, and I do measure it to be a little
faster on scripts with many probes.

14 years agoReturn, don't exit mysql.exp when unsupported.
Mark Wielaard [Wed, 2 Sep 2009 19:53:21 +0000 (21:53 +0200)]
Return, don't exit mysql.exp when unsupported.

14 years agoPR10589: switch to kernel vscnprintf for _stp_{dbug,warn,error} calls in runtime
Frank Ch. Eigler [Wed, 2 Sep 2009 16:01:27 +0000 (12:01 -0400)]
PR10589: switch to kernel vscnprintf for _stp_{dbug,warn,error} calls in runtime

_stp_vscnprintf is only suitable for calls from the script, with slightly
different conventions (64-bit ints/pointers, extra formatting directives).

* runtime/runtime.h (_stp_{dbug,warn,error}): Add __attribute__ format(printf).
* runtime/io.c (_stp_vlog): Ditto.  Use vscnprintf().
* runtime/sym.c (_stp_module_check): Remove hexdumping (%.*M) of mismatching
  buildids.  Switch to _stp_warn from printk (KERN_WARNING).
* translate.cxx, runtime/unwind.c: Numerous print formatting tweaks.

14 years agoAdd mysql.exp to test dtrace like support for mysql.
Stan Cox [Tue, 1 Sep 2009 21:52:44 +0000 (17:52 -0400)]
Add mysql.exp to test dtrace like support for mysql.

* testsuite/systemtap.base/mysql.exp: New.

14 years agoPR10552: Removed references to the merge ('-M') option.
David Smith [Tue, 1 Sep 2009 20:20:39 +0000 (15:20 -0500)]
PR10552: Removed references to the merge ('-M') option.
* hash.cxx (find_script_hash): Removed unused merge option.
* main.cxx (checkOptions): Removed merge option checks.
  (main): Removed merge option.
* session.h: Ditto.
* initscript/README.initscript: Removed reference to '-M' option.
* initscript/systemtap.in (stap_getopt): Ditto.
* testsuite/parseko/cmdline01.stp: Removed merge option test.
* testsuite/parseko/cmdline05.stp: Ditto.

14 years agoPR10581: Use ARCH for tracepoints and kernel typequeries
Josh Stone [Tue, 1 Sep 2009 16:38:12 +0000 (09:38 -0700)]
PR10581: Use ARCH for tracepoints and kernel typequeries

These are kernel modules that we generate for querying debuginfo, so
they need to use the same ARCH settings that we put in the main script
module.

* buildrun.cxx (make_tracequery, make_typequery_kmod): Add the arch and
  kbuild flags to make_cmd.
* hash.cxx (find_stapconf_hash, find_tracequery_hash,
  find_typequery_hash): The arch is in the base hash already, but add
  the kbuild flags too.

14 years agoProvide accurate error message for failed utrace probe
Wenji Huang [Tue, 1 Sep 2009 02:47:12 +0000 (22:47 -0400)]
Provide accurate error message for failed utrace probe

* tapset-utrace.cxx(emit_module_init): Set probe_point.

14 years agoUse a header-cast in nd_syscall.sigaltstack
Josh Stone [Mon, 31 Aug 2009 22:22:33 +0000 (15:22 -0700)]
Use a header-cast in nd_syscall.sigaltstack

The nd_syscalls tapset is meant to run with no debuginfo, so using a
@cast into a module type defeats the purpose.  We should use a @cast
with a header name instead, so debuginfo is generated.

* tapset/i386/nd_syscalls.stp (nd_syscall.sigaltstack): Get the pt_regs
  type definition from "kernel<asm/ptrace.h>".

14 years agoAdd virtual memory subsystem tracepoint examples.
William Cohen [Mon, 31 Aug 2009 20:53:40 +0000 (16:53 -0400)]
Add virtual memory subsystem tracepoint examples.

14 years agoMirror the sys_sigaltstack fix in nd_syscalls
Josh Stone [Mon, 31 Aug 2009 18:22:50 +0000 (11:22 -0700)]
Mirror the sys_sigaltstack fix in nd_syscalls

The argument fix in commit 77c26b4 needs to be made in nd_syscalls too,
where the conditional kernel should be 2.6.30 instead of 2.6.29.

* tapset/i386/nd_syscalls.stp (nd_syscall.sigaltstack): Check 2.6.30.

14 years agoFix sys_sigaltstack ussp conditional.
Mark Wielaard [Sat, 29 Aug 2009 18:42:09 +0000 (20:42 +0200)]
Fix sys_sigaltstack ussp conditional.

For i386 sys_sigaltstack changed argument params starting with kernel
commit b12bda which was only included in 2.6.30, not in any 2.6.29 kernel.

* tapset/i386/syscalls.stp (sys_sigaltstack): ussp conditional should be
  kernel_v < "2.6.30" for param change (from bx to regs).

14 years agoTighten kernel.function alias_tapset.exp expect regexp to match precisely.
Mark Wielaard [Sat, 29 Aug 2009 17:34:01 +0000 (19:34 +0200)]
Tighten kernel.function alias_tapset.exp expect regexp to match precisely.

14 years agoFix overlapping statement probe error in warnings.stp.
Mark Wielaard [Sat, 29 Aug 2009 14:49:44 +0000 (16:49 +0200)]
Fix overlapping statement probe error in warnings.stp.

Instead of generating a warning the current kernel.statement probe
produced a warning on some 386 kernels that had optimized that
particular line:
semantic error: multiple addresses for fs/bio.c:282
 (try fs/bio.c:278 or fs/bio.c:284)
semantic error: no match while resolving probe point
 kernel.statement("bio_init@fs/bio.c+3")
So do as told to just get the expected warnings for this probe.

* testsuite/systemtap.base/warnings.stp (probea): Probe bio_init@fs/bio.c+5.

14 years agoTighten alias_tapset.exp expect regexp to not gobble up multiple lines.
Mark Wielaard [Sat, 29 Aug 2009 14:29:27 +0000 (16:29 +0200)]
Tighten alias_tapset.exp expect regexp to not gobble up multiple lines.

14 years agoCache inline instance lookups
Josh Stone [Sat, 29 Aug 2009 01:01:51 +0000 (18:01 -0700)]
Cache inline instance lookups

We used to call dwarf_func_inline_instances to get the locations where
inlines are used.  This function has to iterate through nearly all DIEs
to find instances, which is a lot of redundant work when we're probing
multiple inline functions.

Now we have our own dwarf iterator to cache all inline instances back to
their origin.  This only needs to be called once for each CU, and all
further inlines are just a map lookup.  Some quick benchmarks:

  stap -l                           Before      After
  kernel.function("*")             25010ms     2110ms
  module("*").function("*")        86550ms    16920ms
  process("stap").function("*")    41330ms      580ms

* dwflpp.cxx (dwflpp::cu_inl_function_caching_callback): Removed.
  (dwflpp::cache_inline_instances): New caching iterator.
  (dwflpp::iterate_over_inline_instances): Cache each CU once.

14 years agoHave dtrace use [wd] as the default dir when -o isn't given.
Stan Cox [Fri, 28 Aug 2009 21:16:00 +0000 (17:16 -0400)]
Have dtrace use [wd] as the default dir when -o isn't given.

* dtrace.in: Generate the output file from basename of input filename.
* dtrace.exp: Adjust the tests accordingly.

14 years agostap-client will now always choose a compatible server even for phases 1-3.
Dave Brolley [Fri, 28 Aug 2009 20:47:20 +0000 (16:47 -0400)]
stap-client will now always choose a compatible server even for phases 1-3.
Always start a local server needed by the test suite (make {install}check).

14 years agoAdded test for pr10568.
David Smith [Fri, 28 Aug 2009 18:59:27 +0000 (13:59 -0500)]
Added test for pr10568.
* testsuite/systemtap.base/alias_tapset.exp: New file.
* testsuite/systemtap.base/alias_tapset.stp: Ditto.
* testsuite/systemtap.base/alias_tapset/tapset_test.stp: Ditto.

14 years agoAdd a NEWS blurb for || and && in the preprocessor
Josh Stone [Fri, 28 Aug 2009 18:29:17 +0000 (11:29 -0700)]
Add a NEWS blurb for || and && in the preprocessor

14 years agoUse || and && in preprocessor's conditions in tapsets.
Przemyslaw Pawelczyk [Fri, 28 Aug 2009 00:19:21 +0000 (02:19 +0200)]
Use || and && in preprocessor's conditions in tapsets.

Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoSupport || and && in preprocessor's conditions.
Przemyslaw Pawelczyk [Fri, 28 Aug 2009 00:11:47 +0000 (02:11 +0200)]
Support || and && in preprocessor's conditions.

* parse.cxx (parser::scan_pp): Add || and &&.
* stap.1.in: Document || and && in PREPROCESSING.
* testsuite/parseok/twenty.stp: Test case.
* testsuite/parseko/preprocess14.stp: Ditto.
* testsuite/parseko/preprocess15.stp: Ditto.

Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoCross check stap_compile.exp stap run result with error messages seen.
Mark Wielaard [Fri, 28 Aug 2009 11:51:41 +0000 (13:51 +0200)]
Cross check stap_compile.exp stap run result with error messages seen.

14 years agoTighten stap_compile.exp regexp to not accidentially gobble up extra lines.
Mark Wielaard [Fri, 28 Aug 2009 10:35:04 +0000 (12:35 +0200)]
Tighten stap_compile.exp regexp to not accidentially gobble up extra lines.

14 years agoPR10568: Ensure that aliases pull in their tapset
Josh Stone [Thu, 27 Aug 2009 22:43:51 +0000 (15:43 -0700)]
PR10568: Ensure that aliases pull in their tapset

When a probe alias is resolved in a tapset, the contents of that tapset
should be included in the compiled script, just as we do for global
variables and functions.

* elaborate.cxx (alias_expansion_builder::build): When an alias is
  instantiated, add its stapfile to the session files.
* testsuite/systemtap.base/tapset_includes.exp: New test.
* testsuite/systemtap.base/tapset/*.stp: Testing tapsets for above.

14 years agoxfail backtrace.exp as PR6961 backtrace from non-pt_regs probe context
Mark Wielaard [Thu, 27 Aug 2009 21:42:56 +0000 (23:42 +0200)]
xfail backtrace.exp as PR6961 backtrace from non-pt_regs probe context

14 years agoReturn, don't exit postgres.exp when unsupported.
Mark Wielaard [Thu, 27 Aug 2009 21:34:17 +0000 (23:34 +0200)]
Return, don't exit postgres.exp when unsupported.

14 years agoTeach postgres.exp to use a locally built version of postgres.
Stan Cox [Thu, 27 Aug 2009 18:47:08 +0000 (14:47 -0400)]
Teach postgres.exp to use a locally built version of postgres.

* postgres.exp: Grab postgres from upstream then build and test it
with uprobe, utrace, and kprobe.

14 years agoReorganize iterate_over_labels
Josh Stone [Thu, 27 Aug 2009 03:09:48 +0000 (20:09 -0700)]
Reorganize iterate_over_labels

I noticed that iterate_over_labels was using a static variable as a
recursion variable, which isn't a safe thing to do since it will only be
initialized once.  While fixing that, I also reorganized the function
quite a bit.

* dwflpp.cxx (dwflpp::iterate_over_labels): Take the current function as
  a parameter instead of using a static local.  Rewrite some of the code
  as well to try to make it more obvious.
* tapsets.cxx (add_label_name): Remove in favor of query_label.
  (query_label): New, to check decl_file and fix probe listing.
  (query_srcfile_label, query_cu): Adjust to iterate_over_labels change
  and start using query_label as the callback.

14 years agoRemove unnecessary static members
Josh Stone [Thu, 27 Aug 2009 00:35:54 +0000 (17:35 -0700)]
Remove unnecessary static members

When a static class member is only used by a single method, it's more
concise to use a static local variable instead.

* staptree.cxx (probe::probe): Make last_probeidx a static local.
* tapset-perfmon.cxx (perfmon_derived_probe::perfmon_derived_probe):
  Make probes_allocated a static local.

14 years agoCleanup some deref handling in the task tapset
Josh Stone [Thu, 27 Aug 2009 00:05:29 +0000 (17:05 -0700)]
Cleanup some deref handling in the task tapset

Some of this is just cosmetic, but there is one big takeaway: there's a
error-goto between kread calls and the CATCH_DEREF_FAULT.  You must not
allow this to bypass any resource management, like unlocking a resource
that you grabbed!

* tapset/task.stp (pid2task): No derefs, so remove the CATCH.
  (task_gid, task_egid, task_uid, task_euid): Move the CATCH within the
  #ifdef branch that actually needs it.
  (task_open_file_handles, task_max_file_handles): Ensure that we always
  call rcu_read_unlock if we locked it!

14 years agoCorrect a few comments to match the code
Josh Stone [Wed, 26 Aug 2009 23:15:46 +0000 (16:15 -0700)]
Correct a few comments to match the code

* tapset/conversions.stp (kernel_long, kernel_int, kernel_short,
  kernel_char): All are actually using kread(), not deref().
* tapset/i386/registers.stp (_stp_arg): Ditto.
* tapset/x86_64/registers.stp (_stp_arg): Ditto.

14 years agoIncrease avahi-browse timeout to 20 seconds.
Dave Brolley [Wed, 26 Aug 2009 16:36:25 +0000 (12:36 -0400)]
Increase avahi-browse timeout to 20 seconds.

14 years agoAllow 20 seconds for the server to start up.
Dave Brolley [Wed, 26 Aug 2009 14:46:50 +0000 (10:46 -0400)]
Allow 20 seconds for the server to start up.
Use ps -e to check for server and avahi pids.

14 years agoPR4186 cont'd: Squash EM_S390 to s390.
Mark Wielaard [Wed, 26 Aug 2009 11:16:17 +0000 (13:16 +0200)]
PR4186 cont'd: Squash EM_S390 to s390.

* tapsets.cxx (validate_module_elf): Set expect_machine to "s390".

14 years agoCompute cu_name dynamically
Josh Stone [Wed, 26 Aug 2009 01:53:40 +0000 (18:53 -0700)]
Compute cu_name dynamically

We only need cu_name for errors and verbose messages, so it's a waste to
always construct it in focus_on_cu.  It's now built only as-needed.

* dwflpp.cxx (dwflpp::cu_name): Now a method instead of a data member.
  (dwflpp::focus_on_module): No cu_name to clear now.
  (dwflpp::focus_on_cu): No cu_name to set now.
  (dwflpp::declaration_resolve): Adjust to call cu_name() now.
  (dwflpp::iterate_over_functions): Ditto.
* tapsets.cxx (query_cu): Ditto.

14 years agoAvoid needless Dwarf_Die copying
Josh Stone [Wed, 26 Aug 2009 01:20:39 +0000 (18:20 -0700)]
Avoid needless Dwarf_Die copying

* dwflpp.cxx (dwflpp::iterate_over_cus): Use the Dwarf_Die as a
  pointer directly into the vector.
  (dwflpp::iterate_over_inline_instances): Ditto.
  (dwflpp::iterate_over_functions): Ditto in a map.

14 years agoConvert module_cu_cache_t to a stap_map
Josh Stone [Wed, 26 Aug 2009 00:42:55 +0000 (17:42 -0700)]
Convert module_cu_cache_t to a stap_map

* dwflpp.cxx (module_cu_cache_t): Typedef as a stap_map instead.

14 years agoIndex cu_inl_function_cache_t by function->addr
Josh Stone [Wed, 26 Aug 2009 00:23:28 +0000 (17:23 -0700)]
Index cu_inl_function_cache_t by function->addr

Again, avoid needless string construction for map indexing.

* dwflpp.h (cu_inl_function_cache_t): Index by the void* function->addr.
* dwflpp.cxx (dwflpp::iterate_over_inline_instances): Index
  cu_inl_function_cache by function->addr.

14 years agoIndex mod_cu_function_cache_t by cu->addr
Josh Stone [Tue, 25 Aug 2009 23:58:20 +0000 (16:58 -0700)]
Index mod_cu_function_cache_t by cu->addr

Rather than constructing a "module:cu" string all the time, we can just
index the cache by the cu die's addr field.  The addr will never change
as long as the Dwarf object is still alive.

This has a quite noticeable performance impact for scripts that iterate
over lots of cus (like for syscall.*).

* dwflpp.h (stap_map): Allow void* keys too.
  (mod_cu_function_cache_t): Index by the void* cu->addr.
* dwflpp.cxx (dwflpp::iterate_over_functions): Index cu_function_cache
  by addr, and build the verbose strings manually when needed.
  (dwflpp::declaration_resolve): Index global_alias_cache by addr.

14 years agoPR4186 cont'd: clarify ARCH naming in NEWS too
Frank Ch. Eigler [Tue, 25 Aug 2009 16:38:33 +0000 (12:38 -0400)]
PR4186 cont'd: clarify ARCH naming in NEWS too

14 years agoPR4186 cont'd: option #2: standardize on kernel ARCH/SUBARCH throughout
Frank Ch. Eigler [Tue, 25 Aug 2009 15:54:15 +0000 (11:54 -0400)]
PR4186 cont'd: option #2: standardize on kernel ARCH/SUBARCH throughout

* main.cxx (main): Perform equivalent sed by hand on uname()->machine.
* stap.1.in: Clarify -a ARCH slightly.
* tapsets.cxx (validate_module_elf): Accept "arm*"for EM_ARM.
* tapset/**, testsuite/**: Removed/collapsed "i386"/"i686" branches,
  renamed "ppc64"->"powerpc" and "s390x"->"s390".

14 years agoKFAIL cmd_parse15 on kernel < 2.6.29, see commit e0ccd3.
Mark Wielaard [Tue, 25 Aug 2009 15:18:00 +0000 (17:18 +0200)]
KFAIL cmd_parse15 on kernel < 2.6.29, see commit e0ccd3.

* testsuite/systemtap.base/cmd_parse.exp: kfail cmd_parse15 when
  kernel26ver < 29.

14 years agoMake inlinedvars empty asm really empty.
Mark Wielaard [Tue, 25 Aug 2009 12:25:43 +0000 (14:25 +0200)]
Make inlinedvars empty asm really empty.

A debug "nop" was accidentially left in the asm statement that should
have been totally empty.

* testsuite/systemtap.base/inlinedvars.c (m): Really empty asm.

14 years agoPR2475: Filter filenames against the decl_file
Josh Stone [Tue, 25 Aug 2009 00:54:40 +0000 (17:54 -0700)]
PR2475: Filter filenames against the decl_file

We used to only check that a CU contains at least one srcfile matching
the user's file spec.  This patch ensures that the selected function was
actually defined in one of the matching srcfiles.

* tapsets.cxx (struct dwarf_query): Make filtered_srcfiles carry
  strings, so we can easily lookup matches later.
  (query_dwarf_func): Check that the decl_file is in filtered_srcfiles.
  (query_cu): Adjust to using set<string>.
* dwflpp.cxx (dwflpp::collect_srcfiles_matching): Take a set<string>.

14 years agoPR4186 cont'd: uname -m --> uname -i in test cases
Frank Ch. Eigler [Mon, 24 Aug 2009 23:42:28 +0000 (19:42 -0400)]
PR4186 cont'd: uname -m  -->  uname -i in test cases

14 years agoPR4186 cont'd: move tapset/i686 -> tapset/i386
Frank Ch. Eigler [Mon, 24 Aug 2009 23:38:51 +0000 (19:38 -0400)]
PR4186 cont'd: move tapset/i686 -> tapset/i386

14 years agoPR4186 cont'd: tolerate older kbuild Makefile's chattiness
Frank Ch. Eigler [Mon, 24 Aug 2009 17:14:21 +0000 (13:14 -0400)]
PR4186 cont'd: tolerate older kbuild Makefile's chattiness

* buildrun.cxx (run_make_cmd): Add back >/dev/null for older kernels.

14 years agoPR4186 cont'd: fix 32-bit i386 builds
Frank Ch. Eigler [Mon, 24 Aug 2009 16:54:42 +0000 (12:54 -0400)]
PR4186 cont'd: fix 32-bit i386 builds

* main.cxx (main): Initialize s.architecture to value as if
  from `uname -i`.  Specifically, squash i?86 -> i386.

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