summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move vma module tracking from pr6866 branch to master.Mark Wielaard2009-03-153-11/+45
| | | | | | | | | | | | * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): Always emit vm callback probe for __stp_tf_vm_cb. * runtime/task_finder.c (__stp_tf_vm_cb): Always expose, move _stp_dbug statements under ifdef DEBUG_TASK_FINDER_VMA. Find and record corresponding module when vm_path not NULL. * runtime/task_finder_vma.c (struct __stp_tf_vma_entry): Add _stp_module. (stap_add_vma_map_info): Add _stp_module argument and assign. (__stp_tf_get_vma_entry_addr): New static function to get the __stp_tf_vma_entry given an address.
* Fixups to allow Tapset_Reference_guide documentation to build.William Cohen2009-03-141-2/+14
|
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapWilliam Cohen2009-03-135-16/+41
|\
| * Move lookup_bad_addr call in STAPCONF_PROBE_KERNELJosh Stone2009-03-131-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With most of the implementations, kread/kwrite call deref/store_deref, and so it makes sense to have lookup_bad_addr in the latter as an underlying address check. However, in the STAPCONF_PROBE_KERNEL case that uses probe_kernel_read and probe_kernel_write, the roles are reversed, so lookup_bad_addr needs to be in kread/kwrite. Also note that __deref_bad and __store_deref_bad should only be used in cases that can be determined at compile time. These turn into invalid symbols which prevent the module from loading. (They might be better replaced with compile-time assertions.)
| * PR9947: move runtime cleanup out of the work queueJosh Stone2009-03-134-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | The kernel lockdep checking found a possible deadlock if a forced rmmod tried to destroy _stp_work_queue at the same time that the work queue was unregistering tracepoints. An unlikely scenario, but still possible. Now the work queue will just issue a STP_REQUEST_EXIT down to usermode, and usermode will echo back an STP_EXIT that triggers the actual probe cleanup. This way the unregistrations are happening in exactly the same context as the registrations were.
* | Add missing </para>.William Cohen2009-03-131-1/+1
|/
* Add -ansi -pedantic pair to sdt test.Mark Wielaard2009-03-131-1/+1
| | | | | * testsuite/systemtap.base/sdt.exp: Add additional_flags -ansi together with -pedantic.
* Add -O2 and -O3 as extra test flags to sdt.Mark Wielaard2009-03-131-1/+1
| | | | * testsuite/systemtap.base/sdt.exp: Add -O2, -O3.
* Introduce stap_run3 for distinct test names.Mark Wielaard2009-03-132-8/+21
| | | | | * testsuite/lib/stap_run2.exp: Add stap_run3, called from stap_run2. * testsuite/systemtap.base/sdt.exp: Use stap_run3, for distinct test names.
* Simplify tracepoint registrationsJosh Stone2009-03-121-28/+43
| | | | | | | Instead of registering tracepoints with the deeply-nested if-tree, which was cluttering the module_init/exit, this now emits normalized reg/unreg functions for each tracepoint probes. Now the module_init/exit can be a simple loop like all of the other probe types.
* Add test to compile and run all tracepointsJosh Stone2009-03-112-0/+26
| | | | | | | | | This checks that kernel.trace("*") will compile, with all context variables accessed as well. For kernels without tracepoints, it will just hit a "begin" and quit. This doesn't ensure that kernel.trace("*") will always find something when it should, though...
* Fix @cast module splittingJosh Stone2009-03-111-1/+1
| | | | | | The new semok testcase exposed that the module splitting wasn't properly setting substr boundaries. Instead of passing the end position, it's supposed to pass the number of characters (end - begin). Oops.
* Add simple testcases for @castJosh Stone2009-03-113-0/+39
|
* improve sdt.h compatibility and test suiteFrank Ch. Eigler2009-03-113-31/+36
| | | | | | Replaced cpp VA_ARGS in sdt.h with explicit enumeration of arguments (since with -pedantic, cpp has no varargs), and added a few more cflags variants to the sdt.exp test case.
* PR 7071: Optional $context variables fixRajan Arora2009-03-116-12/+50
| | | | | | | | | | | | | | | | * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Substitute erroneous target symbol with literal 0 if session level flag, skip_badvars is set. * session.h (struct systemtap_session): New flag: skip_badvars. * main.cxx: Command line argument --skip-badvars added. * stap.1.in: Entry for new option --skip-badvars. * NEWS: Added blurb for new option now available. * testsuite/semok/badvar.stp: Test case to check added functionality.
* Run the tests for each member of a list of extra options.Stan Cox2009-03-111-1/+30
| | | | * testsuite/systemtap.base/sdt.h: Add extra_flags and g++ as a test language.
* 2009-03-11 Dave Brolley <brolley@redhat.com>Dave Brolley2009-03-112-20/+51
| | | | | | | | | | | | PR 9936 * stap-find-servers (configuration): Set timeout to 10 seconds. (find_servers): Run avahi-browse in the background and wait for $timeout seconds for it to finish. Kill it if it does not finish. Use a temp file for avahi-browse output. (match_server): Use -t $timeout on read commands. * stap-start-server: Check for $server_pid as a running process and for avahi-publish-service running as a child of $server_pid in order to confirm that the server is running.
* Make marker probe support listing mode -LWenji Huang2009-03-101-0/+22
| | | | | | | | | | | | | | | | This patch is to enable displaying the arguments of marker probe for listing mode -L. The output is like, $stap -L 'kernel.mark("*")' kernel.mark("core_marker_format").format("name %s format %s") $arg1:string $arg2:string kernel.mark("jbd2_checkpoint").format("dev %s need_checkpoint %d") $arg1:string $arg2:long kernel.mark("jbd2_end_commit").format("dev %s transaction %d head %d") $arg1:string $arg2:long $arg3:long kernel.mark("jbd2_start_commit").format("dev %s transaction %d") $arg1:string $arg2:long Note: It's also possible to figure out the arguments according to the format. Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* Make tracepoint probe support listing mode -LWenji Huang2009-03-103-1/+13
| | | | | | | | | | | | | | This patch is to enable displaying arguments of tracepoint probe in listing mode -L. The example output is like $stap -L 'kernel.trace("block_bio*")' kernel.trace("block_bio_bounce") $q:struct request_queue* $bio:struct bio* kernel.trace("block_bio_backmerge") $q:struct request_queue* $bio:struct bio* kernel.trace("block_bio_complete") $q:struct request_queue* $bio:struct bio* kernel.trace("block_bio_queue") $q:struct request_queue* $bio:struct bio* kernel.trace("block_bio_frontmerge") $q:struct request_queue* $bio:struct bio* Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* Merge branch 'typecast'Josh Stone2009-03-105-134/+84
|\
| * Merge sequential casts in the vfs tapsetJosh Stone2009-03-101-35/+19
| | | | | | | | | | | | | | | | | | A few places in this tapset were using a pattern like this: i_sb = @cast(foo, "inode")->i_sb return @cast(foo, "super_block")->bar The type of i_sb is already known, so I just merged this to: return @cast(foo, "inode")->i_sb->bar
| * PR9932: use @cast module search pathJosh Stone2009-03-103-60/+35
| | | | | | | | | | | | | | | | | | The nfs, rpc, and scsi tapsets use @cast on types that may be compiled into a kernel module or into the main kernel binary. The @cast search path separated with colons lets us search both the kernel and the module. For a couple of cases, I also merged sequential @casts that work just fine as a single cast with a multiple-level dereference.
| * PR9932: add @cast module search pathJosh Stone2009-03-101-39/+30
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes @cast()ing can fail if the type needed may or may not be defined in a kernel module. This patch lets @cast take a colon- separated list of modules to search for the type definition. * tapsets.cxx (dwarf_cast_query): Simplify. Take the module and the code result as reference parameters, and use code.empty() as the sign that the type isn't resolved yet. (dwarf_cast_expanding_visitor::visit_cast_op): Split e->module by colon into substrings, and loop until the type is resolved.
* | Ensure args are available for postgres static probes.Stan Cox2009-03-101-25/+25
|/ | | | * includes/sys/sdt.h: Couple asm with its arg declaration.
* Let -DINTERRUPTIBLE=0 mask interrupts in probesJosh Stone2009-03-093-24/+41
| | | | | | | | | | | | | | | Some time ago we loosened up the code for all probe types to allow interrupts during the handler. However, when probing something like kernel.trace("*"), you get a mix of probes in and out of the interrupt path, and it becomes much more common to have probes skipped due to interrupt reentrancy. The common_probe_entryfn_prologue and common_probe_entryfn_epilogue functions had an interruptible flag, but this was no longer used anywhere. I removed this flag, but then reused the logic to check an INTERRUPTIBLE macro instead. Now users can use -DINTERRUPTIBLE=0 to prevent interrupt reentrancy in their script, at the cost of a bit more overhead to toggle the interrupt mask.
* Fix a few typos in stap(1)Josh Stone2009-03-091-6/+7
|
* Use alternate keywords for sdt.hStan Cox2009-03-092-137/+93
| | | | * include/sys/sdt.h: Initialize args when declaring. Use alternate keywords.
* Add tracepoint $$parms alias for $$varsJosh Stone2009-03-092-4/+6
| | | | | | For parity with the DWARF probes, this makes tracepoints also define $$parms, which has the same value as $$vars (since tracepoints are missing the concept of $$locals).
* Update location of c->probe_point resetJosh Stone2009-03-091-1/+1
| | | | | The probe_point clear was nested in the overload processing code, I believe accidentally. This just makes it always cleared on probe exit.
* Add safety checks to _stp_get_register_by_offset()Josh Stone2009-03-094-1/+41
| | | | | This now checks that CONTEXT->regs actually exists, and that the requested offset is in the correct range.
* PR9935. Fixed stap script typos. arg[5-10] -> $arg[5-10].Mark Wielaard2009-03-092-9/+7
| | | | | * testsuite/systemtap.base/sdt.exp: Enable stap_run2 when installtest_p. * testsuite/systemtap.base/sdt.stp: Fixed all arg to $arg typos.
* Add PR9935 number to sdt.exp disabled test.Mark Wielaard2009-03-091-1/+1
|
* Add new sdt.exp testcase.Mark Wielaard2009-03-093-0/+154
| | | | | | * testsuite/systemtap.base/sdt.exp: New test file. * testsuite/systemtap.base/sdt.stp: Likewise. * testsuite/systemtap.base/sdt.c: Likewise.
* Include sys/types.h in sdt.h for __uint64_t.Mark Wielaard2009-03-091-0/+1
| | | | * includes/sys/sdt.h: Add #include <sys/types.h>.
* Put statements after declaration in sdt macros. Fix arg10 assignment.Mark Wielaard2009-03-091-85/+140
| | | | * includes/sys/sdt.h: Assign args, after declaration.
* Only use plain C comments in sdt.h.Mark Wielaard2009-03-091-10/+11
| | | | includes/sys/sdt.h: Replace c++ comments with plain C comments.
* Make stap_run2 count exact number of lines.Mark Wielaard2009-03-0939-71/+38
| | | | | * testsuite/lib/stap_run2.exp: Compare found and expected number of lines. * testsuite/systemtap.*/*.exp (result_string): Make number of lines exact.
* Remove extra semi-colons from defines in sdt.h.Mark Wielaard2009-03-091-3/+3
| | | | | * includes/sys/sdt.h (STAP_PROBE_STRUCT_ARG): Remove ending semi-colon. (STAP_LABEL_REF): Likewise.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapddomingo2009-03-098-28/+102
|\
| * tracepoint probes: clear session derived_probe_groups pointer in ctor to ↵Frank Ch. Eigler2009-03-082-0/+3
| | | | | | | | avoid SEGV
| * Check pending_interrupts more frequently during unwindsyms (pass 3) processingFrank Ch. Eigler2009-03-081-0/+3
| |
| * Adapt to linux-next commit changing __alloc_percpu API.Frank Ch. Eigler2009-03-083-22/+10
| | | | | | | | | | After linux-next commit f2a8205c, it takes two parameters again, so we autoconf for it rather than use KERNEL_VERSION ifdefs.
| * Minor changes to labels.exp.Stan Cox2009-03-081-6/+6
| |
| * Fix and add tests for function(".so").statement(N)Stan Cox2009-03-082-6/+86
| | | | | | | | | | | | | | | | * tapsets.cxx (query_dwarf_func): die_has_pc (dwarf_haspc) does not expect a module_start for shared objects so don't call module_address_to_global for the statement address. * testsuite/systemtap.base/labels.exp: Add tests for executable .statement(N), shared object .label("L") and so .statement(N).
* | added commenting/documentation guidelinesddomingo2009-03-091-7/+174
|/
* PR9930: reentrancy debuggingFrank Ch. Eigler2009-03-071-38/+35
| | | | | | | | | If stap is run with "-t -DDEBUG_REENTRANCY", additional warnings will be printed for every reentrancy event, including the probe points of the resident and interloper probes. * tapsets.cxx (common_probe_entryfn_prologue): Add "new_pp" argument, update all callers. Print reentrancy details if needed.
* Add placeholder for new newsFrank Ch. Eigler2009-03-071-0/+2
|
* Tweak tracepoint logic to run on tracepoint_synchronize_unregister()-less RHEL5Frank Ch. Eigler2009-03-072-4/+18
|
* Merge branch 'tracepoints'Josh Stone2009-03-065-21/+861
|\
| * Document TRACEPOINTS in stapprobes(5)Josh Stone2009-03-061-0/+36
| |