]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoFix compilation error of dwflpp.cxx on gcc 4.1
Wenji Huang [Thu, 17 Sep 2009 06:25:28 +0000 (14:25 +0800)]
Fix compilation error of dwflpp.cxx on gcc 4.1

* dwflpp.cxx(translate_location): Separate setting value from
  declaration and add missing parameter.

14 years agoMerge branch 'function_scopes'
Josh Stone [Thu, 17 Sep 2009 02:57:10 +0000 (19:57 -0700)]
Merge branch 'function_scopes'

14 years agoPR10461: Match C++ scopes for namespaces and classes
Josh Stone [Thu, 17 Sep 2009 02:38:20 +0000 (19:38 -0700)]
PR10461: Match C++ scopes for namespaces and classes

The function spec for dwarf probes now supports scopes, so you can limit
the probes to specific namespaces or classes.  Multiple scopes can be
specified, and they will be matched progressively outward.

    probe process("foo").function("std::vector<*>::*") { ... }
    probe process("foo").function("::global_function") { ... }

* dwflpp.cxx (dwflpp::get_parent_scope): New, finds the containing
  scopes of the specified DIE.
  (dwflpp::function_scope_matches): New, checks that the scopes
  containing the function all match the given scope patterns.
* tapsets.cxx (dwarf_query::parse_function_spec): Rewrite, now handles
  multiple scope separators too.
  (query_dwarf_func): Check that the functions scopes match.

14 years agoPR10650: markup some unprivileged-safe tapset functions
Frank Ch. Eigler [Thu, 17 Sep 2009 02:32:28 +0000 (22:32 -0400)]
PR10650: markup some unprivileged-safe tapset functions

Add /* unprivileged */ to a variety of tapset embedded-c functions,
together with uid-assertion-checking code as needed.  This is only
an initial set, and may need to grow or shrink after further testing.

Prototyped-By: Dave Brolley <brolley@redhat.com>
* runtime/runtime.h (is_myproc, assert_is_myproc): New macros.
* runtime/addr-map.c (lookup_bad_addr): Reject if !is_myproc
  in unprivileged mode.
* runtime/print.c (_stp_print_kernel_info): Add unprivileged
  mode info.
* tapset/DEVGUIDE: Document /* pure */ and /* unprivileged */.
* tapset/*.stp: Add /* unprivileged */ here and there, in
  questionable cases along with an assert_is_myproc().

14 years ago* sdt.h (STAP_SEMAPHORE): New. Add guard to utrace probe points.
Stan Cox [Thu, 17 Sep 2009 01:05:00 +0000 (21:05 -0400)]
* sdt.h (STAP_SEMAPHORE): New.  Add guard to utrace probe points.
* itrace.h (__access_process_vm): Moved from here...
* runtime/access_process_vm.h: New.  ...to here.
* translate.cxx (translate_pass): Include access_process_vm.h
* session.h (sdt_semaphore_addr): New.
* tapsets.cxx (sdt_query::record_semaphore): New.  Record sdt_semaphore_addr.
(uprobe_derived_probe_group::emit_module_decls): Allow for uprobe guard variable to be set and unset.
(uprobe_derived_probe_group::emit_module_decls): Likewise.
(uprobe_derived_probe_group::emit_module_exit): Likewise.
* tapset-utrace.cxx (utrace_derived_probe_group::emit_probe_decl): Likewise.
(utrace_derived_probe_group::emit_module_decls): Likewise.
(utrace_derived_probe_group::emit_module_exit): Likewise.

14 years agoRemove the unused function_name_final_match
Josh Stone [Thu, 17 Sep 2009 00:38:53 +0000 (17:38 -0700)]
Remove the unused function_name_final_match

* dwflpp.cxx (dwflpp::function_name_final_match): Removed.

14 years agoMerge branch 'master' of sourceware.org:/git/systemtap
Josh Stone [Wed, 16 Sep 2009 22:55:19 +0000 (15:55 -0700)]
Merge branch 'master' of sourceware.org:/git/systemtap

14 years agoAdd the badname.stp example
Josh Stone [Wed, 16 Sep 2009 22:52:17 +0000 (15:52 -0700)]
Add the badname.stp example

This is a toy script I wrote a while back to demonstrate how SystemTap
could be used to enforce filesystem naming rules.

14 years agoAdd syscall probe information to Language Reference
Robb Romans [Wed, 16 Sep 2009 21:15:56 +0000 (16:15 -0500)]
Add syscall probe information to Language Reference

Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoAdd tracepoint information to Language Reference
Robb Romans [Wed, 16 Sep 2009 20:46:38 +0000 (15:46 -0500)]
Add tracepoint information to Language Reference

Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoAdd PROCFS information to Language Reference
Robb Romans [Wed, 16 Sep 2009 20:10:04 +0000 (15:10 -0500)]
Add PROCFS information to Language Reference

Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoSpelling fixes in the tapsets
Josh Stone [Wed, 16 Sep 2009 22:23:50 +0000 (15:23 -0700)]
Spelling fixes in the tapsets

14 years agoSpelling fixes in the init script
Josh Stone [Wed, 16 Sep 2009 22:20:05 +0000 (15:20 -0700)]
Spelling fixes in the init script

14 years agoSpelling fixes in the meta of many examples
Josh Stone [Wed, 16 Sep 2009 22:16:47 +0000 (15:16 -0700)]
Spelling fixes in the meta of many examples

14 years agoFix the old networking buildok test
Josh Stone [Wed, 16 Sep 2009 21:19:18 +0000 (14:19 -0700)]
Fix the old networking buildok test

14 years agoA basic test to assure that networking tapset is building ok
Breno Leitao [Wed, 16 Sep 2009 18:37:16 +0000 (14:37 -0400)]
A basic test to assure that networking tapset is building ok

This is a basic script to assure that the network devices tapset
is building (-p4) properly.

This script is basically a copy of another netdev example that is
located on testsuite/systemtap.examples/network/netdev.stp

Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoAdd meta for the netdev example & regenerate indexes
Josh Stone [Wed, 16 Sep 2009 21:17:10 +0000 (14:17 -0700)]
Add meta for the netdev example & regenerate indexes

14 years agoA network device example
Breno Leitao [Wed, 16 Sep 2009 18:37:17 +0000 (14:37 -0400)]
A network device example

Add a example that cover the network device tapset. This example
just add simple probes and display what is going one with all
the network devices.

Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoAdding a some new probes to the networking.stp tapset
Breno Leitao [Wed, 16 Sep 2009 18:37:15 +0000 (14:37 -0400)]
Adding a some new probes to the networking.stp tapset

A tapset that helps those who are working with network devices.
These new fnctions try to cover almost all functions related to
these network devices.

Signed-off-by: Josh Stone <jistone@redhat.com>
14 years agoHandle DW_TAG_reference_type in loc2c-test.
Roland McGrath [Wed, 16 Sep 2009 20:45:57 +0000 (13:45 -0700)]
Handle DW_TAG_reference_type in loc2c-test.

* loc2c-test.c (handle_variable): Handle DW_TAG_reference_type.

14 years agoAdd signal based file switching testcase
Masami Hiramatsu [Wed, 16 Sep 2009 20:08:38 +0000 (16:08 -0400)]
Add signal based file switching testcase

* testsuite/systemtap.base/flightrec1.exp: Add signal file switching testcase.
* testsuite/systemtap.base/flightrec4.exp: New test for signal file switching
  with file number limits.
* testsuite/systemtap.base/flightrec5.exp: New test for signal file switching
  with file number limits on bulk mode.

14 years agoSignal-based file switching support for old relay
Masami Hiramatsu [Wed, 16 Sep 2009 20:08:38 +0000 (16:08 -0400)]
Signal-based file switching support for old relay

* runtime/staprun/relay_old.c (switch_oldoutfile): New function for file
  switching.
  (process_subbufs): Use switch_oldoutfile.
  (reader_thread): Use ppoll() instead of poll() for receiving SIGUSR2
  and switch output file when receiving a signal(SIGUSR2).
  (switchfile_handler): Send SIGUSR2 signal to reader threads for file
  switching.
  (init_oldrelayfs): Assign switchfile_handler to SIGUSR2.

14 years agoSignal-based file switching support for relay/ring buffer.
Masami Hiramatsu [Wed, 16 Sep 2009 20:08:25 +0000 (16:08 -0400)]
Signal-based file switching support for relay/ring buffer.

* runtime/staprun/relay.c (switch_outfile): New function for file switching.
  (reader_thread): Don't assign empty_handler to SIGUSR2, and switch output
  file when receiving signal(SIGUSR2) on ppoll.
  (switchfile_handler): Send SIGUSR2 signal to reader threads for file
  switching.
  (init_relayfs): Assign switchfile_handler to SIGUSR2.
* staprun.1.in: Add FILE SWITCHING BY SIGNAL section.

14 years agoInitialize CairoWidget origin of graph
Tim Moore [Wed, 29 Jul 2009 08:49:06 +0000 (10:49 +0200)]
Initialize CairoWidget origin of graph

* grapher/Graph.hxx (Graph constructor): add origin arguments
* grapher/Graph.cxx: ditto
* grapher/GraphWidget.cxx (on_expose_event): Use CairoWidget origin to
position graphs.

14 years agoFix graph attribute parsing buglet
Tim Moore [Tue, 28 Jul 2009 10:59:52 +0000 (12:59 +0200)]
Fix graph attribute parsing buglet

* grapher/StapParser.cxx (findTaggedValue): Extract value substring
after tag.

14 years agoDraw graphs inside a scrolled window
Tim Moore [Tue, 28 Jul 2009 10:27:23 +0000 (12:27 +0200)]
Draw graphs inside a scrolled window

* grapher/grapher.cxx (GrapherWindow, GrapherWindow constructor): Add
ScrolledWindow object and display it. Make GraphWidget its child.

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

14 years agoCreate is_myproc helper function.
Dave Brolley [Wed, 16 Sep 2009 16:18:15 +0000 (12:18 -0400)]
Create is_myproc helper function.

14 years agoMake labels -l .label test independent of list output order.
Mark Wielaard [Wed, 16 Sep 2009 10:59:50 +0000 (12:59 +0200)]
Make labels -l .label test independent of list output order.

* testsuite/systemtap.base/labels.exp (-l .label): List all output lines
  individually in expect regex.

14 years agoClean up dwflpp::translate_location workaround for DW_AT_data_member_location.
Mark Wielaard [Wed, 16 Sep 2009 10:22:04 +0000 (12:22 +0200)]
Clean up dwflpp::translate_location workaround for DW_AT_data_member_location.

Do the same workaround as loc2c-test.c does. Just treat a constant member
location offset as a DW_OP_plus_uconst and call c_translate_location for it.
Also Remove c_translate_add_offset.

* dwflpp.cxx (dwflpp::translate_location): Check elfutils version and only
  do workaround for elfutils < 0.142.
* loc2c.h (c_translate_add_offset): Removed.
* loc2c.c (c_translate_add_offset): Likewise.

14 years agoClean up loc2c-test workaround for constant DW_AT_data_member_location.
Roland McGrath [Wed, 16 Sep 2009 08:57:39 +0000 (01:57 -0700)]
Clean up loc2c-test workaround for constant DW_AT_data_member_location.

* loc2c-test.c (handle_variable): Skip the workaround for elfutils 0.142.
When doing it, use a synthetic location expression.
Never use c_translate_add_offset, which is broken.

14 years agoRemove function comparison from label iteration
Josh Stone [Wed, 16 Sep 2009 01:15:20 +0000 (18:15 -0700)]
Remove function comparison from label iteration

We already have filtered functions and inlines, so just iterate in each
of those to look for labels.

* dwflpp.cxx (dwflpp::iterate_over_labels): Assume that the die we're
  looking at is already a matching function, and don't descend into
  inlined functions in this body.
* tapsets.cxx (query_srcfile_label): Iterate through inlines too.
  (query_cu): Iterate over functions and inlines instead of the CU.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Frank Ch. Eigler [Tue, 15 Sep 2009 22:29:45 +0000 (18:29 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

* 'master' of ssh://sources.redhat.com/git/systemtap: (34 commits)
  Update the langref copyright notice
  Fix some probe examples in the language reference
  Remove automatic authorization of servers started by root as trusted signers.
  docs: add abnormal termination section to PROCESSING
  Remove unneeded header file
  Get the module to sign from -p4's stdout
  Move --unprivileged support news to the top.
  Firther updates to NEWS regarding signing and unprivileged users.
  Authorize new certificates created for servers started by root as authorized signers.
  2009-09-14  Dave Brolley  <brolley@redhat.com>
  Allow remaining process.* probes for unprivileged users.
  Use the sched_switch tracepoint if available.
  PR10608: mark test cases untested once compilation failed
  Make check.exp not sleep so much in test_installcheck.
  Make tracepoints.exp test more efficient by running as one giant script.
  Only test highest optimization for exelib.exp test.
  Replace small exelib.exp testcases with one jumbo testcase.
  Remove duplicate uprobe_derived_probe code
  Add semaphores for use with the forthcoming sdt marker checks.
  Add actual pc address to semantic error about inaccessible variables.
  ...

Conflicts:
tapsets.cxx

14 years agoPR10642: fix wildcard-driven quadratic explosion of .return $$parms probes
Frank Ch. Eigler [Tue, 15 Sep 2009 21:04:00 +0000 (17:04 -0400)]
PR10642: fix wildcard-driven quadratic explosion of .return $$parms probes

For $variables listed in .return probes, a synthetic probe is being
created, for saving the named variable values at function entry.  However,
the probe point for this synthetic probe was copied naively, so that
several problems could occur:
- if the original probe point contained wildcards, then each synthetic one
  also did, and was therefore multiply derived later
- if the probe point referred to a multiply instantiated function, the
  synthetic one was not directly identified with it (at the dwarf_addr level)

Now the synthetic probe is created more carefully, bypassing any further
derivation/expansion processing steps.

* tapsets.cxx (dwarf_var_expanding_visitor): Change add_probe to
  add_call_probe field.
  (visit_target_symbol_saved_return): Store only the body of the
  synthetic probe.
  (dwarf_derived_probe ctor): Create intimately related dwarf_derived_probe
  for synthetic probe.
  (uprobe_derived_probe ctor): Ditto.

14 years agoUpdate the langref copyright notice
Josh Stone [Tue, 15 Sep 2009 20:19:41 +0000 (13:19 -0700)]
Update the langref copyright notice

14 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 '%}'.

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

14 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

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

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

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

14 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

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

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

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

14 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

14 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

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

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