]> sourceware.org Git - systemtap.git/log
systemtap.git
15 years agoUpdate the langref copyright notice
Josh Stone [Tue, 15 Sep 2009 20:19:41 +0000 (13:19 -0700)]
Update the langref copyright notice

15 years agoFix some probe examples in the language reference
Josh Stone [Tue, 15 Sep 2009 19:46:22 +0000 (12:46 -0700)]
Fix some probe examples in the language reference

* doc/langref.tex (section{Components of a SystemTap script}): Use
  .call/.return for the example of tracing function entry/exit.  Also
  mention "-l" for listing probeable functions.
  (subsection{Embedded C functions}): Close the examples with '%}'.

15 years agoRemove automatic authorization of servers started by root as trusted signers.
Dave Brolley [Tue, 15 Sep 2009 15:42:12 +0000 (11:42 -0400)]
Remove automatic authorization of servers started by root as trusted signers.

15 years agodocs: add abnormal termination section to PROCESSING
Frank Ch. Eigler [Tue, 15 Sep 2009 14:45:00 +0000 (10:45 -0400)]
docs: add abnormal termination section to PROCESSING

15 years agoRemove unneeded header file
Wenji Huang [Tue, 15 Sep 2009 06:39:51 +0000 (14:39 +0800)]
Remove unneeded header file

* modsign.cxx: Remove including session.h.

15 years agoGet the module to sign from -p4's stdout
Josh Stone [Tue, 15 Sep 2009 00:43:51 +0000 (17:43 -0700)]
Get the module to sign from -p4's stdout

The saved stdout should have the exact name of the generated module,
which is better than using a recursive find to locate it.  Tracepoints
and @cast may generate additional .ko's which we don't want to confuse
with the real deal.

* stap-server (create_response): grep stdout for the module name.

15 years agoMove --unprivileged support news to the top.
Dave Brolley [Mon, 14 Sep 2009 21:53:40 +0000 (17:53 -0400)]
Move --unprivileged support news to the top.

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Mon, 14 Sep 2009 21:47:26 +0000 (17:47 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

Conflicts:

aclocal.m4
configure
doc/SystemTap_Tapset_Reference/Makefile.in
testsuite/aclocal.m4
testsuite/configure

15 years agoFirther updates to NEWS regarding signing and unprivileged users.
Dave Brolley [Mon, 14 Sep 2009 19:52:10 +0000 (15:52 -0400)]
Firther updates to NEWS regarding signing and unprivileged users.

15 years agoAuthorize new certificates created for servers started by root as authorized signers.
Dave Brolley [Mon, 14 Sep 2009 19:46:34 +0000 (15:46 -0400)]
Authorize new certificates created for servers started by root as authorized signers.
Update NEWS with the latest usage infor for --unprivileged.

15 years ago2009-09-14 Dave Brolley <brolley@redhat.com>
Dave Brolley [Mon, 14 Sep 2009 19:06:36 +0000 (15:06 -0400)]
2009-09-14  Dave Brolley  <brolley@redhat.com>

        * modsign.cxx (init_cert_db_path): Use 'system' call.
        (sign_module): Renamed to 'main'. This is now an independant program.
        Check for arguments. Return 1 on error.
        * buildrun.cxx (modsign.h): Don't #include it.
        (compile_pass): Don't sign the module.
        * main.cxx (main): Don't copy the module signature.
        * cache.cxx (add_to_cache): Don't cache the module signature.
        * Makefile.am (bin_PROGRAMS): Add stap-sign-module.
        (stap_SOURCES): Remove modsign.cxx and nsscommon.c.
        (stap_sign_module_SOURCES): New variable.
        (stap_sign_module_CPPFLAGS): New variable.
        (stap_sign_module_LDFLAGS): New variable.
        (stap_sign_module_LDADD): New variable.
        * stap-server (initialization): Initialize unprivileged.
        (parse_options): Handle --unprivileged.
        (create_response): Call stap-sign-module if --unprivileged was
        specified.
        * systemtap.spec: Add stap-sign-module to stap-server.
        * Makefile.in: Regenerated.
        * doc/Makefile.in: Regenerated.
        * doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated.
        * grapher/Makefile.in: Regenerated.
        * testsuite/Makefile.in: Regenerated.
        * aclocal.m4: Likewise.
        * testsuite/aclocal.m4: Likewise.
        * configure: Likewise.
        * testsuite/configure: Likewise.

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Mon, 14 Sep 2009 15:58:49 +0000 (11:58 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoAllow remaining process.* probes for unprivileged users.
Dave Brolley [Mon, 14 Sep 2009 15:58:22 +0000 (11:58 -0400)]
Allow remaining process.* probes for unprivileged users.

15 years agoUse the sched_switch tracepoint if available.
William Cohen [Mon, 14 Sep 2009 15:41:23 +0000 (11:41 -0400)]
Use the sched_switch tracepoint if available.

15 years agoPR10608: mark test cases untested once compilation failed
Wenji Huang [Mon, 14 Sep 2009 02:05:08 +0000 (10:05 +0800)]
PR10608: mark test cases untested once compilation failed

* testsuite/systemtap.syscall/syscall.exp: Simplify logic things.
* testsuite/systemtap.syscall/test.tcl: Check compilation result.
* testsuite/systemtap.base/utrace_syscall_args.exp: Change fail to
  untested.

15 years agoMake check.exp not sleep so much in test_installcheck.
Mark Wielaard [Sun, 13 Sep 2009 21:57:42 +0000 (23:57 +0200)]
Make check.exp not sleep so much in test_installcheck.

A lot of time during the installcheck was spend just sleeping. Reduce the
sleep time by at least one fifth.

* testsuite/systemtap.examples/*/*meta: Reduct -c "sleep" time.

15 years agoMake tracepoints.exp test more efficient by running as one giant script.
Mark Wielaard [Sun, 13 Sep 2009 21:37:28 +0000 (23:37 +0200)]
Make tracepoints.exp test more efficient by running as one giant script.

When there are lots of tracepoints in the kernel running a script
for each one individually can take several minutes. So run them all
in one giant script at the same time. Also increase timeout for
the stap -l collection step since with an empty cache that might
take more than the default 10 seconds.

* testsuite/systemtap.base/tracepoints.exp: Increase default timeout.
  Collect all script fragments and run them as one.

15 years agoOnly test highest optimization for exelib.exp test.
Mark Wielaard [Sun, 13 Sep 2009 20:31:37 +0000 (22:31 +0200)]
Only test highest optimization for exelib.exp test.

There is not much to gain from testing low and high optimized programs.
So only test highest optimization level. Half test time from 200 to 100 sec.

* testsuite/systemtap.exelib/exelib.exp: Set opt to list containing just -O3.

15 years agoReplace small exelib.exp testcases with one jumbo testcase.
Mark Wielaard [Sun, 13 Sep 2009 20:22:05 +0000 (22:22 +0200)]
Replace small exelib.exp testcases with one jumbo testcase.

Merge lib, mark, uname and ustack stp and tcl scripts into one large
libmarkunamestack stp and tcl script. But keep the individual tests
in case the large test fails and one wants to debug the individual steps.

Takes test time for exelib.exp down from 700 seconds to 200 seconds.

* testsuite/systemtap.exelib/libmarkunamestack.stp: New large stp script.
* testsuite/systemtap.exelib/libmarkunamestack.tcl: New large tcl script.
* testsuite/systemtap.exelib/exelib.exp: Use libmarkunamestack.

15 years agoRemove duplicate uprobe_derived_probe code
Josh Stone [Fri, 11 Sep 2009 21:58:50 +0000 (14:58 -0700)]
Remove duplicate uprobe_derived_probe code

Much of uprobe_derived_probe is a straight copy of dwarf_derived_probe,
and some of the comments even acknowledge this.  I'm instead making this
an inheritance, so the duplication can be chopped away.

* tapsets.cxx (struct dwarf_derived_probe): Reorganize for inheritance.
  (dwarf_derived_probe::dwarf_derived_probe): Adapt to handle process.
  (struct uprobe_derived_probe): Inherit from dwarf_derived_probe and
  remove duplicate members and methods.
  (uprobe_derived_probe::emit_module_decls): Member name changes.

15 years agoAdd semaphores for use with the forthcoming sdt marker checks.
Stan Cox [Fri, 11 Sep 2009 19:01:48 +0000 (15:01 -0400)]
Add semaphores for use with the forthcoming sdt marker checks.

dtrace.in (semaphore_def_append): New.
(generate): Call it.
(semaphore_def_write): New.
(main): Call it.

15 years agoAdd actual pc address to semantic error about inaccessible variables.
Mark Wielaard [Fri, 11 Sep 2009 15:23:08 +0000 (17:23 +0200)]
Add actual pc address to semantic error about inaccessible variables.

* dwflpp.cxx (translate_location): Add hex pc address to semantic error
  when dwarf_getlocation_addr() doesn't return expression.

15 years agoPR10618: update iostat-scsi.stp for 2.6.31
Wenji Huang [Fri, 11 Sep 2009 05:38:47 +0000 (13:38 +0800)]
PR10618: update iostat-scsi.stp for 2.6.31

* testsuite/systemtap.examples/io/iostat-scsi.stp: Add pure function.
* testsuite/systemtap.examples/io/iostat-scsi.meta: Add -g option.

15 years agoMerge branch 'getscopes'
Josh Stone [Fri, 11 Sep 2009 03:40:10 +0000 (20:40 -0700)]
Merge branch 'getscopes'

15 years agoPR10594 cont'd: Use parent die cache for variable lookup
Josh Stone [Fri, 11 Sep 2009 00:06:11 +0000 (17:06 -0700)]
PR10594 cont'd: Use parent die cache for variable lookup

Variable lookup is usually done through the scopes from dwarf_getscopes
at a particular pc.  This requires an expensive traversal to find the
inner-most die containing the pc.  For cases where that containing die
is known, e.g. at a particular function entry, we can do much better
with our die_parent_cache.

This may also help get more accurate variable scopes in cases where
multiple dies contain a pc and the innermost isn't what we're trying to
probe.  For example, an inlined call chain of foo->bar->baz may all have
the same entry pc, but if the probe was on function("bar"), we would
want the variables in bar's scope, not baz's.

* dwflpp.h (struct dwflpp): Remove pc_cached_scopes, num_cached_scopes,
  and cached_scopes, as they are now remembered by the caller.
* dwflpp.cxx (dwflpp::getscopes): New - the DIE version uses the parent
  cache, and the pc version just defers to dwarf_getscopes.
  (dwflpp::print_locals, literal_stmt_for_local): Take a scopes vector.
  (dwflpp::find_variable_and_frame_base): Take a scopes vector from the
  caller instead of computing it every time.
  (dwflpp::dwarf_getscopes_cached): Removed.
* tapsets.cxx (dwarf_var_expanding_visitor::getscopes): New cached
  lookup function which gets the scopes from the DIE if possible.
  (dwarf_var_expanding_visitor::visit_target_symbol): Call getscopes.

15 years agoRun autoreconf
Eugeniy Meshcheryakov [Thu, 10 Sep 2009 23:20:38 +0000 (01:20 +0200)]
Run autoreconf

15 years agoRemove generated files during clean
Eugeniy Meshcheryakov [Thu, 10 Sep 2009 23:19:03 +0000 (01:19 +0200)]
Remove generated files during clean

15 years agoSimplify deleting all map values
Josh Stone [Wed, 9 Sep 2009 23:13:16 +0000 (16:13 -0700)]
Simplify deleting all map values

* util.h (delete_map): New templated map deleter.
* dwflpp.cxx (dwflpp::~dwflpp): Use it.
* tapsets.cxx (symbol_table::~symbol_table): Use it.

15 years agoPR10594: Provide a cached dwarf_getscopes_die
Josh Stone [Wed, 9 Sep 2009 22:45:28 +0000 (15:45 -0700)]
PR10594: Provide a cached dwarf_getscopes_die

This avoids repeated DIE traversal by caching all parents on the first
call, so future calls are just a simple walk up parent links.

* dwflpp.cxx (dwflpp::getscopes_die): New cached function that mimics
  libdw's dwarf_getscopes_die using cached parent links.
  (dwflpp::cache_die_parents): New function to build the parent cache.
  (dwflpp::~dwflpp): Clean up the parent caches.
  (dwflpp::iterate_over_labels): Use the cached getscopes_die.
  (dwflpp::find_variable_and_frame_base): Ditto.
* tapsets.cxx (dwarf_derived_probe::saveargs): Ditto.
  (uprobe_derived_probe::saveargs): Ditto.
  (dwarf_var_expanding_visitor::visit_target_symbol_context): Ditto.

15 years agoAdded blurb about the ring_buffer transport.
David Smith [Thu, 10 Sep 2009 17:39:11 +0000 (12:39 -0500)]
Added blurb about the ring_buffer transport.

15 years agoAllow ring_buffer to be used if STP_USE_RING_BUFFER is defined.
David Smith [Thu, 10 Sep 2009 17:36:32 +0000 (12:36 -0500)]
Allow ring_buffer to be used if STP_USE_RING_BUFFER is defined.

15 years agoAdd generated files to .gitignore
Robb Romans [Thu, 10 Sep 2009 17:04:04 +0000 (12:04 -0500)]
Add generated files to .gitignore

15 years agobuild: support x86-64 without CONFIG_IA32_EMULATION
Frank Ch. Eigler [Thu, 10 Sep 2009 14:04:07 +0000 (10:04 -0400)]
build: support x86-64 without CONFIG_IA32_EMULATION

* runtime/syscall.h (x86_64 MMAP2_SYSCALL_NO): Define.

15 years agoPR10602: dummy commit for authorship tracking only
Jim Keniston [Wed, 9 Sep 2009 23:18:21 +0000 (19:18 -0400)]
PR10602: dummy commit for authorship tracking only

15 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>
15 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.

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

15 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.

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

15 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.

15 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

15 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.

15 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.

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

15 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.

15 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.

15 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.

15 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

15 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.

15 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.

15 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.

15 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.

15 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.

15 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

15 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

15 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.

15 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.

15 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.

15 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

15 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

15 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

15 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.

15 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

15 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.

15 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.

15 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).

15 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

15 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.

15 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.

15 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"

15 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

15 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.

15 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.

15 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

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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>".

15 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.

15 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.

15 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).

15 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.

15 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.

15 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.

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