summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* PR4186 cont'd: fix 32-bit i386 buildsFrank Ch. Eigler2009-08-241-0/+5
| | | | | * main.cxx (main): Initialize s.architecture to value as if from `uname -i`. Specifically, squash i?86 -> i386.
* Rename cache.exp proc stap_compile to cache_compile to not conflict.Mark Wielaard2009-08-241-22/+22
| | | | | | * testsuite/systemtap.base/cache.exp: Rename proc stap_compile to cache_compile, to prevent conflict with proc stap_compile from lib/stap_compile.exp.
* Fix failing uprobes.exp -p5 failures by removing trailing spaces in $$ vars.Mark Wielaard2009-08-243-8/+12
| | | | | | | | * 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.
* PR4186: cross-architecture probe buildingFrank Ch. Eigler2009-08-247-7/+69
| | | | | | | | | | | * main.cxx (main): Add 'a:' and 'B:' options. * session.h (kbuildflags): New place to store -B args. * testsuite/systemtap.base/cmd_parse.exp: Test them lightly. * buildrun.cxx (run_make_cmd): Use "--no-print-directory" rather than ">/dev/null" in kbuild invocations. Pass '-a' and '-B' flags along. * hash.cxx (find_script_hash): Add them. * NEWS, stap.1.in: Mention this.
* Initialize sdt_types testcase arr_char so that it is always null terminated.Mark Wielaard2009-08-241-1/+1
| | | | | | * testsuite/systemtap.base/sdt_types.c: Initialize char arr_char [], not with (too small) constant length, to make sure the string is always null terminated.
* Simplify mkstemp invocation.Stan Cox2009-08-231-1/+1
| | | | *dtrace: Don't bother with prefix when invoking mkstemp.
* PR10551: cont'dFrank Ch. Eigler2009-08-231-1/+2
| | | | * runtime/print.c (_stp_print_kernel_info): Also switch module_core->module_core_rx.
* PR10551: build compatibility for pax/grsecurity include/linux/module.hFrank Ch. Eigler2009-08-233-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adapts to patches such as: diff -urNp linux-2.6.29.6/include/linux/module.h linux-2.6.29.6/include/linux/module.h --- linux-2.6.29.6/include/linux/module.h 2009-07-02 19:41:20.000000000 -0400 +++ linux-2.6.29.6/include/linux/module.h 2009-07-30 17:59:26.175602427 -0400 @@ -278,16 +278,16 @@ struct module int (*init)(void); /* If this is non-NULL, vfree after init() returns */ - void *module_init; + void *module_init_rx, *module_init_rw; /* Here is the actual code + data, vfree'd on unload. */ - void *module_core; + void *module_core_rx, *module_core_rw; /* Here are the sizes of the init and core sections */ - unsigned int init_size, core_size; + unsigned int init_size_rw, core_size_rw; /* The size of the executable code in each section. */ - unsigned int init_text_size, core_text_size; + unsigned int init_size_rx, core_size_rx; * runtime/autoconf-grsecurity.c: New test. * buildrun.cxx: Try it. * runtime/print.c: Use it.
* build fix: make buildable with elfutils < 0.142Frank Ch. Eigler2009-08-232-0/+21
| | | | | * dwarf_wrappers.h, loc2c.c: Define DW_TAG_rvalue_reference_type=0x42 for older elfutils.
* PR10461: Add support for C++ classes and referencesJosh Stone2009-08-213-25/+81
| | | | | | | | | | * dwarf_wrappers.cxx (dwarf_type_name): Name class and reference types. * dwflpp.cxx (dwflpp::iterate_over_globals): Capture class names. (dwflpp::print_members): Permit classes, and dig into inheritance. (dwflpp::find_struct_member): Ditto. (dwflpp::translate_components): Handle classes and references. (dwflpp::translate_final_fetch_or_store): Ditto. * loc2c.c (c_translate_pointer): Treat references as simple pointers.
* 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.
* PR10543: do module cache cleaning before copying new file into the cacheFrank Ch. Eigler2009-08-212-3/+5
| | | | | | ... otherwise the new stuff can get cleaned before use. * cache.cxx (add_to_cache): Do clean_cache() first, not last.
* PR10544: clean up stap child process error handlingFrank Ch. Eigler2009-08-216-41/+40
| | | | | | | * 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-215-22/+22
| | | | | | | | | | 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.
* Two minor testcase fixes.David Smith2009-08-202-3/+5
| | | | | * testsuite/systemtap.base/global_stat.exp: Improved error handling. * testsuite/systemtap.base/strftime.exp: Ditto.
* * dtrace.in: Support -C, preprocess with cpp, which upstream postgresStan Cox2009-08-202-3/+34
| | | | is now using.
* PR10537 process().function().label() should select multiple inlined instances.Mark Wielaard2009-08-203-44/+38
| | | | | | | | | | | | | | | | | | | | This is less useful than one would hope. gcc will often emit a label with a DW_AT_low_pc that is not really in the neighbourhood of where one would expect it when the label is inlined and gcc can proof the label isn't really used in the optimized code. dwflpp::iterate_over_labels will now really iterate recursively through the die, even for dies without a name (like lexical blocks). This means we should now always find the concrete inlined label instances that have a real DW_AT_low_pc and so we don't need the trick to use the line table to get at the actual address. * dwflpp.cxx (iterate_over_labels): Accept dies without a name. Don't handle labels without a name or without a lowpc attribute. * testsuite/systemtap.base/inlinedvars.c (m): Trick gcc into thinking label is always used. (call, call2): Activate. (main): Call call and call2. * testsuite/systemtap.base/inlinedvars.exp: New result_string. Test both unoptimized and optimized (inlined) builds.
* Two minor testcase fixes.David Smith2009-08-202-2/+2
| | | | | * testsuite/systemtap.base/poll_map.exp: Improved error handling. * testsuite/systemtap.base/postgres.exp: Fixed typo.
* PR10228: fix non-utrace building regression - cont'dWenji Huang2009-08-202-2/+2
| | | | | | | * runtime/task_finder.c (non-UTRACE): Return 0 for stap_start_task_finder. * translate.cxx (emit_module_init): Let vma tracker specific to utrace.
* Merge branch 'master' of ssh://sourceware.org/git/systemtapJosh Stone2009-08-191-70/+145
|\
| * Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDavid Smith2009-08-191-7/+8
| |\
| * | Updated with latest code.David Smith2009-08-191-70/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * runtime/transport/ring_buffer.c (_stp_ring_buffer_disable_cpu): New function. (_stp_ring_buffer_enable_cpu): Ditto. (_stp_ring_buffer_cpu_disabled): Ditto. (_stp_ring_buffer_empty_cpu): Only checks online cpus (instead of all possible cpus). (_stp_find_next_event): Ditto. (_stp_ring_buffer_iterator_increment): Calls _stp_ring_buffer_disable_cpu()/_stp_ring_buffer_enable_cpu() around ring_buffer_* calls. (_stp_ring_buffer_consume): Ditto. (_stp_peek_next_event): Ditto. (_stp_buffer_iter_finish): New function. (_stp_buffer_iter_start): Ditto. (_stp_data_read_trace): Uses _stp_buffer_iter_start()/_stp_buffer_iter_finish(). (_stp_data_write_reserve): Checks to see if the cpu is disabled (with _stp_ring_buffer_cpu_disabled() before reserving memory. Uses _stp_buffer_iter_start()/_stp_buffer_iter_finish(). (_stp_transport_data_fs_init): Initializes buffer iterators.
* | | Give a more exact error for dereferencing void*Josh Stone2009-08-191-0/+6
| | | | | | | | | | | | * dwflpp.cxx (dwflpp::translate_components): Check for void* deref.
* | | PR10538: Give a file:line hint for anonymous typesJosh Stone2009-08-191-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | When we list the possible members for an anonymous struct/union, the user may want to go look at the source for the type. That's hard without a type name, so we now list the decl file:line for them. * dwflpp.cxx (dwflpp::translate_components): List file:line for anon.
* | | Create a dwarf_attr_die idiomJosh Stone2009-08-194-31/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_diename instead of a DW_AT_name lookupJosh Stone2009-08-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | We should always use the canonical dwarf_diename. The code being replaced here wasn't even using dwarf_attr_integrate, so it may have been missing the accessibility of some names. * dwflpp.cxx (dwflpp::iterate_over_labels): Use dwarf_diename.
* | | Use dwarf_type_name in more placesJosh Stone2009-08-194-124/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | PR10538: Improve location lookup for unionsJosh Stone2009-08-191-7/+8
|/ | | | | | | | | | | | | We had a bug that the starting call to find_struct_member used the same memory for the parentdie and the resulting member. If parentdie is a union, then the first member probably won't have a location, and we actually assert that it must be a union. Since we wrote the result in the same memory, we lost the real info about the parent, and so the assertion failed. * dwflpp.cxx (dwflpp::translate_components): Use distinct memory for the parent and resulting member in the call to find_struct_member. (dwflpp::find_struct_member): Remove the needless parentdie copy.
* * testsuite/systemtap.base/postgres.exp: New test for checking sdtStan Cox2009-08-191-0/+136
| | | | | marker support as used by postgres. Currently assumes, and verifies, that postgres is installed in /usr/local
* PR10228: fix non-utrace building regressionFrank Ch. Eigler2009-08-192-2/+7
| | | | | | | * translate.cxx (dump_unwindsyms): Decide based on modname[] not mainfile[] to emit a vmcb. * runtime/task_finder.c (non-UTRACE): Include dummy stap_{start,stop}_* functions.
* Improved testcase error handling.David Smith2009-08-192-14/+14
| | | | | * testsuite/systemtap.base/arith.exp: Improved error handling. * testsuite/systemtap.base/cmd_parse.exp: Ditto.
* Improved systemtap.printf/sharedbuf.exp testcase.David Smith2009-08-191-41/+87
| | | | | * testsuite/systemtap.printf/sharedbuf.exp: Handles failure better and possible modpost warnings.
* Fix typo in sdt_types.stp (missing newline).Mark Wielaard2009-08-191-2/+2
| | | | * testsuite/systemtap.base/sdt_types.stp (int_var): Add \n to printf.
* PR10495: allow multiple probe aliases with same nameFrank Ch. Eigler2009-08-185-12/+32
| | | | | | | | * elaborate.cxx (match_node::bind): Change ->end to ->ends[] vector. (find_and_build,build_no_more): Iterate over ends[]. * elaborate.h: Corresponding changes. * testsuite/semok/thirtyfour.stp: New test. * NEWS, doc/langref.tex: Note this.
* AUTHORS updateJosh Stone2009-08-182-0/+2
|
* PR10512 STAP_PROBES don't work in c++ constructors/destructors testcase.Mark Wielaard2009-08-183-0/+126
| | | | | | * testsuite/systemtap.base/cxxclass.exp: New file. * testsuite/systemtap.base/cxxclass.stp: Likewise. * testsuite/systemtap.base/cxxclass.cxx: Likewise.
* PR10512 Referencing computed goto labels in c++ constructors does work.Mark Wielaard2009-08-181-23/+0
| | | | | | | | PR10533 inlined vars are not always found was fixed which means we no longer need to prevent inlining of the STAP_PROBE macros. * includes/sys/sdt.h (STAP_UNINLINE_LABEL): Removed. (STAP_PROBE[1-9]_): Remove label: and STAP_UNINLINE_LABEL.
* Add testcase for PR10533 (inlined vars) and 10537 (inlined labels - disabled)Mark Wielaard2009-08-183-0/+73
| | | | | | | | | | Partial testcase for PR10533 (inlined vars) and 10537 (inlined labels) currently we cannot use the full testcase since stap doesn't support probing multiple instances of inlined labels. * testsuite/systemtap.base/inlinedvars.exp: New file. * testsuite/systemtap.base/inlinedvars.stp: Likewise. * testsuite/systemtap.base/inlinedvars.c: Likewise.
* PR10533 inlined vars are not always found (dwflpp).Mark Wielaard2009-08-181-14/+26
| | | | | | | | | | | | | | dwflpp::find_variable_and_frame_base switched too early to "pyshical view" of die tree. We need to lookup the var in the "syntactical view" of the die tree first. Then when we see a DW_TAG_inlined_subroutine while walking the syntactical die tree as returned by dwarf_getscopes for a given variable to retrieve the frame base, then we need to switch to walking the physical die tree where the subroutine is inlined. * dwflpp.cxx (find_variable_and_frame_base): Don't immediately go to die_scopes, but lookup var first based on pc. Then switch "die branches" when searching for frame base and a DW_TAG_inlined_subroutine is encountered.
* PR10533 inlined vars are not always found (lo2c-test off-by-one).Mark Wielaard2009-08-181-1/+1
| | | | | * loc2c-test.c (handle_variable): Set inner to zero after calling dwarf_getscopes_die(), for loop will increase inner.
* PR10518: context shrinkage with function recursion analysis feeding MAXNESTINGFrank Ch. Eigler2009-08-183-7/+87
| | | | | | | | * 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-182-2/+2
| | | | | | | * 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.
* PR10516: reduce context sizeFrank Ch. Eigler2009-08-181-3/+9
| | | | | | * translate.cxx (emit_common_header): Emit probe locals into a separate union, not into the locals[] array. (emit_probe): Adapt.
* elfutils build tweak: run nested configure with bash, add -fgnu89-inlineFrank Ch. Eigler2009-08-1815-3443/+5734
| | | | | * configure.ac: Tweak --with-elfutils nested configure invocation. * rest of auto* files: regenerated with fedora-11 tools
* * dtrace.in: Honor the dirname for the output file.Stan Cox2009-08-182-2/+119
| | | | * testsuite/systemtap.base/dtrace.exp: New test.
* PR10533 loc2c doesn't resolve frame base correctly for inlined vars.Mark Wielaard2009-08-181-12/+28
| | | | | | | | | | When we see a DW_TAG_inlined_subroutine while walking the syntactical die tree as returned by dwarf_getscopes for a given variable to retrieve the frame base, then we need to switch to walking the physical die tree where the subroutine is inlined. * loc2c-test.c (handle_variable): Switch "die branches" when searching for frame base and a DW_TAG_inlined_subroutine is encountered.
* Print DIE offsets in loc2c-test scope dumps.Roland McGrath2009-08-181-1/+2
|
* Unlocks global variables, then calls _stp_print_flush().David Smith2009-08-171-4/+4
| | | | | * translate.cxx (c_unparser::emit_probe): Unlocks global variables, then calls _stp_print_flush() (instead of the other way around).
* 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.