summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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
| |
| * Ensure tracepoints are synchronized after unregJosh Stone2009-03-061-0/+4
| | | | | | | | | | | | | | | | | | | | The tracepoint API provides tracepoint_synchronize_unregister() as a way to guarantee that all tracepoint handlers are inactive. This is necessary after unregistering to allow the module to safely unload. * tapsets.cxx (tracepoint_derived_probe_group::emit_module_init): Call synchronize after unregistering tracepoints. (tracepoint_derived_probe_group::emit_module_exit): Ditto.
| * Support older tracepoints using DEFINE_TRACEJosh Stone2009-03-061-0/+5
| | | | | | | | | | | | | | | | | | At one point, the tracepoints API didn't have DECLARE_TRACE, and the trace headers all used DEFINE_TRACE. This is what got pulled into RHEL, so we need to support this older usage. The rest of the API stays the same though. * buildrun.cxx (make_tracequery): Redefine DEFINE_TRACE as well.
| * Enable tracepoint target variablesJosh Stone2009-03-061-3/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses a similar mechanism as marker probes for storing target variables in locals of the probe body. * tapsets.cxx (tracepoint_arg): Add fields to help $target access. (tracepoint_var_expanding_visitor): Expand code to access target variables - a $target for each tracepoint parameter, as well as the special $$name and $$vars. (tracepoint_derived_probe::tracepoint_derived_probe): Expand targets (resolve_tracepoint_arg_type): Determine if a parameter is a type that we can dereference, and store the underlying type. (tracepoint_derived_probe::build_args): Resolve the types. (tracepoint_derived_probe::emit_probe_context_vars): Emit $target placeholders into the locals of the probe body. (tracepoint_derived_probe_group::emit_module_decls): Initialize $targets from the entry point parameters.
| * Emit code to hook up tracepoint probesJosh Stone2009-03-061-4/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tapsets.cxx (tracepoint_arg): New (tracepoint_derived_probe): Add declaring header name and arg vector (dwarf_type_name): Build a type string for a given type DIE (tracepoint_derived_probe::build_args): Scan the function DIE for the name and type of formal parameters required by the tracepoint. (tracepoint_derived_probe::tracepoint_derived_probe): Call build_args and determine the relevant header to include. (tracepoint_derived_probe_group::emit_module_decls): For each tracepoint, include its header and declare a probe entry point with the right function signature. (tracepoint_derived_probe_group::emit_module_init): Call the registration for each tracepoint, and handle error unwinding. (tracepoint_derived_probe_group::emit_module_exit): Unregister each.
| * Build skeleton tracepoint probesJosh Stone2009-03-061-4/+79
| | | | | | | | | | | | * tapsets.cxx (tracepoint_derived_probe): Create a skeleton probe (tracepoint_derived_probe_group): Create a skeleton group (tracepoint_query::handle_query_func): build a probe
| * Scan tracequery.ko for tracepointsJosh Stone2009-03-061-1/+79
| | | | | | | | | | | | | | * tapsets.cxx (tracepoint_query): Iterate over the modules, CUs, and functions in tracequery.ko looking for our hijacked tracepoint declarations. (tracepoint_builder::build): Run a tracepoint_query
| * Build tracequery to scan for tracepointsJosh Stone2009-03-064-0/+155
| | | | | | | | | | | | | | | | | | | | * session.h (systemtap_session): add tracepoint_derived_probes * buildrun.cxx (make_tracequery): New - builds a kernel module that hijacks the tracepoint declarations, so we can query debuginfo. * buildrun.h: declare above * tapsets.cxx (tracepoint_builder): New builder for tracepoint probes. For now it just handles the initialization to build the tracequery kernel module.
| * Make iterate_over_functions work with base_querysJosh Stone2009-03-061-14/+17
| | | | | | | | | | | | | | | | | | | | * tapsets.cxx (dwflpp::iterate_over_functions): Change arg from void* to base_query*, and add explicit function-search parameters. (query_cu): update caller (query_dwarf_func): update callback signature (Note: instead of passing around callback functions, it might be nicer to use a virtual method in base_query...)
| * Make session.module_cache init more consistentlyJosh Stone2009-03-041-7/+3
| | | | | | | | | | | | | | | | | | We used to check & init module_cache in a few inconsistent places. Now it is always handled in dwflpp::setup_user/setup_kernel. * tapsets.cxx (dwflpp::setup_user): add module_cache check (dwarf_builder::build): remove module_cache check (dwarf_cast_expanding_visitor::visit_cast_op): ditto
* | Update AUTHORSJosh Stone2009-03-061-0/+2
| |
* | STAP_PROBE takes no extra arguments.Mark Wielaard2009-03-061-2/+2
| | | | | | | | * includes/sys/sdt.h (STAP_PROBE): Don't add __VA_ARGS__.
* | Create unique named labels.Stan Cox2009-03-061-65/+94
| | | | | | | | | | * includes/sys/sdt.h (STAP_PROBEN_): New macros that take advantage of __COUNTER__
* | PR9871: use @cast in tapsetWenji Huang2009-03-067-348/+269
| | | | | | | | | | | | | | | | Rewrite some functions using type casting to get rid of embedded C code in nfs, scsi, signal, socket, rpc, task and vfs tapset. Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* | added more content for tapset devddomingo2009-03-061-2/+86
| |
* | added markers, for publicanization purposesddomingo2009-03-051-4/+5
| |
* | new intro, tapset dev guideddomingo2009-03-052-0/+92
| |
* | removes marked range of strings (intro) and replaces with Intro and Tapset ↵ddomingo2009-03-051-4/+21
| | | | | | | | Dev Guide
* | added invisible marker for publicanddomingo2009-03-051-8/+10
|/
* change to fedora, add README for more infoddomingo2009-03-052-1/+36
|
* change to fedoraddomingo2009-03-051-4/+8
|
* add other required XMLsddomingo2009-03-054-0/+82
|
* add imagesddomingo2009-03-051-0/+3936
|