summaryrefslogtreecommitdiffstats
path: root/translate.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 2007-06-14 Frank Ch. Eigler <fche@elastic.org>fche2007-06-141-1/+5
| | | | | | | * translate.cxx (emit_module_init): Emit translator/elfutils version numbers together. * main.cxx (version): Ditto. (main): Skip printing tapset directories where no sources were found.
* 2007-05-21 David Smith <dsmith@redhat.com>dsmith2007-05-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2007-05-02 David Smith <dsmith@redhat.com>dsmith2007-05-021-6/+15
| | | | | | | * translate.cxx (c_tmpcounter::visit_functioncall): Updated temporary handling. (c_unparser::visit_functioncall): No longer copies numeric and string constants to temporary variables.
* 2007-05-01 David Smith <dsmith@redhat.com>dsmith2007-05-011-11/+27
| | | | | | | | | | * translate.cxx (c_tmpcounter::visit_binary_expression): Updated temporary handling. (c_unparser::visit_binary_expression): Improved handing of numeric constants when handling '%' and '/' operators. (c_tmpcounter::visit_print_format): Updated temporary handling. (c_unparser::visit_print_format): Removed the need for a result temporary when printing to a stream.
* 2007-04-30 David Smith <dsmith@redhat.com>dsmith2007-04-301-31/+13
| | | | | | | | | PR 2339 * translate.cxx (c_unparser_assignment::c_assignop): Improved handling of numeric constants in the rest of the assignment operators. (c_tmpcounter_assignment::c_assignop): Updated temporary handling.
* 2007-04-25 David Smith <dsmith@redhat.com>dsmith2007-04-251-131/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 2339 * translate.cxx: Renamed "qname" to "value" throughout, since there are times now when qname would refer to a constant value. (tmpvar::override): Added function to allow for overriding a temporary variable name with a string. (tmpvar::value): New function that returns either the overridden string or the temporary variable name. (c_unparser::c_expression): New function. (c_unparser_assignment::c_assignop): Speed up assignment when numeric or string constants are used. (c_tmpcounter::visit_block): Avoid empty structs inside the union of temporary variables. (c_tmpcounter_assignment::prepare_rvalue): New function. (c_tmpcounter_assignment::c_assignop): New function. (c_tmpcounter_assignment::visit_symbol): Update temporary declarations. (c_unparser_assignment::prepare_rvalue): Speed up use of rvalues by using numeric and string constants directly instead of copying them to temporaries first. (c_tmpcounter::load_map_indices): New function. (c_unparser::load_map_indices): Speed up use of numeric and string constants as map indices. (c_tmpcounter::visit_arrayindex): Updated temporary declarations. (c_tmpcounter_assignment::visit_arrayindex): Updated temporary declarations. * translate.h (class translator_output): Added tellp() and seekp() functions.
* 2007-04-04 Frank Ch. Eigler <fche@elastic.org>fche2007-04-041-0/+1
| | | | | | GCC 4.3 compatibility patches from Debian. * buildrun.cxx, hash.cxx, tapsets.cxx, translate.cxx: #include a few more C++ headers.
* 2007-03-30 David Smith <dsmith@redhat.com>dsmith2007-03-301-4/+36
| | | | | | | | | | | PR 2341 * translate.cxx (c_unparser::emit_locks): No longer emits a read lock for global variables that are only written to in begin/end probes. (c_unparser::emit_unlocks): Ditto. (translate_pass): Runs a varuse_collecting_visitor over probes that need global variable locks for use in emit_locks()/emit_unlocks().
* * tweak wordagefche2007-03-291-1/+2
|
* 2007-03-28 David Smith <dsmith@redhat.com>dsmith2007-03-281-3/+12
| | | | | | | | | | | | | | | | | | | | 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-21 David Smith <dsmith@redhat.com>dsmith2007-03-211-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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-2/+6
| | | | | | | | | | 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-16 David Smith <dsmith@redhat.com>dsmith2007-03-161-1/+19
| | | | | | | | | | | | | | | | 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-14 Martin Hunt <hunt@redhat.com>hunt2007-03-141-10/+5
| | | | | | | | | | | | | | | * Makefile.am (staprun_SOURCES): Sources now live in runtime/staprun. * makefile.in: Rebuilt. * staprun.8.in: Updated. * buildrun.cxx (run_pass): Use "-v" instead of not "-q" to be compatible with latest staprun. * translate.cxx (emit_module_exit): Print warning using _stp_printf so it shows up at the end of all output. (translate_pass): Replace STP_RELAYFS with STP_BULKMODE. Eliminate STP_RELAYFS_MERGE.
* more warning elisionfche2007-02-231-11/+4
|
* 2007-02-19 Frank Ch. Eigler <fche@elastic.org>fche2007-02-191-3/+3
| | | | | | | | | 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-17 Frank Ch. Eigler <fche@elastic.org>fche2007-02-171-24/+39
| | | | | | | PR 4066. * translate.cxx (var::init): Check stat scalar initialization, just like is done for arrays. (emit_module_exit): Check unlikely but possible null timing stat.
* 2007-01-31 Martin Hunt <hunt@redhat.com>hunt2007-01-311-11/+2
| | | | | * translate.cxx (translate_pass): Remove old string impedance mismatch stuff. Modify included files.
* 2007-01-29 Frank Ch. Eigler <fche@elastic.org>fche2007-01-291-5/+5
| | | | * translate.cxx (emit_module_init): Add some more type casts to printk args.
* 2007-01-29 Martin Hunt <hunt@redhat.com>hunt2007-01-291-16/+19
| | | | | * translate.cxx (emit_module_init): BZ3888. Add memory usage for the runtime to the printk.
* 2007-01-22 Martin Hunt <hunt@redhat.com>hunt2007-01-221-4/+3
| | | | | | * translate.cxx (mapvar::exists): Use new _stp_map_exists function. Testing for zero is no longer correct after changes from 2007-01-10 below.
* 2007-01-18 Frank Ch. Eigler <fche@elastic.org>fche2007-01-181-1/+16
| | | | | | * main.cxx (version): Add (C) 2007. * translate.cxx (emit_module_init): Add a KERN_DEBUG printk at module startup time to aid debugging and auditing.
* 2007-01-10 Martin Hunt <hunt@redhat.com>hunt2007-01-101-7/+2
| | | | | * translate.cxx (mapvar::del): Call the new _stp_map_del function instead of setting to zero.
* 2006-12-29 Frank Ch. Eigler <fche@elastic.org>fche2006-12-301-2/+3
| | | | | | | * 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-20/+79
| | | | | | | | | | | | | | | 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-21 Josh Stone <joshua.i.stone@intel.com>jistone2006-12-221-6/+23
| | | | | | | | | | | | | | | | | PR 3671 * parse.cxx (parser::parse_global): Allow a maxsize on global arrays. * staptree.h (struct vardecl): Add the maxsize field. * staptree.cxx (vardecl::vardecl): Init. maxsize. (vardecl::set_arity): Don't allow arity 0 when there's a maxsize. (vardecl::compatible_arity): Ditto. (vardecl::print): Include maxsize in output. (target_symbol::print): Ditto. * translate.cxx (struct mapvar, mapvar::mapvar): Add maxsize. (mapvar::init): Init maps with the given maxsize if specified, else keep using MAXMAPENTRIES. (mapvar::set): Make the error message give the maxsize. (mapvar::add): Ditto, and check for overflow on pmap add. (c_unparser::getmap): Pass the maxsize from the vardecl to mapvar.
* 2006-12-19 Frank Ch. Eigler <fche@redhat.com>fche2006-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-08 Josh Stone <joshua.i.stone@intel.com>jistone2006-12-091-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR 3681. * staptree.h (struct vardecl): Add a literal 'init' member for the initialization value of globals. * staptree.cxx (vardecl::vardecl): Initialize 'init' to NULL. (vardecl::print): Print global init value during pass-1 output. * main.cxx (printscript): Print global init values during verbose pass-2 output. * parse.cxx (parser::parse_global): Set the initialization literal of global vardecls. * translate.cxx (var::init): Don't unconditionally override the value of numeric globals when the module_param isn't used. (c_unparser::emit_global_param): Write numeric module_params directly into the global variable, as an int64_t instead of long. (c_unparser::emit_global): Add initialization to global declarations. Don't create a temp module_param long for numeric globals anymore. runtime/ * runtime.h (param_set_int64_t, param_get_int64_t, param_check_int64_t): New functions to allow taking module parameters directly as int64_t values. testsuite/ * systemtap.base/global_init.exp, systemtap.base/global_init.stp: New test for checking the timeliness of global initialization.
* 2006-12-06 Josh Stone <joshua.i.stone@intel.com>jistone2006-12-071-1/+3
| | | | | | | | | | | | | | | | | | | | | 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.
* 2006-11-26 Frank Ch. Eigler <fche@redhat.com>fche2006-11-261-0/+3
| | | | | | | | | | | | 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-21 Frank Ch. Eigler <fche@elastic.org>fche2006-11-211-6/+21
| | | | * translate.cxx (emit_module_init): Adapt to 2.6.19 utsname().
* 2006-11-21 Frank Ch. Eigler <fche@elastic.org>fche2006-11-211-0/+25
| | | | | | PR 3556. * translate.cxx (emit_module_init): Emit code to check system_utsname against translate-time version/machine strings.
* 2006-11-17 Frank Ch. Eigler <fche@redhat.com>fche2006-11-171-2/+4
| | | | | | | | | | | | | * 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-08 Frank Ch. Eigler <fche@elastic.org>fche2006-11-081-1/+2
| | | | | | | * staptree.cxx (print_format::components_to_string): Quote ". (c_unparser::visit_print_format): Don't use lex_cast_qstring as it overdoes \ quoting. Resemble ::visit_literal_string instead.
* 2006-11-08 Frank Ch. Eigler <fche@elastic.org>fche2006-11-081-33/+6
| | | | | | * 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-06 Martin Hunt <hunt@redhat.com>hunt2006-11-061-16/+9
| | | | | * translate.cxx (var::init): Check for errors when allocating arrays of stats, as well as other arrays.
* 2006-11-06 David Smith <dsmith@redhat.com>dsmith2006-11-061-9/+98
| | | | | | | | | | | | | | | | | | | | | | | Added "limit EXP" support to foreach statements. * translate.cxx (c_tmpcounter::visit_foreach_loop): Handles "limit" member variable. (c_unparser::visit_foreach_loop): Ditto. * staptree.cxx (foreach_loop::print): Prints "limit EXP" addition. (traversing_visitor::visit_foreach_loop): Handles "limit" member variable. (deep_copy_visitor::visit_foreach_loop): Ditto. * staptree.h (struct foreach_loop): Added "limit" member variable. * stap.1.in: Added documentation for the "limit EXP" addition to foreach statement. * parse.cxx (lexer::scan): Added "limit" keyword for foreach statements. (parser::parse_foreach_loop): Parses "limit" keyword for foreach statements. * elaborate.cxx (symresolution_info::visit_foreach_loop): Handles "limit" member variable. (typeresolution_info::visit_foreach_loop): Ditto.
* New dynamic module and symbol handling code.hunt2006-11-021-3/+10
|
* 2006-11-01 <dsmith@redhat.com>dsmith2006-11-011-1/+10
| | | | | | | | | | | | | | * translate.cxx (delete_statement_operand_visitor::visit_symbol): Added referent assert. (delete_statement_operand_tmp_visitor::visit_arrayindex): Ditto. (c_tmpcounter::visit_array_in): Ditto. (c_unparser::visit_symbol): Ditto. (c_unparser_assignment::visit_symbol): Ditto. (c_unparser::load_map_indices): Ditto. (c_tmpcounter::visit_arrayindex): Ditto. (c_tmpcounter_assignment::visit_arrayindex): Ditto. (c_tmpcounter::visit_functioncall): Ditto. (c_unparser::visit_functioncall): Ditto.
* 2006-10-31 Frank Ch. Eigler <fche@redhat.com>fche2006-11-011-40/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Probe registration rework. Offline dwarf processing for better cross-instrumentation. * elaborate.h (derived_probe): Remove registration-related code generation API. Add new function sole_location(). (derived_probe_group): Reworked this and associated classes. * session.h (systemntap_session): Create individual per-category derived_probe_groups. * elaborate.cxx (derived_probe_group): Reworked. (alias_derived_probe): Switch to new derived_probe API. (semantic_pass_symbols): Ditto. * translate.cxx (mapvar init): Check for array initialization error. (emit_module_init): Handle such failures, at least in theory. (emit_module_exit): Switch to new derived_probe_group API. Call cpu_relax() during shutdown busywait. (emit_common_header): Elide context variables for elided handler fns. (c_unparser::emit_probe): Implement new, improved duplicate elimination technique for probe handlers. Leave two older ones behind as compile options for education. * tapsets.cxx (*): Reworked all probe registration code, moving it from derived_probes into derived_probe_groups. Shrunk output code. Temporarily disabled probe timing and perfmon/mark probes. (dwflpp): Use offline reporting, so that module matching and relocation is performed at run time. (dwarf_query): Remove flavour logic, now supplanted by other duplicate elimination code. (dwarf_derived_probe): Reworked construction, centralized module/section/offset computations. * tapsets.h (all_session_groups): New little helper. * main.cxx (main): For pass-2 message, print number of embeds too. * systemtap.spec.in: Add a "BuildRequires: dejagnu" for make check. * configure.ac: Bump version to 0.5.11. * configure: Regenerated.
* 2006-10-12 Martin Hunt <hunt@redhat.com>hunt2006-10-121-2/+4
| | | | | | | | | | | * translate.cxx (emit_common_header): Add a kretprobe_instance pointer to struct context. (emit_symbol_data): Include absolute symbols. * tapsets.cxx (emit_common_header): Initialize the kprobe instance pointer to 0; (emit_probe_entries): Set kretprobe instance pointer if appropriate.
* 2006-09-18 Martin Hunt <hunt@redhat.com>hunt2006-09-181-1/+6
| | | | | | * buildrun.cxx (run_pass): Remove "-m" option to stpd. * translate.cxx (translate_pass): #define STP_RELAYFS_MERGE if appropriate.
* Systemtap perfmon support to access the processors perfmon hardware.wcohen2006-09-121-0/+3
|
* 2006-09-08 David Smith <dsmith@redhat.com>dsmith2006-09-081-99/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elaborate.h (struct derived_probe): Replace emit_registrations() function with emit_registrations_start() and emit_registrations_end(). (struct derived_probe_group): Added emit_module_init(). (struct derived_probe_group_container): Added emit_module_init(), emit_module_init_call(), and emit_module_exit(). * elaborate.cxx (struct alias_derived_probe): Updated emit_regitrations calls. * translate.cxx (emit_module_init): Instead of actually emitting per-probe-point registrations/unregistrations, let the session's derived_probe_group_container do it. * tapsets.cxx (emit_probe_timing): New function that handles probe timing code. (be_derived_probe::emit_registrations_start): Renamed from emit_registrations. (be_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (dwarf_derived_probe::emit_registrations): Removed, but most code moved to emit_registrations_start(). (dwarf_derived_probe::emit_registrations_start): Handles details of multiple dwarf probe registrations. (dwarf_derived_probe::emit_registrations_end): Handles cleanup details of multiple dwarf probe registrations. (dwarf_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (timer_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (timer_derived_probe::emit_registrations_end): Handles cleanup details of multiple probe registrations. (timer_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (profile_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (profile_derived_probe::emit_registrations_end): Handles cleanup details of multiple probe registrations. (profile_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (mark_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (mark_derived_probe::emit_registrations_end): Handles cleanup details of multiple probe registrations. (mark_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (hrtimer_derived_probe::emit_registrations_start): Renamed from emit_registrations. Added mutiple probe handling. (hrtimer_derived_probe::emit_registrations_end): Dummy function. (hrtimer_derived_probe_group::emit_module_init): New function that outputs probes create and destroy functions. (derived_probe_group_container::emit_module_init): Added function to call all probe group's emit_module_int functions. (derived_probe_group_container::emit_module_init_call): Added function to handle probe group initialization cleanup. (derived_probe_group_container::emit_module_exit): Added function to handle probe group cleanup.
* 2006-08-28 David Smith <dsmith@redhat.com>dsmith2006-08-281-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * translate.cxx: Added inclusion of session.h. (translate_pass): Instead of asking each probe to emit itself, we ask the session's probes member variable to emit all the probes. * tapsets.cxx: Added inclusion of session.h. Added a register_probe member function to all derived_probe based classes. Added a derived_probe_group derived class for all probe types: (be_derived_probe_group): New class. (never_derived_probe_group): New class. (dwarf_derived_probe_group): New class. (timer_derived_probe_group): New class. (profile_derived_probe_group): New class. (mark_derived_probe_group): New class. (hrtimer_derived_probe_group): New class (derived_probe_group_container): New class. * elaborate.h: Removed inclusion of session.h since session.h now includes elaborate.h. (derived_probe): Added register_probe member function. (derived_probe_group): Added class definition. This is the base class of all of the derived probe groups - dwarf, timer, etc. (derived_probe_group_container): Added class definition. An instance of this class will be stored in the session and contain all the other probe groups. * elaborate.cxx (derived_probe_group::register_probe): Added derived_probe_group::register_probe stubs. (alias_derived_probe::register_probe): Added register_probe member function. (semantic_pass_symbols): After deriving a probe, the probes now register themselves with the session. * session.h: Includes elaborate.h to get derived_probe_group_container definition. systemtap_session class 'probes' member variable switched from a vector of derived probes to a derived_probe_group_container. * buildrun.cxx: Added inclusion of session.h since it was removed from elaborate.h. * main.cxx: Added inclusion of session.h since it was removed from elaborate.h. * parse.h: Added forward struct declarations. * staptree.h: Removed inclusion of session.h.
* 2006-08-10 David Smith <dsmith@redhat.com>dsmith2006-08-101-29/+58
| | | | | | | | | | | | * elaborate.cxx (duplicate_function_remover): Added class. (get_functionsig): Added function. (semantic_pass_opt5): New function merges duplicate identical functions into one function. (semantic_pass_optimize): Calls semantic_pass_opt5. * translate.cxx (c_unparser::emit_probe): Changed to merge duplicate probes bodies by making the duplicate probe just call the original probe (BZ# 2421).
* Revert my former changes to lket_trace_extra() in translator.guanglei2006-06-091-4/+1
| | | | | a new way of allowing user add arbitrary trace data. And also provide a way of letting user write the trace data format.
* 2006-06-02 Frank Ch. Eigler <fche@elastic.org>fche2006-06-021-1/+1
| | | | | | | | | | | | | | PR 2645. * stapprobes.5.in: Document "?" probe point suffix. * parse.cxx (parse_probe_point): Recognize "?" optional suffix. * elaborate.cxx (derive_probes): Observe probe_point->optional. * staptree.h, staptree.cxx: Corresponding changes. * tapsets.cxx (never_derived_probe, never_builder): New classes. (register_standard_tapsets): Support "never" probe point. * testsuite/buildok/six.stp, parseok/five.stp: Modifed tests. * translate.cxx (emit_module_init): Format "-t" (benchmarking) cycle-time reports similarly to "-v" (verbose) times.
* make user able to append extra trace data. The way of logging backtrace is ↵guanglei2006-06-011-1/+4
| | | | | | | | also changed. lket_trace_extra() and lket_backtrace() are introduced for these two purpose. I also modified lket.5.in for the backtrace changes