summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
Commit message (Collapse)AuthorAgeFilesLines
* grammar fixfche2007-05-061-1/+1
|
* 2007-05-06 Frank Ch. Eigler <fche@elastic.org>fche2007-05-061-3/+38
| | | | | | | | | | | | PR 1305. * tapsets.cxx (iterate_over_srcfile_lines): Exclude approximate file:lineno matches optimistically returned by dwarf_getsrc_file. (query_srcfile_line): Use Dwarf_Line line number for constructing derived_probe location string. 2007-05-06 Frank Ch. Eigler <fche@elastic.org> * semko/thirtynine.stp: New test.
* 2007-04-24 David Smith <dsmith@redhat.com>dsmith2007-04-241-0/+1
| | | | | * tapsets.cxx (common_probe_entryfn_epilogue): Increment error_count when overload processing kicks in.
* 2007-04-23 Frank Ch. Eigler <fche@redhat.com>fche2007-04-231-6/+48
| | | | | * tapsets.cxx (die_entrypc): Expand search algorithm to check for "aranges", as sometimes occurs for inlined functions.
* 2007-04-04 Frank Ch. Eigler <fche@elastic.org>fche2007-04-041-0/+2
| | | | | | GCC 4.3 compatibility patches from Debian. * buildrun.cxx, hash.cxx, tapsets.cxx, translate.cxx: #include a few more C++ headers.
* 2007-04-02 Frank Ch. Eigler <fche@redhat.com>fche2007-04-031-2/+9
| | | | | | PR 3261. * tapsets.cxx (query_module): Reject elfutils module "kernel" unless kernel.* probe point used.
* 2007-04-02 Frank Ch. Eigler <fche@elastic.org>fche2007-04-021-1/+1
| | | | | | | | | | | | * tapsets.cxx (query_dwarf_func): Skip non-inlined functions for .function().inline case. 2007-04-02 Frank Ch. Eigler <fche@elastic.org> * socket-trace.stp, small_demos/prof.stp, top.stp: Adapt to .inline -> .function change. * semko/twentyone.stp: Ditto.
* 2007-03-30 Frank Ch. Eigler <fche@redhat.com>fche2007-03-301-484/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR 1570 * NEWS: Document probe handler language change re. inline functions. * stapprobes.5.in: Likewise. * tapsets.cxx: Many changes to simplify caches and implement new handling of inline functions, removed of stubs for future probes. * elaborate.cxx (derived_probe printsig_nested): New function. * elaborate.h: Declare it. * main.cxx (usage): Clarify "-r" meaning. (main): Tweak related "-p 4" message. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570. * memory.stp, scheduler.stp, signal.stp, LKET/signal.stp: Adapt to .inline -> .function change. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570 * */*.stp: Adapt to .inline -> .function change. * lib/stap_run.exp, stap_run2.exp, stap_run_binary.exp: Shorten pass/fail dejagnu log lines. * systemtap.syscall/sys.stp, test.tcl: Make slightly more compatible and failure more verbose.
* 2007-03-29 Frank Ch. Eigler <fche@redhat.com>fche2007-03-291-1/+6
| | | | | * tapsets.cxx (dwarf_derived_probe emit_module_init): Correct handling of kprobe registration errors in the middle of a sequence.
* 2007-03-28 David Smith <dsmith@redhat.com>dsmith2007-03-281-0/+4
| | | | | | | | | | | | | | | | | | | | PR 2341 (partial fix) * elaborate.h (struct derived_probe): Added needs_global_locks() member function. Unless overridden, will return true indicating that this probe needs locks around global variable references. * tapsets.cxx (struct be_derived_probe): Added override of default needs_global_locks() returning false. begin/end probes don't need locks around global variables, since they aren't run concurrently with any other probes. * translate.cxx (c_unparser::emit_common_header): Updated probe_contents logic to match the logic in emit_probe. (c_unparser::emit_probe): Added whether the probe needs global variable locks to the probe string (that helps eliminate duplicate probes). The generated C changes based on whether or not global variable locks are needed, but the pass 2 output doesn't differ between a probe that needs global variable locks and one that doesn't. If the probe doesn't need global variable locks, doesn't output them.
* 2007-03-26 David Smith <dsmith@redhat.com>dsmith2007-03-261-1/+14
| | | | | | | | * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Improved error messages for invalid types. * elaborate.cxx (typeresolution_info::invalid): Improved the error message for invalid operators.
* 2007-03-22 Frank Ch. Eigler <fche@elastic.org>fche2007-03-221-19/+55
| | | | | | | | | | | | | | | | | | | | | | | | PR 4224. * staptree.h (probe): Add privileged field. * elaborate.cxx, parse.cxx: Pass privileged flag to probes. * tapsets.cxx (dwarf_query): Add has_absolute field. (dwarf_derived_probe ctor): Tolerate it. (register_patterns): Expose it. (dwarf_builder::build): Implement it with no dwfl whatsoever. * NEWS: Document kernel.statement().absolute. * stapprobes.5.in: Ditto. 2007-03-22 Frank Ch. Eigler <fche@elastic.org> PR 4224. * systemtap.base/probefunc.exp: Use kernel.statement().absolute instead with grep-found schedule_tick address. * semko/thirtyseven.stp, thirtyeight.stp: New tests. * buildok/twentyeight.stp: New test. 2007-03-22 Frank Ch. Eigler <fche@elastic.org> * sym.c (_stp_module_relocate): Tolerate empty section string.
* 2007-03-21 David Smith <dsmith@redhat.com>dsmith2007-03-211-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | PR 4146 * tapsets.cxx (common_probe_entryfn_prologue): Added 'interruptible' parameter. If a probe is interruptible, interrupts are not disabled while the probe executes. Preemption is disabled however. Interruptible parameter defaults to false. (common_probe_entryfn_epilogue): Ditto. (be_derived_probe_group::emit_module_decl): Uses new 'interruptible' parameter to mark begin/end probes as interruptible. (probe_derived_probe_group::emit_module): Initialize 'actionremaining' with MAXACTION instead of initializing 'actioncount' with 0. * translate.cxx (emit_common_header): Renamed 'actioncount' to 'actionremaining'. Turned logic around to initialize actionremaining to MAXACTION or MAXACTION_INTERRUPTIBLE then decrement it as actions occur. (translate_pass): Added MAXACTION_INTERRUPTIBLE initialization. * translate.h: Removed outdated comment portion. * stap.1.in: Documented MAXACTION_INTERRUPTIBLE. * NEWS: Added note about begin/end probes being run with interrupts enabled.
* 2007-03-20 Frank Ch. Eigler <fche@elastic.org>fche2007-03-211-56/+57
| | | | | | | | | | | | | | | | | | | | | | PR 4224. * tapsets.cxx (add_probe_point): Make kernel implicitly relocated relative to the _stext symbol. (dwarf_derived_probe ctor, emit_module_decls): Cooperate. (lookup_symbol_address): New function. (dwarf_builder::build): Call it thrice. (in_kprobes_function): Simplify. * session.h (systemtap_session): Rename cached symbol addresses. * translate.cxx, elaborate.cxx: Corresponding tweaks. 2007-03-20 Frank Ch. Eigler <fche@elastic.org> PR 4224. * sym.c (_stp_module_relocate): Support kernel relocations. 2007-03-20 Frank Ch. Eigler <fche@elastic.org> * symbols.c (_stp_do_symbols): Add cautionary blurb for important setup of _stp_modules[0]->text.
* 2007-03-19 David Smith <dsmith@redhat.com>dsmith2007-03-191-0/+7
| | | | | | | | | | PR 4146 (partial fix) * tapsets.cxx (all_session_groups): Added note about stating that begin probes should be registered (actually run) first and end probes should be unregistered (run) last. * translate.cxx (c_unparser::emit_module_exit): Process probe group vector in reverse order so that probe groups will get unregistered in the reverse order that they were registered.
* 2007-03-19 Frank Ch. Eigler <fche@elastic.org>fche2007-03-191-14/+13
| | | | | | | | | | | * buildrun.cxx (compile_pass): Emit kbuild-time autoconf widgets to customize runtime or translator C code to actual kernel rather than kernel version string. Thanks to FC 2.6."20" for the nudge. * tapsets.cxx (hrtimer*emit_module): First client: HRTIMER_{MODE_}REL. 2007-03-19 Frank Ch. Eigler <fche@elastic.org> * autoconf-hrtimer-rel.c: New file.
* 2007-03-16 David Smith <dsmith@redhat.com>dsmith2007-03-161-18/+56
| | | | | | | | | | | | | | | | PR 3545. * tapsets.cxx (common_probe_entryfn_prologue): Added 'overload_processing' parameter, which defaults to true. If overload_processing is set to false, doesn't output the STP_OVERLOAD code. (common_probe_entryfn_epilogue): Ditto. (be_derived_probe_group::emit_module_decl): Set overload_processing to false in calls to common_probe_entryfn_prologue and common_probe_entryfn_epilogue since begin/end probes shouldn't overload the system. * translate.cxx (c_unparser::emit_common_header): Emit STP_OVERLOAD global variables. (translate_pass): Emit STP_OVERLOAD defines.
* 2007-03-07 Frank Ch. Eigler <fche@elastic.org>fche2007-03-071-2/+3
| | | | | | PR 4166. * tapsets.cxx (translate_components): Throw an exception rather then suffer an assertion failure for $ptr[index] expressions.
* 2007-02-27 Frank Ch. Eigler <fche@elastic.org>fche2007-02-271-22/+1
| | | | | | * tapsets.cxx (dwflpp setup): Print "missing kernel debuginfo" message consistently for, er, missing kernel debuginfo. (query_kernel_exists): Zapped.
* 2007-02-25 Frank Ch. Eigler <fche@redhat.com>fche2007-02-251-2/+15
| | | | | | | | * elaborate.h (match_node, derived_probe_builder): Add build_no_more member function. * elaborate.cxx (semantic_pass_symbols): Call it. * tapsets.cxx (dwarf_builder): Implement it by releasing dwflpp instance after pass 2, freeing mucho memory.
* 2007-02-23 Josh Stone <joshua.i.stone@intel.com>jistone2007-02-231-3/+16
| | | | | | | | PR 4096 * tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls): Adapt the function signature for changes in 2.6.21. (hrtimer_derived_probe_group::emit_module_init): Fix the enum name for 2.6.21 as well.
* 2007-02-19 Frank Ch. Eigler <fche@elastic.org>fche2007-02-191-22/+26
| | | | | | | | | PR 4078 and more, including patch from Eugeniy Meshcheryakov <eugen@debian.org>: * Makefile.am (AM_CXXFLAGS, AM_CFLAGS): Add -Wextra -Wall -Werror consistently. * Makefile.in: Regenerated. (*): Many minor warning fixes.
* 2007-02-15 David Smith <dsmith@redhat.com>dsmith2007-02-151-2/+90
| | | | | | | | | | | | PR 3625. * tapsets.cxx (dwflpp::print_locals): New function to print all the variables/parameters of a function. (dwflpp::find_variable_and_frame_base): Calls print_locals() when target variable can't be found. (dwflpp::print_members): New function to print all the members of a union/structure. (dwflpp::translate_components) Calls print_members() when union/structure member target variable reference can't be found.
* 2007-02-14 Frank Ch. Eigler <fche@elastic.org>fche2007-02-141-0/+6
| | | | | * tapsets.cxx (emit_module_decls): Assert CONFIG_KPROBES, as suggested by Andreas Kostyrka <andreas@kostyrka.org>.
* 2007-02-12 Frank Ch. Eigler <fche@elastic.org>fche2007-02-121-1/+2
| | | | * tapsets.cxx (query_statement): Tolerate null file name string.
* 2007-02-09 Frank Ch. Eigler <fche@elastic.org>fche2007-02-091-16/+17
| | | | | | | | | | | | | | | | PR 3965 * configure.ac: Add --enable-prologue option. * configure, config.in: Regenerated. * session.h (prologue_searching): New field. * main.cxx (main): Parse new "-P" option. Initialize based on autoconf flag. * stap.1.in, NEWS: Document it. * hash.cxx (find_hash): Include it in computation. * tapsets.cxx (query_func_info, query_cu): Respect it. 2007-02-09 Frank Ch. Eigler <fche@elastic.org> * systemtap.base/prologue.*: New test case.
* 2007-01-23 Frank Ch. Eigler <fche@elastic.org>fche2007-01-231-1/+3
| | | | * tapsets.cxx (loc2c_error): Correct vasprintf ignored-rc warning.
* 2007-01-12 David Smith <dsmith@redhat.com>dsmith2007-01-121-0/+24
| | | | | | | | * tapsets.cxx (dwarf_var_expanding_copy_visitor::visit_target_symbol): Since array behavior has changed (setting to 0 no longer deletes the array element), we delete the internal counter array element when providing target variable access in return probes.
* 2006-12-29 Frank Ch. Eigler <fche@elastic.org>fche2006-12-301-0/+5
| | | | | | | * tapsets.cxx (*group:emit_module_init): flush stdout less for timing mode. Also, Set probe_point variable ... * translate.cxx (emit_module_init): ... so on registration failure, a usable error message can be generated.
* 2006-12-29 Frank Ch. Eigler <fche@redhat.com>fche2006-12-301-60/+21
| | | | | | | | | | | | | | | PR 3523. * tapsets.cxx (common_probe_entryfn_prologue,epilogue): Restore support for -t (benchmarking) mode. * translate.cxx (emit_common_header,emit_module_init):Ditto. (emit_module_exit,emit_probe): Ditto, with most meat here. 2006-12-29 Frank Ch. Eigler <fche@redhat.com> PR 3523. * buildok/fourteen.stp, fourteen-plus.stp: Tweak & add a test. * systemtap.base/bench.stp: Work around randomized-ordered probes. * systemtap.base/bench.exp: Tighten output requirements.
* 2006-12-19 Frank Ch. Eigler <fche@redhat.com>fche2006-12-191-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 3522. * tapsets.cxx (dwflpp::emit_address): Call _stp_module_relocate only once per session. Error message cleanup: duplicate elimination etc. * session.h (saved_errors): Store a set of 'em. (num_errors): Return set size. Remove old numeric field. Update all callers. * elaborate.cxx (systemtap_session::print_errors): Print each encountered message just once. * staptree (semantic_error): Make msg2 writeable. Add a chain field. * tapsets.cxx (*var_expanding*:visit_target_symbol): Set saved semantic_error's chain field. * elaborate.cxx (register_library_aliases, visit_foreach_loop, visit_functioncall, derive_probes): Plop "while: ..." error message prefix/suffix right into the semantic_error message string. * parse.cxx (lexer::scan): Identify erroneous token better in error message for unresolvable $N/@M command line args. * util.h (lex_cast_hex): Use std::hex, not std::ios::hex. 2006-12-19 Frank Ch. Eigler <fche@redhat.com> PR 3522. * buildok/twentyfive.stp: New test for static $var access.
* 2006-12-16 Frank Ch. Eigler <fche@elastic.org>fche2006-12-161-1/+1
| | | | | | * main.cxx (main): Print version strings if verbose >=2 . * tapsets.cxx (common_probe_entryfn_prologue): Decorate an emitted local with __restrict__.
* 2006-12-14 David Smith <dsmith@redhat.com>dsmith2006-12-141-0/+21
| | | | | | | | | * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added 'return_ts_map' member variable. (dwarf_var_expanding_copy_visitor::visit_target_symbol): Optimization. If we've already seen this target variable in this return probe, return the last replacement (instead of creating a new replacement).
* 2006-12-13 David Smith <dsmith@redhat.com>dsmith2006-12-131-67/+116
| | | | | | | | | | | | | * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added 'add_probe' member variable. Initialized it in ctor. (dwarf_var_expanding_copy_visitor::visit_target_symbol): Optimization. Instead of generating one entry probe per target variable accessed in a return probe, now just generates one entry probe for all target variables accessed in a particular return probe. It does this by creating a new probe in the new 'add_probe' member variable. (dwarf_derived_probe::dwarf_derived_probe): If add_probe isn't NULL, make sure it gets derived later.
* 2006-12-07 Josh Stone <joshua.i.stone@intel.com>jistone2006-12-081-4/+21
| | | | | | | | | | | | | | | | | | | | | | | PR 3624. * tapsets.cxx (struct be_derived_probe): Add a new priority parameter for begin/end probes, and a comparison function for sorting. (be_builder::build): Parse the priority & pass it to be_derived_probe. (be_derived_probe_group::emit_module_init, emit_module_exit): Sort the probe list by priority before emitting any code. (register_standard_tapsets): Add new begin/end variants. * parse.cxx (parser::parse_literal): Allow negative numeric literals, by checking for a '-' unary operator right before a number. testsuite/ * systemtap.base/be_order.exp, systemtap.base/be_order.stp, semok/beginend.stp: New tests for begin/end priorities. * lib/stap_run.exp: Anchor OUTPUT_CHECK_STRING to the end of output. * systemtap.base/maxactive.exp: Fix to compare output to the end. * systemtap.base/probefunc.exp: Ditto. * systemtap.samples/ioblocktest.exp: Ditto. * systemtap.samples/ioblocktest.stp: Ditto. * systemtap.samples/tcptest.exp: Ditto.
* 2006-12-06 Josh Stone <joshua.i.stone@intel.com>jistone2006-12-071-12/+31
| | | | | | | | | | | | | | | | | | | | | PR 3623. * tapsets.cxx (timer_derived_probe_group::emit_module_decls): Restart the timers if we are in STARTING or RUNNING state. (hrtimer_derived_probe_group::emit_module_decls): Ditto. (be_derived_probe_group::emit_module_init): indicate error to the rest of the initialization if any begin probes fail. * translate.cxx (c_unparser::emit_module_init): Set the global error state on an initialization error so timers know to shut down. runtime/ * time.c (stp_timer_reregister): Add a global to control whether the gettimeofday timer should restart itself, for clean shutdown. (__stp_time_timer_callback): Check the global. (_stp_kill_time, _stp_init_time): Set the global. (_stp_gettimeofday_ns): Switch to preempt_enable_no_resched. * time.c (__stp_time_cpufreq_callback): Use the cpu# from the notifier. (_stp_init_time): No need to disable preemption around cpufreq init.
* * thanks to riel and viro, cleared up task_struct vs thread_info ↵fche2006-12-011-1/+1
| | | | misunderstanding
* 2006-11-30 Frank Ch. Eigler <fche@elastic.org>fche2006-11-301-3/+5
| | | | | * tapsets.cxx (common_probe_entryfn_prologue): Tweak insufficient stack detection logic.
* 2006-11-29 David Smith <dsmith@redhat.com>dsmith2006-11-291-28/+110
| | | | | | | | | | | | | * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added 'add_block' member variable. Constructor sets it to NULL. (dwarf_var_expanding_copy_visitor::visit_target_symbol): Fixes the problem of accessing a cached target variable in a loop. Cached target variable is assigned to a temporary variable, which can be safely access multiple times. In addition, the cached value is deleted after being read. (dwarf_derived_probe::dwarf_derived_probe): Adds in the new block of code created in visit_target_symbol() to the beginning of the derived probe.
* 2006-11-28 David Smith <dsmith@redhat.com>dsmith2006-11-281-11/+16
| | | | | | | * tapsets.cxx (dwarf_var_expanding_copy_visitor::visit_target_symbol): Improved handling target variables in return probes by having a per-thread counter.
* 2006-11-26 Frank Ch. Eigler <fche@redhat.com>fche2006-11-261-3/+72
| | | | | | | | | | | | PRs 2685, 3596, toward 2725. * tapsets.cxx (common_probe_entryfn_prologue): Skip probe on insufficient stack. (build_blacklist): Add a slew of lock-related calls. (query_module): Check for debuginfo architecture match. * translate.cxx (translate_pass): Add default MINSTACKSPACE. * configure.ac: Link stap with -lebl too. * configure: Regenerated. * stap.1.in: Document MINSTACKSPACE parameter.
* 2006-11-20 David Smith <dsmith@redhat.com>dsmith2006-11-201-1/+117
| | | | | | | | * tapsets.cxx (dwarf_var_expanding_copy_visitor::visit_target_symbol): BZ 1382. Target variables can be accessed in return probes. A new function entry probe is generated that saves the target variables so that they can be accesssed in the return probe.
* 2006-11-17 Frank Ch. Eigler <fche@redhat.com>fche2006-11-171-5/+8
| | | | | | | | | | | | | * tapsets.cxx (d_v_e_c_v::visit_target_symbol): Restore lost exception-saving functionality that improves error messages for incorrect $target expressions. (translate_components): Systematize error messages somewhat. * translate.cxx (emit_function, emit_probe): Clarify "array locals" error message. 2006-11-17 Frank Ch. Eigler <fche@redhat.com> * semko/thirtysix.stp, transko/three.stp: New tests.
* 2006-11-10 David Smith <dsmith@redhat.com>dsmith2006-11-101-7/+7
| | | | | | | * tapsets.cxx (dwarf_var_expanding_copy_visitor::visit_target_symbol): Minor improvement to error handling by throwing exceptions before allocations are done.
* 2006-11-09 David Smith <dsmith@redhat.com>dsmith2006-11-091-5/+31
| | | | | | | | | | | | * tapsets.cxx (dwarf_query::dwarf_query): Looks for "maxactive" return probe variant. (dwarf_derived_probe::dwarf_derived_probe): Initializes has_maxactive and maxactive_val member variables. (dwarf_derived_probe::register_function_variants): Matches "maxactive" return probe variant. (dwarf_derived_probe_group::emit_module_decls): Emits code to use maxactive data. (dwarf_derived_probe_group::emit_module_init): Ditto.
* 2006-11-08 Frank Ch. Eigler <fche@elastic.org>fche2006-11-081-44/+1
| | | | | | * util.h (lex_cast_qstring): Move def'n here. Also quote \. (stringify, lex_cast, lex_cast_hex): Move defn here. * buildrun.cxx, elaborate.cxx, main.cxx, staptree.cxx: Adapt.
* 2006-11-07 Frank Ch. Eigler <fche@elastic.org>fche2006-11-071-0/+1
| | | | | * tapsets.cxx (profile_derived_probe_group::emit_module_decls): Pass along incoming pt_regs to context of timer.profile handlers.
* 2006-11-03 Frank Ch. Eigler <fche@elastic.org>fche2006-11-031-6/+18
| | | | | * tapsets.cxx (emit_address): Emit calls to _stp_module_relocate for $target-variable addresses in relocatable sections.
* New dynamic module and symbol handling code.hunt2006-11-021-53/+1
|
* Fix an indentation glitch.jistone2006-11-011-1/+1
|