summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 2007-11-15 David Smith <dsmith@redhat.com>dsmith2007-11-151-13/+9
| | | | | | | | | | | * tapsets.cxx (mark_derived_probe::initialize_probe_context_vars): Updated to work with latest LTTNG patch patch-2.6.24-rc2-lttng-0.10-pre23.tar.bz2. (mark_derived_probe_group::emit_module_decls): Ditto. (mark_derived_probe_group::emit_module_init): Ditto. (mark_derived_probe_group::emit_module_exit): Ditto. * translate.cxx (c_unparser::emit_common_header): Ditto.
* 2007-11-15 David Smith <dsmith@redhat.com>dsmith2007-11-151-322/+63
| | | | | | | | | | | | | | * tapsets.cxx: Removed mark_query structure. (mark_derived_probe::mark_derived_probe): Just looks for "kernel" marker probes. (mark_builder::build_no_more): No longer kern_dw, instead clears the marker cache. (mark_builder::build): Now parses Module.markers file to find marker list and stores them in a cache. (register_standard_tapsets): Removed 'module("foo").mark("bar")'. All markers now go through 'kernel.mark("bar")'. * stapprobes.5.in (parts): Updated marker text.
* 2007-11-12 Martin Hunt <hunt@redhat.com>hunt2007-11-121-0/+1
| | | | * tapsets.cxx (build_blacklist): Add __raw_spin_is_locked.
* 2007-10-15 David Smith <dsmith@redhat.com>dsmith2007-10-151-2/+7
| | | | | | | * tapsets.cxx (mark_query::handle_query_module): Checks for marker to be in the proper section. (mark_derived_probe_group::emit_module_decls): Updated emitted marker C code for 10/2/2007 markers patch. Fixes PR 5178.
* 2007-10-15 David Smith <dsmith@redhat.com>dsmith2007-10-151-8/+8
| | | | | | From David Wilder <dwilder@us.ibm.com> * tapsets.cxx (mark_query::handle_query_module): Updated to handle 64-bit platforms correctly.
* 2007-10-12 David Smith <dsmith@redhat.com>dsmith2007-10-121-84/+246
| | | | | | | | | * tapsets.cxx (dwflpp::setup): Added 'debuginfo_needed' parameter to not error if no debuginfo present. (hex_dump): New function. (mark_query::handle_query_module): Updated for 10/2/2007 markers patch. Currently only handles markers in the kernel image itself - not in modules.
* PR 5709kenistoj2007-10-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | * main.cxx: Add pass 4.5: make uprobes.ko in runtime/uprobes * buildrun.cxx: Add uprobes_enabled() and make_uprobes(). Factor run_make_cmd() out of compile_pass(). * buildrun.h: Add uprobes_enabled and make_uprobes decls. * tapsets.cxx: Do correct #include for modprobed uprobes.ko; set need_uprobes in pass 2. * session.h: Add need_uprobes * runtime/staprun/common.c: Add -u option -> need_uprobes * runtime/staprun/staprun_funcs.c: Generalize insert_module() to support inserting uprobes.ko. * runtime/staprun/staprun.c: Add enable_uprobes(). insert_module call becomes insert_stap_module(). * runtime/staprun/staprun.h: Reflect insert_module() and need_uprobes changes * runtime/uprobes/*.[c,h]: uprobes is built as a module, rather than included into the source of the stap-generated module. * runtime/uprobes/Makefile: Added
* 2007-10-02 Frank Ch. Eigler <fche@redhat.com>fche2007-10-021-37/+86
| | | | | | | | | | | | | | | | | | | PR 5078 * tapsets.cxx (be_derived_probe): Rework to add error probe support. Emit probe description array in C for traversal by generated code. * register_standard_tapsets: Add error probes. * stapprobes.5.in: Document. * translate.cxx (emit_module_init): Handle errors that may occur during begin probes. (emit_module_exit): Use schedule() rather than cpu_relax() during shutdown synchronization wait loop. * staptree.cxx (probe::printsig): Put multiple probe points on same line. 2007-10-02 Frank Ch. Eigler <fche@redhat.com> PR 5078 * semok/twentysix.stp, systemtap.base/beginenderror.*: New tests.
* If uprobes isn't in the kernel, pull it in from the runtime.kenistoj2007-09-281-5/+6
|
* 2007-09-25 David Smith <dsmith@redhat.com>dsmith2007-09-251-8/+52
| | | | | | | | | * tapsets.cxx (mark_query::handle_query_module): Updated for 9/18/2007 markers patch. (mark_derived_probe::parse_probe_sig): Ditto. (mark_derived_probe_group::emit_module_decls): Ditto. (mark_derived_probe_group::emit_module_init): Ditto. (mark_derived_probe_group::emit_module_exit): Ditto.
* 2007-09-17 David Smith <dsmith@redhat.com>dsmith2007-09-171-0/+32
| | | | * tapsets.cxx (procfs_builder::build): Validate procfs path.
* 2007-09-14 David Smith <dsmith@redhat.com>dsmith2007-09-141-1/+3
| | | | | | | | | PR 1154 * tapsets.cxx (procfs_var_expanding_copy_visitor::visit_target_symbol): Disallows reading from $value in a procfs read probe. (procfs_derived_probe_group::emit_module_init): Updated previous fix.
* 2007-09-14 David Smith <dsmith@redhat.com>dsmith2007-09-141-9/+21
| | | | | | | PR 1154 * tapsets.cxx (procfs_derived_probe_group::emit_module_init): Fixed problem where if only one type (read/write) of procfs probe was defined, the generated code wouldn't compile.
* 2007-09-13 David Smith <dsmith@redhat.com>dsmith2007-09-131-18/+40
| | | | | | | | | | PR 1154 * tapsets.cxx (procfs_derived_probe::procfs_derived_probe): Removed debug print. (procfs_derived_probe_group::emit_module_decls): Improved error handling and added support for procfs.write probes. (procfs_var_expanding_copy_visitor::visit_target_symbol): Removed debug print.
* 2007-09-12 David Smith <dsmith@redhat.com>dsmith2007-09-121-37/+293
| | | | | | * translate.cxx (c_unparser::emit_common_header): Added 'data' variable to context structure to support procfs probes. * tapsets.cxx: Improved procfs probe handling.
* 2007-09-10 David Smith <dsmith@redhat.com>dsmith2007-09-101-32/+73
| | | | | | | | * tapsets.cxx (procfs_derived_probe_group::emit_module_init): Improved procfs probe handling (still non-working). (procfs_builder::build): Ditto. (register_standard_tapsets): Ditto. (all_session_groups): Ditto.
* 2007-09-10 Martin Hunt <hunt@redhat.com>hunt2007-09-101-0/+97
| | | | | * tapsets.cxx, session.h, elaborate.cxx: Start of procfs interaction support. PR 1154.
* 2007-09-06 Masami Hiramatsu <mhiramat@redhat.com>hiramatu2007-09-061-1/+4
| | | | | | | | PR4542 * tapsets.cxx (dwarf_query::build_blacklist): add __switch_to to blacklisted_return_probes on i686 * systemtap.stress/current.stp: Don't probe the return of __switch_to on i686
* 2007-08-24 Frank Ch. Eigler <fche@redhat.com>fche2007-08-241-37/+95
| | | | | | | | | | | | | | | | PR 4899 * tapsets.cxx (dwflpp::has_single_line_record): Extended, abstraction violated. (iterate_over_srcfile_lines): Remove exactly line number match logic. Improve error message to offered better-checked alternative line numbers. (query_srcfile_line): Whoops, pass scope_die down for statement("...") probes, to enable $target var processing. 2007-08-24 Frank Ch. Eigler <fche@redhat.com> PR 4899 * buildok/fortytwo.stp: New test.
* 2007-08-10 Josh Stone <joshua.i.stone@intel.com>jistone2007-08-111-3/+0
| | | | | | | | | | | | | | | | | | | PR 4593 * translate.cxx (c_unparser::emit_common_header): Add an error_buffer to the context to allow dynamic error messages. * tapsets.cxx (dwflpp::express_as_string): Let deref / store_deref fill in last_error with a detailed message. runtime/ * loc2c-runtime.h (deref, store_deref): Set an error message with the pointer value and name into last_error, since it's hard to determine the details once you've already jumped to deref_fault. tapset/ * conversions.stp (kernel_string, kernel_long, kernel_int, kernel_short, kernel_char, user_string_warn): Use the CONTEXT->error_buffer to create an error message instead of a static local array.
* 2007-05-25 Frank Ch. Eigler <fche@redhat.com>fche2007-05-261-8/+187
| | | | | | | | | | | | PR 4255 teaser. * elaborate.cxx (has_null_param): New function. * elaborate.h: Declare it. * session.h: Include uprobe_derived_probes group. * tapsets.cxx (uprobe_*): New classes. (all_session_groups): List uprobes in list. (register_standard_tapset): Interpret process(#).statement(#).absolute and process(#).statement(#).absolute.return probe points.
* 2007-05-25 Martin Hunt <hunt@redhat.com>hunt2007-05-251-0/+1
| | | | | Patch from Quentin Barnes. * tapsets.cxx (query_module): Add support for arm.
* 2007-05-21 David Smith <dsmith@redhat.com>dsmith2007-05-211-409/+561
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 4446. * elaborate.h (derived_probe::initialize_probe_context_vars): New virtual function that will allow added context vars to be initialized. * translate.cxx (c_unparser::emit_common_header): Added 'mark_va_list'. (c_unparser::emit_probe): Calls new function initialize_probe_context_vars. (translate_pass): Includes linux/marker.h if CONFIG_MARKERS is defined. * tapsets.cxx (struct dwarf_query): Split into base_query (which contains most of the original code) and a much smaller dwarf_query class. (struct base_query): New class. (dwarf_query::handle_query_module): New function. (query_module): Moved code into dwarf_query::handle_query_module(). (mark_derived_probe): Adjusted for new kernel markers. (mark_derived_probe_group): Ditto. (mark_var_expanding_copy_visitor): Ditto. (mark_var_expanding_copy_visitor::visit_target_symbol): Generates code for new kernel markers. (struct mark_query): New class. (mark_query::handle_query_module): New function. (mark_derived_probe::mark_derived_probe): Adjusted for new kernel markers. (mark_derived_probe::join_group): Ditto. (mark_derived_probe::emit_probe_context_vars): Ditto. (mark_derived_probe::parse_probe_sig): New function. (mark_derived_probe::initialize_probe_context_vars): New function. (mark_derived_probe::emit_module_decls): Adjust for new kernel markers. (mark_derived_probe::emit_module_init): Ditto. (mark_derived_probe::emit_module_exit): Ditto. (struct mark_builder): Ditto. (mark_builder::build): Ditto.
* 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.