summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
| * * tapsets.cxx (probe_table): Make mark_name and sess refs.Stan Cox2009-06-081-115/+115
| | | | | | | | | | | | | | (probe_table::get_next_probe): Dissect using struct probe_table. (sdt_var_expanding_visitor): Use lex_cast. (dwarf_builder::build): Copy probe and location for TOK_MARK cases. Call derive_probes for kprobe and utrace cases.
| * Let query_module abort early for simple matchesJosh Stone2009-06-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | query_module was already returning DW_CB_ABORT when a simple match was found, but dwflpp::iterate_over_modules was ignoring that and instead forcing the module loop to restart. The only way out of the loop was with the pending_interrupts flag, which is only for signalled interrupts. Now iterate_over_modules will only attempt the dwfl_getmodules loop once, since that loop will only abort if the CB returns DW_CB_ABORT. Then query_module is also modified to return ABORT if pending_interrupts is flagged. My trusty test, stap -l syscall.*, is nearly 2x faster with this change. Empirically, I found that the kernel object is always the first "module" returned, so the syscall probepoints always gets to short-circuit the loop right away.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-06-041-149/+422
|\|
| * Fix uninitialized shdr in probe_tableJosh Stone2009-06-031-15/+22
| | | | | | | | | | | | | | * tapsets.cxx (dwarf_builder::probe_table::probe_table): gcc 4.4 complains that shdr may be used uninitialized. I added returns to ensure that it's ok, but gcc still complains. Set the thing to NULL as well to silence the beast.
| * * tapsets.cxx (dwarf_builder::probe_table): New. Derived fromStan Cox2009-06-031-145/+411
| | | | | | | | | | | | dwarf_builder::build to handle the .probes section (sdt_var_expanding_visitor): New. Expand static probe $argN. (dwarf_builder::build): Use probe_table. Add kprobe and utrace probe types.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-06-021-320/+4
|\|
| * Move the blacklist functions into dwflppJosh Stone2009-06-011-320/+4
| | | | | | | | | | | | | | For a call like "stap -l 'syscall.*'", I found that ~10% of the time was spent compiling the blacklist regexps over again for each probe point. By moving this functionality into the kernel dwflpp instance, we can reuse the regexps and get an easy speed boost.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-251-11/+20
|\|
| * Fix another kernel/kprobe.function conflictJosh Stone2009-05-221-7/+7
| | | | | | | | | | | | | | | | | | | | Both kernel.function and kprobe.function were defining a global array stap_unreg_kprobes to use in bulk kprobes unregistration. The compiler allowed the duplicate definition as long as they were the same size, as it was when exercised in buildok/thirtyone. kprobe.function now uses a separate stap_unreg_kprobes2, and the testcase is modified to produce an imbalanced number of probes.
| * PR10190: Suppress warnings for optional kprobesJosh Stone2009-05-221-4/+13
| | | | | | | | | | | | When a kernel.function or kprobe.function fails in registration, we usually print a WARNING and move on. With this patch, kprobes that have the optional '?' flag will not print any WARNING.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-191-2316/+105
|\|
| * Make all tapsets' TOK_FOO constantJosh Stone2009-05-151-14/+14
| |
| * Merge branch 'tapsets-cleanup'Josh Stone2009-05-151-2300/+73
| |\
| | * Break the dwflpp dependence on query_cuJosh Stone2009-05-151-2/+6
| | |
| | * Break the dwflpp dependence on query_moduleJosh Stone2009-05-151-5/+5
| | |
| | * Merge the dwflpp::query_cu_..._address methodsJosh Stone2009-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The method query_cu_containing_global_address was only called by query_cu_containing_module_address, and the latter was just doing a simple argument transform. They are now merged into a single method, query_cu_containing_address. The function module_address_to_global is also merged here at its only call site.
| | * Move dfwlpp into its own fileJosh Stone2009-05-121-2236/+31
| | | | | | | | | | | | | | | It's not a terribly clean split, but moving it helps reveals some of the knots that need to be untangled.
| | * Consolidate dwflpp setupJosh Stone2009-05-111-67/+41
| | |
| * | [tracepoints] ternary is nicer for arg formatJosh Stone2009-05-141-5/+1
| | |
| * | [tracepoints] Print pointer arguments with %pJosh Stone2009-05-141-1/+5
| | | | | | | | | | | | | | | | | | We know the full type of every tracepoint argument, so for those that are pointers, print $$vars/$$parms using "%p". The integer-type arguments continue to use the generic "%#x".
| * | PR10139 Mark .probes section SHF_ALLOC.Mark Wielaard2009-05-141-1/+17
| |/ | | | | | | | | | | * includes/sys/sdt.h (STAP_PROBE_DATA_): Mark .probes section SHF_ALLOC. * tapsets.cxx (dwarf_builder::build): Search in either dwarf or main elf file for .probes section.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-111-4117/+208
|\| | | | | | | | | | | Conflicts: tapsets.cxx
| * Get .probes section through dwarf debuginfo file if necessary.Mark Wielaard2009-05-101-1/+39
| | | | | | | | | | | | * tapsets.cxx (dwarf_builder::build): Add some comments, verbose log messages and get Elf through dwarf_getelf if it exists before searching for .probes section.
| * Allow @cast failures to get optimized awayJosh Stone2009-05-081-17/+13
| | | | | | | | | | | | We have the saved_conversion_error field, but I wasn't using it. Now @cast errors are saved in that field, so they're only seen if the optimizer doesn't remove the @cast.
| * PR10054: Unify the translate_components errorsJosh Stone2009-05-081-39/+12
| | | | | | | | | | | | | | Since translate_components is the one that knows the details of its failures, it makes more sense to let it throw its own errors, instead of relying on each caller to do it. The function now always either returns successfully or throws an error.
| * Refactor anonymous lookups in translate_componentsJosh Stone2009-05-081-113/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code recursed the entirety of translate_components, and it seemed to be restarting the components list every time, so it would only work if the anonymous portion was the first component. Even then, examining the code output by semok/thirtythree revealed that it wasn't fully translating the locations when multiple anonymous pieces were involved. Instead, it now recurses in a separate function, find_struct_member, which does just enough to find the member die and return. It also builds a vector of the locations passed through, so translate_components can output code for the full chain of anonymity. The generated code for semok/thirtythree's $page->mapping now appears to match the offsets from my manual inspection of struct page. I also added a test for $page->first_page->mapping, which works now but would segfault the old code.
| * Separate the utrace tapsetJosh Stone2009-05-071-1048/+1
| |
| * Separate task_finder and the itrace tapsetJosh Stone2009-05-071-385/+4
| |
| * Separate the kernel.mark tapsetJosh Stone2009-05-071-708/+1
| |
| * Separate the permon tapsetJosh Stone2009-05-071-436/+1
| |
| * Group all kprobe_derived_FOO togetherJosh Stone2009-05-071-57/+35
| |
| * Separate the procfs tapsetJosh Stone2009-05-061-499/+1
| |
| * Separate the begin/end/error/never tapsetsJosh Stone2009-05-061-202/+3
| |
| * Separate built-in timer tapsetsJosh Stone2009-05-061-615/+8
| | | | | | | | | | | | All of the timer.* tapsets are now built and handled in their own tapset-timers.cxx, as the first step of many to pare down the current monolithic tapsets.cxx.
* | Restrict unprivileged users to begin,end,error and never probes (for now).Dave Brolley2009-05-071-44/+20
| |
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-051-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: modsign.cxx runtime/staprun/modverify.c runtime/staprun/staprun_funcs.c stap-authorize-server-cert stap-authorize-signing-cert stap-serverd systemtap.spec
| * Don't recurse into DW_AT_declaration subprograms in iterate_over_labels.Mark Wielaard2009-05-031-1/+4
| | | | | | | | | | | | | | | | | | Newer gcc (4.4) places more DW_TAG_subprograms with DW_AT_declaration at call sites. iterate_over_labels should only be concerned about complete declarations. * tapsets.cxx (dwflpp::iterate_over_labels): Skip DW_TAG_subprogram that has attribute DW_AT_declaration.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-301-12/+21
|\|
| * Handle more types of types in declaration_resolveJosh Stone2009-04-271-12/+14
| | | | | | | | | | | | | | Instead of just structs and unions, we now also process typedefs, enums, and base types in iterate_over_globals, so declaration_resolve can find more variations. This especially useful to let @casts reference typedef names.
| * Warn if trying to dereference an enumJosh Stone2009-04-271-0/+7
| | | | | | | | | | In translate_components, give a cleaner warning about trying to dereference an enum type, rather than "unexpected type tag".
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-271-76/+99
|\| | | | | | | | | | | | | Conflicts: configure testsuite/configure
| * Handle kprobe struct field symbol_name as either char * or const char *.Mark Wielaard2009-04-261-2/+2
| | | | | | | | | | | | | | | | Older (2.6.18) based kernels defined struct kprobes symbol_name as char *, but newer (2.6.27) based kernels defined the same field as const char *. * tapsets.cxx (kprobe_derived_probe_group::emit_module_init): Always cast to char * when assigning to kprobes.symbol_name field.
| * fix kprobe.* probes so they don't break -p4 if script also has kernel.* probesFrank Ch. Eigler2009-04-261-6/+6
| | | | | | | | | | * tapsets.cxx (kprobe_derived_probe): Use enter_k[ret]probe>>2<<_probe. * testsuite/buildok/thirtyone.stp: Test this.
| * Enable kprobe.function.return.maxactiveJosh Stone2009-04-241-35/+57
| | | | | | | | | | The code to emit maxactive was almost there; it just needed to enable the maxactive probe component and pass the value down.
| * Simplify dwarfless kprobe stmt vs. name logicJosh Stone2009-04-241-29/+15
| |
| * Fill out the pp() for dwarfless kprobesJosh Stone2009-04-241-3/+25
| |
| * Don't terminate when a dwarfless kprobe failsJosh Stone2009-04-241-8/+1
| | | | | | | | | | | | | | | | | | | | All of our other kprobe types will let the script continue after a registration failure, as per PR6749. The dwarfless kprobes should be no exception. Also, the way they were exiting was causing an unclean shutdown, so I added tests to badkprobe.exp to make sure that cleanup is always allowed to run.
| * Tweak error message in kprobe.function registrationJosh Stone2009-04-241-1/+1
| |
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-231-1/+10
|\| | | | | | | | | | | Conflicts: Makefile.in
| * PR 9941: Add predicate function callback to check for an early abortRajan Arora2009-04-221-1/+10
| | | | | | | | | | | | | | * tapsets.cxx: Add dwfl_report_offline_predicate to check pending interrupts for an early abort. * tapsets.h: Declare it. * translate.cxx: Add callback to function call.