summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Fix and add tests for function(".so").statement(N)Stan Cox2009-03-081-3/+3
| | | | | | | | * 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).
* 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.
* Tweak tracepoint logic to run on tracepoint_synchronize_unregister()-less RHEL5Frank Ch. Eigler2009-03-071-4/+13
|
* 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.
* 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-061-0/+82
| | | | | | | | | | * 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
* Search for a label instead of an address for .so static probes.Stan Cox2009-03-031-1/+4
| | | | * tapsets.cxx (dwflpp::build): Use .label for .so instead of .statement(N)
* This patch updates the itrace code to support the new utrace interface.Maynard Johnson2009-03-031-0/+1
| | | | | It also adds a private copy of access_process_vm to runtime/itrace.c since that function is not consistently exported by all distros.
* Merge branch 'master' of git+ssh://sources.redhat.com/git/systemtapEugeniy Meshcheryakov2009-02-281-2/+2
|\
| * PR9896: Fix SystemTap build on Ubuntu Intrepid.Ananth N Mavinakayanahalli2009-02-251-2/+2
| | | | | | | | The gcc on Ubuntu doesn't like fprintf() without format arguments
* | Merge branch 'master' of git+ssh://sources.redhat.com/git/systemtapEugeniy Meshcheryakov2009-02-241-14/+20
|\|
| * Improve static probe: c++ navigation, -l output.Stan Cox2009-02-231-13/+16
| | | | | | | | | | | | | | * tapsets.cxx (dwflpp::build): Improve c+ method navigation. Use .label for listing mode. * systemtap.base/static_uprobes.exp: Test multiple invocations of the same probe per block. (SW9770)
| * Check whether a die has any children before iterating over it.Mark Wielaard2009-02-231-1/+4
| | | | | | | | * tapsets.cxx (iterate_over_cu_labels): Check dwarf_child result.
* | Don't include unused libebl.hEugeniy Meshcheryakov2009-02-231-1/+0
|/
* Always emit .probes section; use .label method as a backup strategyStan Cox2009-02-181-2/+7
|
* Enable typecasting with @castJosh Stone2009-02-181-35/+341
|\ | | | | | | | | | | | | println(@cast(myptr, "task_struct")->pid) println(@cast(myptr, "task_struct", "kernel")->pid) Merge branch 'typecast', bump ChangeLog entries to push date
| * Enable dwarf expansion of @castsJosh Stone2009-02-181-35/+329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will iterate over the module and its CUs looking for the type definition, and then work with loc2c to dereference the pointer. * loc2c.c (c_translate_argument): Create a dummy location to start the address computation from a function parameter. * translate.cxx (base_query, dwarf_query): Move some members from base_query to dwarf_query, so the former can be more generic. Also add a constructor using a module string instead of probe parameters. (dwflpp::query_modules, dwflpp::iterate_over_modules): Use a generic base_query instead of a dwarf_query. (dwarf_cast_query): New query to scan the modules and CUs for a matching type definition, and then produce a code fragment to deref each component. (dwarf_cast_expanding_visitor): Tries to replace @casts with a function call to the result of a dwarf_cast_query. (dwflpp::declaration_resolve): Search by name instead of by die. (dwflpp::translate_components): Use the incoming vardie as the first type die, so we don't assume that attr_mem has a DW_AT_type already. (dwflpp::literal_stmt_for_pointer): Construct a C fragment that starts with a pointer argument (THIS->pointer) and dereferences each member component from there. (*_derived_probe::register_patterns): Take a session parameter instead of a match_node, so we can manipulate session-wide data. (dwarf_derived_probe::register_patterns): Add a session code filter to expand @casts with a dwarf_cast_expanding_visitor.
| * Provide dwarf module names as defaults in @cast()sJosh Stone2009-02-181-0/+12
| | | | | | | | | | | | * tapsets.cxx (dwarf_var_expanding_visitor::visit_cast_op): While expanding dwarf probes, provide the current module as a default to @casts without a module name.
* | Handle c++ static user probes via .probe, c via .label.Stan Cox2009-02-151-92/+57
| |
* | Moved inclusion of runtime/procfs.c to a better place.David Smith2009-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2009-02-12 David Smith <dsmith@redhat.com> * tapsets.cxx (procfs_derived_probe_group::emit_module_decls): Moved inclusion of procfs.c here from runtime/transport.c 2009-02-12 David Smith <dsmith@redhat.com> * transport.c: Moved inclusion of procfs.c to procfs_derived_probe_group::emit_module_decls() in tapsets.cxx.
* | Extend blacklist to cover bitops.h. While there, fixup paths for existing ↵Ananth N Mavinakayanahalli2009-02-121-0/+5
|/ | | | blacklisted files
* Merge branch 'update_visitor'Josh Stone2009-02-101-70/+68
|\ | | | | | | | | | | | | | | | | | | | | | | This brings a new update_visitor that makes it easier to traverse the parse tree and modify parts of it as necessary. I wrote this as part of my in-progress work to allow @cast() expansion, but I was able to apply it to the dwarf/etc. target variable expanders and to the optimization stages. I think the resulting code is more predictable and easier to follow... Conflicts: ChangeLog (bumped my commit dates to push dates...)
| * Expand probe variables without a deep copyJosh Stone2009-02-101-50/+46
| | | | | | | | | | | | | | * tapsets.cxx (var_expanding_copy_visitor): This struct becomes var_expanding_visitor and inherits from update_visitor instead of deep_copy_visitor. Each of the probe-type variants of this are also no longer copiers.
| * Simplify require() and provide()Josh Stone2009-02-101-25/+27
| | | | | | | | | | | | | | * staptree.h (require, provide): Simplify stack operations with less pointer magic, and move to be deep_copy_visitor members. * staptree.h (deep_copy_visitor::deep_copy): Templatize * staptree.cxx, tapsets.cxx: Refactor require/provide callers
* | fix segv that sometimes occurs on buildok/nfs-all-probes.stp on 2.6.29ish ↵Frank Ch. Eigler2009-02-101-1/+1
|/ | | | kernels
* PR9810: Mostly revert "PR6961: initial sketch: set up dummy pt_regs for ↵Frank Ch. Eigler2009-02-031-26/+11
| | | | non-trap based probes"
* Add .label("label")Stan Cox2009-02-011-0/+67
|
* Add Vim modelines for GNU style in stapJosh Stone2009-01-281-0/+2
|
* Use 'static' as much as possibleJosh Stone2009-01-281-17/+17
| | | | | | | | | | This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results.
* Fix syscall.exp.Stan Cox2009-01-261-5/+8
|
* PR9768 fixFrank Ch. Eigler2009-01-231-11/+17
|
* Add dtrace -h supportStan Cox2009-01-221-6/+17
|
* improve var=? explanation debugging via -vvvFrank Ch. Eigler2009-01-201-3/+12
|
* Fix compilation warning of too large number on 32-bits machines.Wenji Huang2009-01-111-2/+2
|
* Put a block around the probe point.Stan Cox2008-12-211-5/+4
|
* Convert .mark to .statement(0x) instead of .statement(foo.c:N)Stan Cox2008-12-161-27/+19
|
* PR6961: initial sketch: set up dummy pt_regs for non-trap based probesFrank Ch. Eigler2008-12-091-11/+26
|
* RHBZ 474390 fix.David Smith2008-12-081-17/+31
| | | | | | | | | | | | 2008-12-08 David Smith <dsmith@redhat.com> RHBZ 474390 * tapsets.cxx (dwflpp::cu_function_caching_callback): Handles NULL return from dwarf_diename(). (dwflpp::print_locals): Ditto. (dwflpp::find_variable_and_frame_base): Ditto. (dwflpp::literal_stmt_for_return): Ditto. (dwarf_builder::build): Ditto.
* turn on elfutils-level debuginfo<->stripped-binary checksum matchingFrank Ch. Eigler2008-12-051-2/+2
| | | | | | This is necessary to detect mismatching debuginfo for user-space programs without build-id. We don't have run-time version assertions for user-space binaries.
* PR5892: rename new -B /PATH to -r /PATH; merge functionalityFrank Ch. Eigler2008-12-031-31/+32
|
* BZ 5892: Add stap -B to sic systemtap at an alternate kernel build treeRajan Arora2008-12-011-4/+12
|
* shared library probing: bump up MULTIPLE_UPROBES to 256Frank Ch. Eigler2008-11-291-1/+2
|
* Support debuginfo static uprobes.Stan Cox2008-11-261-92/+135
|
* PR7046: uprobes mutex optimizationFrank Ch. Eigler2008-11-251-49/+55
|
* struct stap_dwarf_probe field is called pp, not pp_name.Mark Wielaard2008-11-251-3/+3
|