summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add update_visitor::replaceJosh Stone2009-08-038-72/+77
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Strengthen the template types in update_visitorJosh Stone2009-08-032-7/+7
| | | | | | | | | | * staptree.h (update_visitor::require, provide): Make the parameters and return values a T*, to make it explicit that we want pointer types.
| * Merge branch 'array_index'Josh Stone2009-08-0314-249/+311
| |\
| | * PR2049: support arbitrary $target-array indexingJosh Stone2009-08-038-25/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-317-131/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3110-72/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Refactor parser for target_symbol->componentsJosh Stone2009-07-312-42/+33
| | | | | | | | | | | | | | | | | | | | | | | | The components were being parsed for both target_symbols and cast_ops, so this change refactors that code into a single function. * parse.cxx (parser::parse_target_symbol_components): New. (parser::parse_symbol): Use the new function.
| | * Drop a couple of unnecessary std:: qualifiersJosh Stone2009-07-311-2/+2
| | | | | | | | | | | | | | | * staptree.cxx (target_symbol::print): Drop std:: from parameter o. (cast_op::print): Ditto.
| * | PR10475: ensure that loc2c can find its array sizeJosh Stone2009-08-032-0/+23
| | | | | | | | | | | | * loc2c.c (array_stride): iterate DIEs past typedef/const/volatile
| * | Make sure we pick up our own sdt.h, not the (maybe not installed) system one.Mark Wielaard2009-08-032-2/+2
| |/ | | | | | | | | * Makefile.am (AM_CPPFLAGS): Add -I$(srcdir)/includes. * Makefile.in: Regenerated.
| * NEWS: note faster pass-2Frank Ch. Eigler2009-07-311-0/+3
| |
| * PR10204: Place userspace markers in systemtap itselfKent Sebastian2009-07-311-0/+267
| | | | | | | | * tapset/stap_staticmarkers.stp: new file (for real this time)
| * Merge branch 'master' of git+ssh://sources.redhat.com/git/systemtapKent Sebastian2009-07-316-2/+170
| |\
| | * Add testcase for PR10458, PR10459 and PR10454.Mark Wielaard2009-07-313-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | Last test currently disabled because PR10454 is still open. * testsuite/systemtap.context/uprobe_stmt_num.exp: New file. * testsuite/systemtap.context/uprobe_stmt_num.stp: Likewise. * testsuite/systemtap.context/uprobe_stmt_num.c: Likewise.
| | * PR10458. User actual breakpoint address for [ku]probe[ret].Mark Wielaard2009-07-313-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | PR10204: Place userspace markers in systemtap itselfKent Sebastian2009-07-318-0/+45
| |/ | | | | | | | | | | | | | | | | | | | | | | * cache.cxx (add_to_cache,clean_cache): add static markers * main.cxx (main): likewise * runtime/staprun/common.c (send_request): likewise * runtime/staprun/mainloop.c (stp_main_loop): likewise * runtime/staprun/staprun.c (remove_module): likewise * runtime/staprun/staprun.h: include sdt.h * runtime/staprun/staprun_funcs.c (insert_module): likewise * util.cxx (stap_system): likewise * tapset/stap_staticmarkers.stp: new file
| * Relax the type-matching in the cmd_parse13 testJosh Stone2009-07-301-1/+1
| | | | | | | | | | Dwarf probes are now printing their $target variables in -L, so we need to handle more than just stap types in the regular expression.
| * dtrace.in: Don't interpret -h -o FILE, just use the filename as is.Stan Cox2009-07-301-8/+9
| |
| * PR10459. Disable all warning messages on -w.Mark Wielaard2009-07-304-27/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Remove unused result_string from ustack.tcl.Mark Wielaard2009-07-301-9/+0
| | | | | | | | * testsuite/systemtap.exelib/ustack.tcl: Remove result_string.
| * 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
| * Use a real session flag for -LJosh Stone2009-07-292-10/+14
| | | | | | | | | | | | | | | | | | Rather than relying on 'unoptimized' to tell us that the listing mode should print the variables too, this adds an explicit listing_mode_vars. * session.h (systemtap_session): Add listing_mode_vars * main.cxx (main): Set s.listing_mode_vars appropriately. (printscript): Use the new flag for deciding whether to print locals
| * 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
| * PR6978: support $$parms for process.syscallWenji Huang2009-07-283-41/+125
| | | | | | | | | | | | * tapset-utrace.cxx (visit_target_symbol_arg): Handle $$parms. * testsuite/systemtap.base/utrace_p4.exp: Add test case. * testsuite/systemtap.base/utrace_p5.exp: Ditto.
| * PR10453: Fix crash.exp not to refer removed fileMasami Hiramatsu2009-07-281-1/+1
| | | | | | | | | | * systemtap.base/crash.exp: Use command-line script instead of removed script file.
| * Improves functionality on rawhide (2.6.31-rcX) kernels.David Smith2009-07-281-65/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * runtime/transport/ring_buffer.c (struct _stp_iterator): Renamed from _stp_ring_buffer_data. (_stp_data_open_trace): Uses _stp_iterator. (_stp_data_release_trace): Ditto. (_stp_ring_buffer_empty_cpu): Ditto. (_stp_ring_buffer_empty): Ditto. (_stp_ring_buffer_consume): Ditto. (_stp_tracing_wait_pipe): Ditto. (_stp_peek_next_event): Ditto. (_stp_find_next_event): Ditto. (_stp_data_read_trace): Ditto. (_stp_data_write_reserve): Ditto.
| * Install yum-utils when yumdownloader is missing first in stapprep.sh.Mark Wielaard2009-07-281-0/+4
| | | | | | | | | | * doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh: Check whether yumdownloader is already available and install yum-utils if not.
| * Support for presenting multiple graphsTim Moore2009-07-2816-839/+1337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grapher/Graph.hxx: New file; class for single graph display. * grapher/Graph.cxx: New file. * grapher/GraphData.hxx: Associate title and axis labels with graph data and not a graph display. * grapher/GraphWidget.hxx: Move graph-related members to Graph class. * grapher/GraphWidget.cxx (getExtents, setExtents): Move to Graph class (on_expose_event): Move graph rendering to Graph. (on_button_press_event): Delegate to Graph. (on_motion_notify_event, on_scroll_event): Modify "active" graph. * grapher/StapParser.cxx (findTaggedValue): New parsing helper function. (io_callback): Support new syntax where properties are attached to graph data and not the entire graph. * grapher/grapher.cxx (GrapherWindow): Don't set graph values. * grapher/Makefile.am: Add Graph.cxx. * testsuite/systemtap.examples/general/grapher.stp: New property syntax.
| * grapher fixupsTim Moore2009-07-281-1/+1
| | | | | | | | * grapher/grapher.cxx (main): Fix problems with call to execlp.
| * Templatize GraphDataTim Moore2009-07-286-70/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grapher/GraphData.hxx (GraphDataBase): new superclass for GraphData. Split time data out as a separate vector. (GraphData): Rewrite as template. * grapher/GraphWidget.cxx (on_expose_event): Reflect GraphData templatization. Handle events with string values. * grapher/GraphWidget.hxx (GraphWidget): Keep pointers to GraphDataBase objects instead of GraphData. * grapher/StapParser.cxx (parseData): new member function (ioCallback): Handle new discreet event * grapher/StapParser.hxx (StapParser): keep pointers to GraphDataBase objects instead of GraphData * testsuite/systemtap.examples/general/grapher.stp: Display actual key pressed for keyboard event
| * run stap from grapherTim Moore2009-07-281-2/+32
| | | | | | | | | | * grapher/grapher.cxx (main): Start stap + script from program if supplied as an argument.
| * Incorporate grapher widget in real applicationTim Moore2009-07-281-11/+78
| | | | | | | | | | * grapher/grapher.cxx (GrapherWindow): New class. (main): Instantiate GrapherWindow.
| * Add CSV syntax support to the grapherTim Moore2009-07-283-10/+78
| | | | | | | | | | | | * grapher/GraphData.hxx (CSVData): new class * grapher/GraphData.cxx (commaSplit): new function (ioCallback): handle CSV definition and data
| * Refactor StapParser into its own filesTim Moore2009-07-285-90/+123
| | | | | | | | | | | | * grapher/StapParser.cxx: new file * grapher/StapParser.hxx: new file * grapher/grapher.cxx: Use external StapParser class.
| * Tweaks to grapher axis drawingTim Moore2009-07-281-7/+15
| | | | | | | | | | * grapher/GraphWidget.cxx (on_expose_event): Don't draw axis labels that would overlap others.
| * restore newlines to grapher script headerTim Moore2009-07-281-4/+4
| | | | | | | | * testsuite/systemtap.examples/general/grapher.stp: Restore newlines.
| * PR6905: tweak WILDCARD and RANGE line type for process.statementWenji Huang2009-07-274-4/+64
| | | | | | | | | | | | | | | | * dwflpp.cxx (iterate_over_srcfile_lines): Check the line range and tolerate invalid line number for WILDCARD line type. * testsuite/systemtap.base/bz6905.c: Test case. * testsuite/systemtap.base/bz6905.exp: Ditto. * testsuite/systemtap.base/bz6905.stp: Ditto.
| * 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-273-423/+576
|\|
| * Explicitly link with nss3 nspr4 and plc4 when used.Mark Wielaard2009-07-253-423/+576
| | | | | | | | | | | | | | | | | | | | | | | | GNU gold depends on all libraries providing symbols being explicitly linked in (PR 10238). And it is pedantically more correct indeed. * Makefile.am (stap_LD_ADD): Add -lnspr4 when HAVE_NSS. (staprun_LDADD): Likewise. (stap_client_connect_LDADD): Add -lnss3 -lnspr4 -lplc4 when BUILD_SERVER. (stap_server_connect_LDADD): Likewise. * Makefile.in: Regenerated. * aclocal.m4: Likewise.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-242-14/+81
|\|
| * PR6898: support $$vars and $$parms for markerWenji Huang2009-07-232-14/+81
| | | | | | | | | | * tapset-mark.cxx (visit_target_symbol_context): Add $$vars/$$parms. * testsuite/systemtap.base/marker.exp : Test case.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-2342-693/+1349
|\|
| * Workaround cfa_nops not being needed on earlier elfutils.Mark Wielaard2009-07-232-2/+2
| | | | | | | | | | * dwflpp.cxx (get_cfa_ops): Only define cfa_nops if _ELFUTILS_PREREQ(0,142). * loc2c-test.c (main): Likewise.
| * Adjust to new elfutils dwarf_frame_cfa interface.Mark Wielaard2009-07-232-4/+6
| | | | | | | | | | * dwflpp.cxx (get_cfa_ops): Call dwarf_frame_cfa with cfa_nops size_t. * loc2c-test.c (main): Likewise.
| * Make ring_buffer transport work on new kernels.David Smith2009-07-221-13/+44
| | | | | | | | | | | | | | * runtime/transport/ring_buffer.c (_stp_event_to_user): Added debug prints. (_stp_ring_buffer_consume): New function. (_stp_find_next_event): Avoid incrementing the buffer iterator here. (_stp_data_write_commit): Added debug prints.
| * PR10427 Multiple tracepoints OK!Mark Wielaard2009-07-221-1/+3
| | | | | | | | | | * testsuite/systemtap.base/tracepoints.stp: Only print once, when enough hits, or at the begin probe.
| * Use the query paradigm for resolving sdt probesJosh Stone2009-07-212-377/+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
| |