summaryrefslogtreecommitdiffstats
path: root/tapset-mark.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add startswith/endswith helpersJosh Stone2010-03-111-1/+1
| | | | | Inspired by the Python equivalents, these new utility functions just make it a little cleaner to match at the beginning or end of a string.
* PR11005: @defined part 2: clarify/standardize internal handling of ↵Frank Ch. Eigler2010-02-251-12/+19
| | | | | | | | | | | | | | | | | unresolvable $variables * staptree.cxx (target_symbol::chain): New function. * staptree.h: Declare it. * (*): Use it instead of hand-chaining to target_symbol->saved_conversion_error. * tapset-mark.cxx (*::visit_target_symbol): Chain resolution error object, do not throw. * tapset-procfs.cxx (*::visit_target_symbol): Ditto. * tapset-utrace.cxx (*::visit_target_symbol): Ditto. * tapsets.cxx (*::visit_target_symbol): Ditto. (*::visit_defined_op): Explain & enforce the above. * testsuite/semok/thirtysix.stp: Expand. * testsuite/systemtap.base/sdt_misc.exp: Bonus fix: make work with blddir != srcdir.
* Rework identification of probes allowed for unprivileged users.Dave Brolley2010-02-151-3/+1
| | | | | | | - Bind unprivileged permission at probe registration time. - Remove check_unprivileged filter from derived_probe_builder and its children. - Add test suites for unprivilegedok and unprivilegedko.
* PR11256: harden --unprivileged modeFrank Ch. Eigler2010-02-051-0/+2
| | | | | | | | * tapsets-mark.cxx, tapsets.cxx: Don't even publish probe point families that are inappropriate for use in --unprivileged mode. (dwarf_derived_probe_*unprivileged*): Remove, to default to blanket no-permission rather than emit_process_owner_permission mode. * testsuite/semko/fortyeight.stp: New test.
* rhbz 560890: preserve -L/-l variable orderingNobuhiro Tachino2010-02-021-5/+5
| | | | | | Switch to list<string> from set<string> for collecting available $var lists. Use O(N**2) list-uniqueifier that preserves initial ordering.
* PR10466: print the set-intersection of variables retrieved from each branchWenji Huang2009-11-041-5/+5
| | | | | | | * elaborate.h: Remove printargs and add getargs. * tapset-mark.cxx (mark_derived_probe): Ditto. * tapsets.cxx (dwarf_derived_probe,tracepoint_derived_probe): Ditto. * main.cxx (printscript): Make intersection before printing.
* Consolidate print_format creationJosh Stone2009-10-131-7/+1
| | | | | | | | | | | | | | | | | | We almost had a factory in print_format::parse_print, so let's take that the rest of the way. This way we don't have so much duplication in initializing the print flags. * staptree.cxx (print_format::parse_print): Replaced with... (print_format::create): New factory to parse and create print_formats. * elaborate.cxx (add_global_var_display): Use this factory. * parse.cxx (parser::parse_symbol): Ditto. * tapset-mark.cxx (mark_var_expanding_visitor::visit_target_symbol_context): Ditto. * tapset-utrace.cxx (utrace_var_expanding_visitor::visit_target_symbol_arg): Ditto. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_context): Ditto. (tracepoint_var_expanding_visitor::visit_target_symbol_context) Ditto.
* Unify lex_cast* and avoid string copiesJosh Stone2009-09-021-6/+6
| | | | | | | | | | | | | | | 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.
* Add update_visitor::replaceJosh Stone2009-08-031-1/+1
| | | | | | | | | | | | 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.
* Unify no-component assertions on target variablesJosh Stone2009-07-311-34/+2
| | | | | | | | | | | | | | | | | 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-2/+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.
* PR6898: support $$vars and $$parms for markerWenji Huang2009-07-231-14/+64
| | | | | * tapset-mark.cxx (visit_target_symbol_context): Add $$vars/$$parms. * testsuite/systemtap.base/marker.exp : Test case.
* PR5930: Address-op for $target and @cast membersJosh Stone2009-07-151-0/+3
| | | | | | | | | | | | | | | | This allows the '&' operator to get the address of @cast and $target variable expressions. * staptree.h (target_symbol): add addressof field * staptree.cxx (target_symbol::print): print '&' for addressof (cast_op::print): ditto * parse.cxx (parser::parse_value): allow '&' prefix on $target/@cast * dwflpp.cxx (dwflpp::translate_final_fetch_or_store): allow taking the computed address without actually doing a final fetch. * tapset* (*::visit_target_symbol): throw errors for $vars w/o addresses * testsuite/systemtap.base/cast.stp: add &@cast test * testsuite/semok/target_addr.stp: test '&' on different member types * testsuite/semko/target_addr?.stp: test failure on bitfields/registers
* Make all tapsets' TOK_FOO constantJosh Stone2009-05-151-3/+3
|
* Separate the kernel.mark tapsetJosh Stone2009-05-071-0/+712