summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
* ha ha haFrank Ch. Eigler2008-06-111-1/+1
|
* duplicate warning thinko foxFrank Ch. Eigler2008-06-111-2/+2
|
* Eliminate duplicate warnings.Stan Cox2008-06-111-11/+23
|
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapFrank Ch. Eigler2008-05-211-0/+13
|\ | | | | | | | | | | * 'master' of ssh://sources.redhat.com/git/systemtap: Use pointer_arg to fetch arguments for syscall.utime and compat_utime. Optimize compound and binary expression assignments.
| * Optimize compound and binary expression assignments.Stan Cox2008-05-211-0/+13
| |
* | PR6538: fix treatment of initialized globalsFrank Ch. Eigler2008-05-211-1/+2
| |
* | PR6538: warn about read-only variablesFrank Ch. Eigler2008-05-201-3/+29
|/
* Optimize away assignments in other contexts.Stan Cox2008-05-191-0/+62
|
* suppress "pass-2 failed" messages from "stap -l FOOBAR"; just produce empty ↵Frank Ch. Eigler2008-05-171-6/+3
| | | | output
* PR5643: function caching for much faster syscall.* pass-2 processingFrank Ch. Eigler2008-05-161-1/+4
|
* PR6466: broad side-effect free statement elisionFrank Ch. Eigler2008-04-291-37/+143
|
* 2008-04-15 David Smith <dsmith@redhat.com>David Smith2008-04-161-0/+2
| | | | | | | | | | | | | | | | | | | * session.h (struct systemtap_session): Added utrace_derived_probe group and task_finder_derived_probe_group members. * elaborate.cxx (systemtap_session::systemtap_session): Added initialization of utrace_derived_probes and task_finder_derived_probes. * tapsets.cxx (struct task_finder_derived_probe_group): New derived_probe_group to handle task_finder framework. (struct utrace_derived_probe_group): New derived_probe_group to handle utrace probes. 2008-04-15 David Smith <dsmith@redhat.com> PR 5961 (partial) * task_finder.c (stap_start_task_finder): When an interesting thread is found that is already running, make sure to set up thread death notification.
* PR2949: listings mode (stap -l PROBE)Frank Ch. Eigler2008-04-101-0/+3
| | | | | | | | | | | | | | | | 2008-04-10 Frank Ch. Eigler <fche@elastic.org> PR 2949. * session.h (listing_mode): New field. * main.cxx (main): Test it. Enjoy it. (usage): Document it. * stap.1.in, stapex.5.in: Ditto. * elaborate.cxx (print_error): Disable error messages in listing mode. 2008-04-10 Frank Ch. Eigler <fche@elastic.org> PR 2949 * systemtap.base/cmd_parse.exp: Add "-l" listing test.
* 2008-03-10 Dave Brolley <brolley@redhat.com>brolley2008-03-101-1/+1
| | | | | | | | | | | | | | PR5189 * translate.cxx (probe_or_function_needs_deref_fault_handler): New member of c_unparser. (c_unparser::emit_function): Initialize probe_or_function_needs_deref_fault_handler. Check it after the body is visited and generate a deref fault handler if necessary. (c_unparser::emit_probe): Likewise. (c_unparser::visit_print_format): Correct the compoenent type for an overridden string literal. Generate code to check that pointer arguments to %m can be dereferenced. Generate casts for printf arguments as necessary. * elaborate.cxx (typeresolution_info::visit_print_format): Desired type for conv_memory is pe_long.
* PR5516: assignment to $pointersfche2008-03-031-8/+10
| | | | | | | | | | | | | | | | | | | | | 2008-03-03 Frank Ch. Eigler <fche@elastic.org> PR5516 * elaborate.cxx (symbol_fetcher, dead_assignment_remover): Support unresolved $target lvalues. Propagate pretty error messages. * staptree.cxx (varuse_collecting_visitor target_symbol): Ditto. * staptree.h: Corresponding decl. * loc2c.c: c_translate_pointer_store: New function. * loc2c.h: Corresponding decl. * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Call it for $target pointer assignments. 2008-03-03 Frank Ch. Eigler <fche@elastic.org> PR5516 * buildok/twentynine.stp: New test.
* PR5045: clean up after interruptsfche2008-02-281-0/+17
| | | | | | | | | | | 2008-02-28 Frank Ch. Eigler <fche@elastic.org> PR5045 * session.h (pending_interrupts): New global. * main.cxx (handle_interrupts): New fn to handle SIGINT* etc. * elaborate.cxx, translate.cxx, tapsets.cxx, main.cxx (*): Insert pending_interrupts escape hatches inside potentially timetaking loops. * buildrun.cxx: Don't deal with signals.
* 2008-02-21 Dave Brolley <brolley@redhat.com>brolley2008-02-271-14/+43
| | | | | | | | | | | | | | | | | | | | | | PR5189 * staptree.h (print_format::conv_memory): New enumerator. (print_format::width_type): New enumeration. (print_format::precision_type): New enumeration. (format_component::widthtype): New member. (format_component::prectype): New member. (format_component::is_empty): Test widthtype and prectype. (format_component::clear): Clear widthtype and prectype. * staptree.cxx (print_format::components_to_string): Handle dynamic width and precision. Handle conv_memory. (print_format::string_to_components): Parse dynamic width and precision specifiers. Set widthtype and prectype. Parse %m format specifier. * elaborate.h (typeresolution_info::check_arg_type): New method. * elaborate.cxx (typeresolution_info::visit_print_format): Account for dynamic width and precision when computing the expected number of arguments. Check the types of arguments for dynamic width and precision. Use check_arg_type to check the types of all arguments. Handle print_format::conv_memory. (typeresolution_info::check_arg_type): New method. * NEWS: Describe the enhancements above.
* 2008-02-13 Dave Brolley <brolley@redhat.com>brolley2008-02-131-3/+38
| | | | | | | | | | | | | | | | | PR5609 * staptree.h (probe::collect_derivation_chain): Now takes vector<probe*>. (probe::get_alias): New virtual method. * elaborate.h (derived_probe::collect_derivation_chain): Now takes vector<probe*>. * staptree.cxx (probe::collect_derivation_chain): Now takes vector<probe*>. Don't cast 'this' to (derived_probe*). * elaborate.cxx (derived_probe::collect_derivation_chain): Now takes vector<probe*>. (alias_derived_probe::get_alias): New virtual method. (alias_derived_probe::alias): New member. (alias_expansion_builder::build): Call checkForRecursiveExpansion and emit a diagnostic if recursion is detected. Pass alias to constructor of alias_derived_probe. (alias_expansion_builder::checkForRecursiveExpansion): New method. * coveragedb.cxx: Pass vector<probe*> on all calls to collect_derivation_chain.
* PR4393: fix relocatable-kernel global $variable accessfche2008-02-121-0/+1
| | | | | | | | | | | | | 2008-02-12 Frank Ch. Eigler <fche@elastic.org> PR 4393 * tapsets.cxx (emit_address): Support relocatable kernels. (dwarf_derived_probe ctor): Hack around for missing USHRT_MAX. * elaborate.cxx (semantic_pass): Increment rc if exception caught. 2008-02-12 Frank Ch. Eigler <fche@elastic.org> * systemtap.pass1-4/buildok.exp: No longer kfail buildok/seventeen.
* update copyright years for recent checkinsfche2008-01-281-1/+1
|
* PR 4936: probe pont conditions part 2; reorg in prep for full rewritingfche2008-01-181-110/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-17 Frank Ch. Eigler <fche@elastic.org> PR 4935. Reorganize probe condition implementation. * elaborate.cxx (add_condition): New function. (derived_probe): Remove condition member. (derived_probe ctors): Assert non-null incoming probe/location ptrs. (insert_condition_statement): Remove; turn into ... (semantic_pass_conditions): New pass-2 subpass. (semantic_pass_symbols, visit_symbol, visit_functioncall, find_var): Detect some condition-related error cases. (match_key): Change type to exp_type from tok_type. Update callers. (alias_expansion_builder): Propagate probe conditions. * staptree.cxx (probe): Remove condition field and related functions. * tapsets.cxx (dwarf_derived_probe ctor): Compute replacement wildcard-expanded probe_point preserving more of the original location. (mark_derived_probe ctor): Make similar to others - take location rather than condition parameters. * translate.cxx (emit_common_header): Tweak ordering of tmpcounter traversal and hashkey expression generation. * elaborate.h: Corresponding changes. 2008-01-17 Frank Ch. Eigler <fche@elastic.org> PR 4935. * semko/forty.stp, fortyone.stp, fortytwo.stp: New tests. * semok/twentynine.stp: Weaken test since condition expressions have become more tightly constrained.
* 2007-11-27 David Smith <dsmith@redhat.com>dsmith2007-11-271-2/+21
| | | | | | PR 5377. * elaborate.cxx (match_node::find_and_build): Handle wildcards in probe points correctly.
* * conditional-probe SEGV fixfche2007-11-261-1/+2
| | | | | | | 2007-11-26 Frank Ch. Eigler <fche@elastic.org> * elaborate.cxx (derived_probe ctor): Don't duplicate condition if it doesn't exist.
* 2007-11-20 Masami Hiramatsu <mhiramat@redhat.com>hiramatu2007-11-201-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | PR 4935. * parse.cxx (parser::parse_probe_point): Parse "if" condition following probe point. * staptree.h (probe_point): Add "condition" field. (probe): Add "condition" field and "add_condition" method. (deep_copy_visitor): Add "deep_copy" method for the expression. * staptree.cxx (probe_point::probe_point): Initalize it. (probe::add_condition): Implement it. (probe::print): Output "condition" field. (probe::str): Ditto. (deep_copy_visitor::deep_copy): Implement it. * elaborate.h (derived_probe): Add "insert_condition_statement" method. * elaborate.cxx (derived_probe::derived_probe): Initialize "condition" field, and insert a condition check routine on the top of body. (derived_probe::insert_condition_statement): Implement it. (alias_expansion_builder::build): Pass the condition from the alias referer to new alias. * tapsets.cxx (be_derived_probe): Remove unused constructor. (dwarf_derived_probe::dwarf_derived_probe): Insert a condition check routine on the top of body. (mark_derived_probe::mark_derived_probe): Ditto. (mark_builder::build): Pass the base location to mark_derived_probe.
* PR 3887: sufficient+optional probe pointsfche2007-11-201-13/+29
| | | | | | | | | | | | | | | | 2007-11-19 Frank Ch. Eigler <fche@elastic.org> PR 3887. * staptree.h (probe_point): Add "sufficient" field. * staptree.cxx: Initialize it, print it. * parse.cxx (parse_probe_point): Parse it. * elaborate.cxx (derive_probes): Implement it. * stapprobes.5.in: Document it. * NEWS: Gloat about it. * parseok/five.stp, semok/twentyseven.stp: Test "!" probe point flag. * iostat-scsi.stp: Adopt "!" probe point flag.
* PR1119: unused variable elision warningsfche2007-10-061-4/+32
| | | | | | | | | | | | | | | | | | 2007-10-05 Frank Ch. Eigler <fche@elastic.org> PR 1119 * elaborate.cxx (semantic_pass_opt[12]): Warn on elided variables/functions in user script. * session.h (suppress_warnings): New field. Change "timing" to plain old bool. * main.cxx (main): Configure warnings on by default. * stap.1.in: Document this. PR 1119. * systemtap.base/warnings.*: New test. * futexes.stp, sig_by_proc.stp, small_demos/rwtiming.stp: Fix elision warnings.
* rhbz 300121: optimization bugfche2007-09-211-1/+38
|
* 2007-09-12 Martin Hunt <hunt@redhat.com>hunt2007-09-121-2/+1
| | | | | | | | | | | | | | PR 5019 * elaborate.cxx (visit_hist_op): Remove log histogram param. * translate.cxx (assert_hist_compatible): Ditto. * staptree.cxx (hist_op::print): Ditto. * session.h (statistic_decl): Ditto. * parse.cxx (expect_number): Allow negative numbers. Also validate that input is really numeric. This is used by histograms to get the parameters. (parse_hist_op_or_bare_name): Remove code to get parameter for log histograms.
* 2007-09-10 Martin Hunt <hunt@redhat.com>hunt2007-09-101-0/+1
| | | | | * tapsets.cxx, session.h, elaborate.cxx: Start of procfs interaction support. PR 1154.
* 2007-08-17 Frank Ch. Eigler <fche@elastic.org>fche2007-08-171-33/+12
| | | | | | | As suggested by "Zhaolei" <zhaolei@cn.fujitsu.com>: * elaborate.cxx (semantic_pass_optimize[12], unresolved, invalid, mismatch): Use stringstream and print_error(semantic_error) instead of ad-hoc cerr.
* 2007-06-26 William Cohen <wcohen@redhat.com>wcohen2007-06-261-3/+25
| | | | | | | | | | | | | | | | | | | | PR 4529 * coveragedb.cxx: New. * coveragedb.h: New. * Makefile.am: Add coveragedb.cxx and sqlite3 to build. * Makefile.in: Regenerated. * configure.ac: Add test for sqlite3 * configure: Regenerated. * systemtap.spec.in: Add dependencies for sqlite3/sqlite3-devel. * elaborate.h, elaborate.cxx (derived_probe::collect_derivation_chain): New. (alias_expansion_builder::build): Correct token location. (semantic_pass_opt[12): Track used and unused variables/functions. * session.h (tapset_compile_coverage, unused_globals, unused_probes, unused_functions): New fields. * staptree.h (unused_locals, probe_point::str): New member. * staptree.cxx: Ditto. * main.cxx: Add "-q" tapset coverage option and SYSTEMTAP_COVERAGE env.
* 2007-05-30 Frank Ch. Eigler <fche@redhat.com>fche2007-05-301-31/+17
| | | | | | | | | | | | | | | | PR 4567. * staptree.cxx (varuse_collecting_visitor): Add side-effect result query functions. * elaborate.cxx (dead_stmtexpr_remover::visit_expr_statement): Switch to it. (dead_assignment_remover::visit_assignment): Skip elision of lvalues with side-effects in index exprs. * staptree.h: Corresponding changes. 2007-05-30 Frank Ch. Eigler <fche@redhat.com> PR 4567. * systemtap.base/optim.stp, optim.exp: New test.
* 2007-05-25 Frank Ch. Eigler <fche@redhat.com>fche2007-05-261-0/+10
| | | | | | | | | | | | 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-03-30 Frank Ch. Eigler <fche@redhat.com>fche2007-03-301-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26 David Smith <dsmith@redhat.com>dsmith2007-03-261-4/+11
| | | | | | | | * 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-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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-20 Frank Ch. Eigler <fche@elastic.org>fche2007-03-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | 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-02-25 Frank Ch. Eigler <fche@redhat.com>fche2007-02-251-1/+14
| | | | | | | | * 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-19 Frank Ch. Eigler <fche@elastic.org>fche2007-02-191-17/+19
| | | | | | | | | 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.
* 2006-12-19 Frank Ch. Eigler <fche@redhat.com>fche2006-12-191-24/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11-08 Frank Ch. Eigler <fche@elastic.org>fche2006-11-081-11/+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-06 David Smith <dsmith@redhat.com>dsmith2006-11-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | 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.
* 2006-10-31 Frank Ch. Eigler <fche@redhat.com>fche2006-11-011-63/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11 David Smith <dsmith@redhat.com>dsmith2006-10-111-1/+4
| | | | | | | | | | | | | | * tapsets.cxx (in_kprobes_function): New function that looks up the values of '__kprobes_text_start' and '__kprobes_text_end' in the kernel to be able to automatically exclude functions marked as '__kprobes' (BZ# 2639). (blacklisted_p): Calls in_kprobes_function(). (query_kernel_module): Utility function that finds the kernel module. * session.h (struct systemtap_session): Added kprobes_text variables - kprobes_text_initialized, kprobes_text_start, and kprobes_text_end. * elaborate.cxx (systemtap_session::systemtap_session): kprobes_text variables get initialized.
* Systemtap perfmon support to access the processors perfmon hardware.wcohen2006-09-121-0/+7
|
* 2006-09-08 David Smith <dsmith@redhat.com>dsmith2006-09-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-09-04 Frank Ch. Eigler <fche@elastic.org>fche2006-09-051-1/+4
| | | | | | | | Improve unresolved target-symbol error messages. * staptree.h (target_symbol): Add new field saved_conversion_error. * elaborate.cxx (typeresolution_info::visit_target_symbol): Throw that if found instead of generic error. * tapsets.cxx (t_v_f_c_v::visit_target_symbol): Set it.
* 2006-08-28 David Smith <dsmith@redhat.com>dsmith2006-08-281-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-14 David Smith <dsmith@redhat.com>dsmith2006-08-141-17/+52
| | | | | | | | | | | | | * elaborate.cxx (semantic_pass): Calls semantic_pass_optimize1() and semantic_pass_optimize2(). (visit_functioncall): Removed setting relaxed_p since semantic_pass_opt5 does it. (semantic_pass_opt5): Goes ahead and removes duplicate functions since semantic_pass_opt1() won't be run again. (semantic_pass_optimize1): Renamed from semantic_pass_optimize(). Moved semantic_pass_opt5() to semantic_pass_optimize2(). (semantic_pass_optimize2): New function that contains optimization passes that need to be done after type inference.
* 2006-08-10 David Smith <dsmith@redhat.com>dsmith2006-08-101-0/+89
| | | | | | | | | | | | * 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).