summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
* | | PR10642: fix wildcard-driven quadratic explosion of .return $$parms probesFrank Ch. Eigler2009-09-151-44/+47
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | PR10602: improved fix for REG_IP lvalueFrank Ch. Eigler2009-09-091-42/+12
|/ | | | | | | | | * 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.
* PR10524: reduce massive-uprobe script modules' .data consumptionFrank Ch. Eigler2009-09-081-77/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* PR4186 cont'd: Squash both EM_PPC and EM_PPC64 to powerpc.Mark Wielaard2009-09-081-4/+1
| | | | | * tapsets.cxx (validate_module_elf): Set expect_machine = "powerpc" for both EM_PPC and EM_PPC64 to match session architecture set in main.
* Merge branch 'master' of sourceware.org:/git/systemtapJosh Stone2009-09-031-9/+8
|\
| * Allow process begin/end probes for unprivileged users.Dave Brolley2009-09-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * PR10589 followup. More tapsets.cxx _stp_warn formatting fixlets.Mark Wielaard2009-09-031-4/+4
| | | | | | | | | | | | | | | | 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.
| * PR10589 followup. tapsets.cxx _stp_warn formatting fixlets.Mark Wielaard2009-09-031-2/+2
| | | | | | | | | | | | * tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Cast _stp_warn arguments. (kprobe_derived_probe_group::emit_module_init): Likewise.
* | Fetch the blacklist section only when neededJosh Stone2009-09-031-4/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | PR10573: Squash duplicate inline instancesJosh Stone2009-09-031-1/+26
| | | | | | | | | | | | | | | | | | | | | | 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.
* | PR10572: Allow duplicate function names in a CUJosh Stone2009-09-021-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Unify lex_cast* and avoid string copiesJosh Stone2009-09-021-11/+11
|/ | | | | | | | | | | | | | | 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.
* Reorganize iterate_over_labelsJosh Stone2009-08-261-15/+32
| | | | | | | | | | | | | | | I noticed that iterate_over_labels was using a static variable as a recursion variable, which isn't a safe thing to do since it will only be initialized once. While fixing that, I also reorganized the function quite a bit. * dwflpp.cxx (dwflpp::iterate_over_labels): Take the current function as a parameter instead of using a static local. Rewrite some of the code as well to try to make it more obvious. * tapsets.cxx (add_label_name): Remove in favor of query_label. (query_label): New, to check decl_file and fix probe listing. (query_srcfile_label, query_cu): Adjust to iterate_over_labels change and start using query_label as the callback.
* PR4186 cont'd: Squash EM_S390 to s390.Mark Wielaard2009-08-261-1/+1
| | | | * tapsets.cxx (validate_module_elf): Set expect_machine to "s390".
* Compute cu_name dynamicallyJosh Stone2009-08-251-2/+2
| | | | | | | | | | | | We only need cu_name for errors and verbose messages, so it's a waste to always construct it in focus_on_cu. It's now built only as-needed. * dwflpp.cxx (dwflpp::cu_name): Now a method instead of a data member. (dwflpp::focus_on_module): No cu_name to clear now. (dwflpp::focus_on_cu): No cu_name to set now. (dwflpp::declaration_resolve): Adjust to call cu_name() now. (dwflpp::iterate_over_functions): Ditto. * tapsets.cxx (query_cu): Ditto.
* PR4186 cont'd: option #2: standardize on kernel ARCH/SUBARCH throughoutFrank Ch. Eigler2009-08-251-1/+2
| | | | | | | | * main.cxx (main): Perform equivalent sed by hand on uname()->machine. * stap.1.in: Clarify -a ARCH slightly. * tapsets.cxx (validate_module_elf): Accept "arm*"for EM_ARM. * tapset/**, testsuite/**: Removed/collapsed "i386"/"i686" branches, renamed "ppc64"->"powerpc" and "s390x"->"s390".
* PR2475: Filter filenames against the decl_fileJosh Stone2009-08-241-5/+12
| | | | | | | | | | | | We used to only check that a CU contains at least one srcfile matching the user's file spec. This patch ensures that the selected function was actually defined in one of the matching srcfiles. * tapsets.cxx (struct dwarf_query): Make filtered_srcfiles carry strings, so we can easily lookup matches later. (query_dwarf_func): Check that the decl_file is in filtered_srcfiles. (query_cu): Adjust to using set<string>. * dwflpp.cxx (dwflpp::collect_srcfiles_matching): Take a set<string>.
* Fix failing uprobes.exp -p5 failures by removing trailing spaces in $$ vars.Mark Wielaard2009-08-241-5/+9
| | | | | | | | * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_context): Don't add extra space at end of list, only add space between symbols. * testsuite/systemtap.base/uprobes.exp: Use more specific expect regex. * testsuite/systemtap.base/vars.exp: Don't just chop off last char of printf output string.
* PR10507: tweak MAXUPROBES calculation to shrink table for small static ↵Frank Ch. Eigler2009-08-211-3/+7
| | | | | | | | number of probes * tapsets.cxx (uprobe_derived_probe_group::emit_module_decls): Use geometric mean rather than arithmetic mean. Add a comment to explain relative harmlessness of exceeding the "minimum" or "maximum" values.
* PR10544: clean up stap child process error handlingFrank Ch. Eigler2009-08-211-1/+1
| | | | | | | * util.cxx (stap_system): Take extra verbosity value. Standardize error handling / tracing. * util.h: Corresponding changes. * buildrun.cxx, main.cxx, modsign.cxx: Update callers.
* cleanup: rename task_finder_target->pathname -> procnameFrank Ch. Eigler2009-08-211-3/+3
| | | | | | | | | | The previous name made it easy to misread the purpose of this field. It is only for matching executable names, not for shared libraries. * runtime/task_finder.c (task_finder_target): Rename field. (*): Adjust. * tapset-itrace.cxx, tapset-utrace.cxx, tapsets.cxx, translate.cxx: Ditto.
* Create a dwarf_attr_die idiomJosh Stone2009-08-191-18/+7
| | | | | | | | | | | | | | | We commonly do a dwarf_attr_integrate followed by dwarf_formref_die, with no care for the Dwarf_Attribute, so I captured that idiom in an inline function. * dwarf_wrappers.h (dwarf_attr_die): New. * dwarf_wrappers.cxx (dwarf_type_name): Call dwarf_attr_die. * dwflpp.cxx (dwflpp::print_members): Ditto. (dwflpp::find_struct_member): Ditto. * tapsets.cxx (dwarf_derived_probe::saveargs): Ditto. (uprobe_derived_probe::saveargs): Ditto. (resolve_tracepoint_arg_type): Ditto. (tracepoint_derived_probe::build_args): Ditto.
* Use dwarf_type_name in more placesJosh Stone2009-08-191-74/+5
| | | | | | | | | | | | | | * dwarf_wrappers.cxx (dwarf_type_name): Moved here from tapsets.cxx, and added a variant that returns a string for easier ostreaming. * dwflpp.cxx (dwflpp::print_members): Use dwarf_type_name for errors. (dwflpp::find_struct_member): Ditto. (dwflpp::translate_components): Ditto. (dwflpp::translate_final_fetch_or_store): Ditto. (dwflpp::literal_stmt_for_pointer): Ditto. * tapsets.cxx (dwarf_derived_probe::saveargs): Pass die to dwarf_type_name by pointer instead of reference. (uprobe_derived_probe::saveargs): Ditto. (resolve_tracepoint_arg_type): Ditto.
* PR10538: Use {...} for naming anonymous typesJosh Stone2009-08-191-1/+3
| | | | * tapsets.cxx (dwarf_type_name): Handle NULL dwarf_diename.
* PR10518: context shrinkage with function recursion analysis feeding MAXNESTINGFrank Ch. Eigler2009-08-181-1/+1
| | | | | | | | * translate.cxx (emit_common_header, translate_pass): Use new recursion_info visitor to calculate appropriate MAXNESTING value for scripts with or without recursion. * tapsets.cxx (common_probe_entryfn_prologue): Initialize c->nesting = -1. * stap.1.in: Clarify MAXNESTING value.
* Adapt tracepoints to the new probe_locals unionJosh Stone2009-08-181-1/+1
| | | | | | | * tapsets.cxx (tracepoint_derived_probe_group::emit_module_decls): Use probe_locals to set the tracepoint arguments for the probe. * testsuite/systemtap.base/tracepoints.exp: Include the arguments in the pass-4 tracepoint test.
* Cache failed tracepoint headers tooJosh Stone2009-08-141-2/+8
| | | | | | | | | | Rather than re-attempting a tracepoint header that fails to compile, we now save an empty file into the cache to indicate "nothing to see here." See also PR10424. * tapsets.cxx (tracepoint_builder::get_tracequery_module): Use /dev/null as the empty result file if make_tracequery fails. (tracepoint_builder::init_dw): Ignore empty tracequery modules.
* PR10228: use task_finder_vma for -d /user/object files.Frank Ch. Eigler2009-08-141-24/+0
| | | | | | | | | | | | * main.cxx (main): For "-d /path" arguments, enable task finder. * runtime/sym.h (_stp_module): Add *vmcb member. * task_finder{.cxx,.h} (emit_vma_callback_probe_decl): Zap. * tapset-itrace.cxx, tapset-utrace.cxx: Use unwindsyms_modules instead. * tapsets.cxx (uprobe::emit_module_decls): Ditto. * translate.cxx (emit_module_init): Emit task finder registrations for vmcb's associated with _stp_modules. (dump_unwindsyms): Associate vmcbs with user-space unwindsyms entries.
* PR10507: tweak heuristics for stap_uprobes[] allocationFrank Ch. Eigler2009-08-121-5/+12
| | | | | | * tapsets.cxx (uprobes::emit_module_decls): Compute MAXUPROBES with x-treme kl3v3rn3ss. * stap.1.in: Clarify MAXUPROBES.
* PR10461: Probe identical functions only onceJosh Stone2009-08-111-0/+14
| | | | | | | | | | | | | | | In C++ especially, a function definition in a header may be compiled into multiple CUs, but the linker will merge those into a single output function. We don't want to place multiple probes on the same function. The dupe-detection from the alias code (commit 1c6b77e5) already tracks identical functions within a CU, so I've just lifted this to instead track function entrypcs at the module level. * dwflpp.cxx (dwflpp::iterate_over_functions): Remove dupe checks. * tapsets.cxx (dwarf_query): Add alias_dupes set to the query. (dwarf_query::handle_query_module): Reset the dupes for each module. (query_dwarf_func): Check that we only probe each entrypc once.
* Zap dwarf_diename_integrateJosh Stone2009-08-071-2/+2
| | | | | | The dwarf_diename in elfutils learned a long time ago to use dwarf_attr_integrate when looking up the name. Our minimum elfutils 0.126 has this, so we don't need to kludge it ourselves.
* Fix a couple of sdt_query reorg problems.Stan Cox2009-08-061-2/+3
| | | | | | | * tapsets.cxx (sdt_query::handle_query_module): For uprobe probes: 1) find all same named probes to handle multiple probes per module 2) use new_base for uprobe probes to handle $$name * sdt_misc.exp: Test $$name
* PR10294: support wider range for statement probeWenji Huang2009-08-051-2/+2
| | | | | | | | | * dwflpp.cxx (iterate_over_srcfile_lines): Add pattern parameter. * dwflpp.h (iterate_over_srcfile_lines): Ditto. * testsuite/systemtap.base/bz10294.c: Test case. * testsuite/systemtap.base/bz10294.stp: Ditto. * testsuite/systemtap.base/bz6905.exp: Deleted. * testsuite/systemtap.base/statement.exp: Merge bz10294 with bz6905.
* PR10491 Don't assign to REG_IP if it isn't an lvalue (s390 and ia64).Mark Wielaard2009-08-061-0/+30
| | | | | | | | | | | | | | | To fixup REG_IP to show the correct value after a [ku]probe trap we assigned the address of the actual instruction pointer of the probed instruction. That doesn't work on architectures, s390 and ia64, where REG_IP is not a simple lvalue. Just don't try to fixup the address in those cases. If this isn't enough, the uprobe_stmt_num.exp testcase will point this out. * runtime/regs.h: Define REG_IP_LVALUE for x86_64, i386, powerpc64 and arm. * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Only fixup REG_IP when REG_IP_LVALUE is defined. (uprobe_derived_probe_group::emit_module_decls): Likewise. (kprobe_derived_probe_group::emit_module_decls): Likewise.
* Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-08-041-419/+678
|\ | | | | | | | | | | Conflicts: cache.cxx
| * Add update_visitor::replaceJosh Stone2009-08-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that most uses of update_visitor::require() were simply writing the value back to the same place, i.e. foo = require(foo). The new replace() method just encapsulates that paradigm, so we don't have the duplication between the LHS and RHS. * staptree.h (update_visitor::replace): New. * elaborate.cxx, staptree.cxx, tapset-mark.cxx, tapset-perfmon.cxx, tapset-procfs.cxx, tapset-utrace.cxx, tapsets.cxx: Update all require calls that are simply updating the value in-place.
| * PR2049: support arbitrary $target-array indexingJosh Stone2009-08-031-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than just numeric literals, we can now support arbitrary expressions for the index value. Note that loc2c won't allow this for noncontiguous arrays, as the access methods need to be statically computed, but for contiguous arrays and pointers-as-arrays it works just fine. * staptree.h (target_symbol::component): Add expression_array_index. * staptree.cxx (target_symbol::visit_components): New helper. (target_symbol::assert_no_components): Recognize new array type. (target_symbol::component::print): Print subexpressions. (traversing_visitor::visit_target_symbol, visit_cast_op): Visit the indexing components too. (varuse_collecting_visitor::visit_target_symbol): Ditto. (update_visitor::visit_target_symbol, visit_cast_op): Ditto. * elaborate.cxx (void_statement_reducer::visit_target_symbol): New. (void_statement_reducer::visit_cast_op): Save indexes too. * parse.cxx (parser::parse_target_symbol_components): Parse expressions. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Pass expression-indexes as parameters (indexN) to the dwarf function. (dwarf_cast_expanding_visitor::visit_cast_op): Ditto. (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto. (sdt_var_expanding_visitor::visit_target_symbol): Visit the new @cast. * dwflpp.cxx (dwflpp::translate_components): Use THIS->indexN. * translate.cxx (c_unparser::visit_target_symbol): Correct error msg. * testsuite/systemtap.base/pointer_array.stp: Use a simple index.
| * Unify no-component assertions on target variablesJosh Stone2009-07-311-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several tapsets that can't deal with component dereferences on their target variables, and they all check-and-throw in the same way. This refactors the checks into a target_symbol member. * staptree.cxx (target_symbol::assert_no_components): New. * tapsets.cxx (tracepoint_var_expanding_visitor::visit_target_symbol_arg, tracepoint_var_expanding_visitor::visit_target_symbol_context): Use the new assertion function to check for no components. * tapset-mark.cxx (mark_var_expanding_visitor::visit_target_symbol_arg, mark_var_expanding_visitor::visit_target_symbol_context): Ditto. * tapset-perfmon.cxx (perfmon_var_expanding_visitor::visit_target_symbol): Ditto. * tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol): Ditto. * tapset-utrace.cxx (utrace_var_expanding_visitor::visit_target_symbol_arg, utrace_var_expanding_visitor::visit_target_symbol_context): Ditto.
| * Make a real type for target_symbol->componentsJosh Stone2009-07-311-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the dereferences on target_symbol and cast_op are tracked with a struct instead of just a generic pair. The first immediate benefit is that we can track the token for more exact error reporting. * staptree.h (target_symbol): Add a new component type. * staptree.cxx (target_symbol::component::print): New. (operator<<(ostream&, target_symbol::component&): New. (target_symbol::print): Adapt component printing. (cast_op::print): Ditto. * parse.cxx (parser::parse_target_symbol_components): Adapt to the new component construction. * dwflpp.cxx (dwflpp::find_struct_member): take the component as a parameter for a better token in error messages (dwflpp::translate_components): Adapt to the new component type. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Don't overwrite the token in target_symbol saved errors. (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.
| * PR10458. User actual breakpoint address for [ku]probe[ret].Mark Wielaard2009-07-311-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup the pt_regs REG_IP to the actual breakpoint address before entering a probe handler for [ku]probe[ret] (and restore it after returning). This helps getting symbol resolution and backtraces more correct and makes it more conform with other probe handlers like the iutrace and profile timers that also provide pt_regs (which untill now exhibited off-by-one errors while unwinding). * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Setup REG_IP correctly before calling enter_kprobe_probe and enter_kretprobe_probe, and restore afterwards. (uprobe_derived_probe_group::emit_module_decls): Likewise for enter_uprobe_probe and enter_uretprobe_probe. (kprobe_derived_probe_group::emit_module_decls): Likewise for enter_kprobe2_probe and enter_kretprobe2_probe. * runtime/unwind/i386.h (arch_unw_init_frame_info): Initialize info->call_frame to zero. * runtime/unwind/x86_64.h (arch_unw_init_frame_info): Likewise.
| * PR10459. Disable all warning messages on -w.Mark Wielaard2009-07-301-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | * stap.1.in: Document that -w disables all warning messages. * dwflpp.cxx (get_module_dwarf): Only output warning when session suppress_warnings is not set. * translate.cxx (dump_unwindsyms): Likewise. (emit_symbol_data_done): Likewise. * tapsets.cxx (query_module_symtab): Likewise. (read_from_elf_file): Take systemtap_session, check suppress_warnings before emitting warning. (read_from_text_file): Likewise. (get_symtab): Call read_from_elf_file and read_from_text_file with session.
| * Enable variable listing (-L) for uprobesJosh Stone2009-07-291-0/+69
| | | | | | | | | | | | | | | | | | All $target variables and their C-types are now printed in -L mode. * tapsets.cxx (uprobe_derived_probe::uprobe_derived_probe): Save the local arguments while we still have the dwflpp open. (uprobe_derived_probe::saveargs): New (uprobe_derived_probe::printargs): New
| * Enable variable listing (-L) for dwarf probesJosh Stone2009-07-291-0/+69
| | | | | | | | | | | | | | | | | | All $target variables and their C-types are now printed in -L mode. * tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Save the local arguments while we still have the dwflpp open. (dwarf_derived_probe::saveargs): New (dwarf_derived_probe::printargs): New
| * Break up dwarf_var_expanding_visitor::visit_target_symbolJosh Stone2009-07-291-361/+379
| | | | | | | | | | | | | | | | | | This just refactors large chunks of visit_target_symbol into a couple of smaller functions. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_context): New (dwarf_var_expanding_visitor::visit_target_symbol_saved_return): New (dwarf_var_expanding_visitor::visit_target_symbol): Call the new ones
| * Mention where we looked and if we didn't find line info on statement probe.Mark Wielaard2009-07-271-0/+3
| | | | | | | | | | * tapsets.cxx (query_cu): When statement check fails and no line info available, mention the CU had no line info.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-231-401/+460
|\|
| * Use the query paradigm for resolving sdt probesJosh Stone2009-07-211-375/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bad assumption in the probe_table initialization that the dwflpp->module would be immediately valid. We should not assume that dwflpp only has one module, or that any module is necessarily in focus. Instead, I've created an sdt_query class which will call an iterate_over_modules like the other dwarf probe types. For now this means just a single module, but it will also open the door to iterating over all linked libraries too, for example. * dwflpp.cxx (dwflpp::setup_user): don't "save mod!" anymore * tapsets.cxx (probe_table -> sdt_query): convert to a query-style class, and also take over the task of iterating over the probes. (dwarf_builder::build): leave the iteration to sdt_query
| * Remove unused 'sess' from dwarf_query ctorJosh Stone2009-07-211-6/+4
| |
| * PR10424: Consider each tracepoint header separatelyJosh Stone2009-07-201-12/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current monolithic tracepoint query module, a failure in any of the discovered tracepoint headers means that you can't use any of the others either. This patch creates a separate query module for each header so they can pass or fail independently. * buildrun.cxx (make_tracequery): take a single header name instead of globbing for everything we can find. * hash.cxx (find_tracequery_hash): name the header file we're hashing. * tapsets.cxx (tracepoint_query::handle_query_func): make sure we don't duplicate tracepoints found through different headers. (tracepoint_builder::get_tracequery_module): get a header's module (tracepoint_builder::init_dw): glob for all tracepoint headers, and feed all their modules into dwflpp.
| * Return hash module values directly as stringsJosh Stone2009-07-201-9/+10
| | | | | | | | | | | | | | | | * session.h (systemtap_session): remove tracequery_path * hash.cxx (find_tracequery_hash, find_typequery_hash): return strings * tapsets.cxx (dwarf_cast_expanding_visitor::filter_special_modules): get the hashed path from the return value instead of a parameter (tracepoint_builder::init_dw): ditto, and don't stuff it in session