summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
* 2006-11-01 Josh Stone <joshua.i.stone@intel.com>jistone2006-11-011-9/+20
| | | | | | | * tapsets.cxx (timer_derived_probe_group::emit_interval): New - Fixes randomization for jiffies timers in ms mode. (timer_derived_probe_group::emit_module_decls): Use emit_interval. (timer_derived_probe_group::emit_module_init): Ditto.
* 2006-10-31 Frank Ch. Eigler <fche@redhat.com>fche2006-11-011-1627/+774
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-24 David Smith <dsmith@redhat.com>dsmith2006-10-241-0/+1
| | | | | * tapsets.cxx (build_blacklist): Added "atomic_notifier_call_chain" to the blacklist (Bugzilla #3379).
* 2006-10-12 Martin Hunt <hunt@redhat.com>hunt2006-10-121-0/+3
| | | | | | | | | | | * 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-10-11 David Smith <dsmith@redhat.com>dsmith2006-10-111-0/+89
| | | | | | | | | | | | | | * 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.
* 2006-09-28 Josh Stone <joshua.i.stone@intel.com>jistone2006-09-281-7/+6
| | | | | | | PR 3278 * tapsets.cxx (hrtimer_derived_probe::emit_probe_entries): Only restart timers when the session is still active and we updated the expire time.
* 2006-09-27 Josh Stone <joshua.i.stone@intel.com>jistone2006-09-281-152/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * session.h (struct systemtap_session): Add kernel_base_release to store the kernel version without the -NNN suffix. * main.cxx (main): Generate and use kernel_base_release. * parse.cxx (eval_pp_conditional): Use kernel_base_release. * tapsets.cxx (profile_derived_probe::profile_derived_probe): Use kernel_base_release. * tapsets.cxx (timer_builder::build): Support a wide variety of timer varients -- jiffies, s/sec, ms/msec, us/usec, ns/nsec, and hz. Use hrtimers automatically on kernels that have it. (timer_builder::register_patterns): Bind all of the new timer varients in one easy place. (register_standard_tapsets): Call timer_builder::register_patterns. (struct hrtimer_builder): Removed since timer_builder is generic. * stapprobes.5.in: Document new timer.* functionality. * tapsets.cxx (hrtimer_derived_probe_group::emit_probes): Add a shared global for the actual hrtimer resolution, _stp_hrtimer_res. (hrtimer_derived_probe_group::emit_module): Init _stp_hrtimer_res. (hrtimer_derived_probe::emit_interval): Limit intervals at a minimum to the hrtimer's actual resolution. (hrtimer_derived_probe::emit_probe_entries): Forward timers based on previous expiration instead of restarting relative. testsuite/ * buildok/fourteen.stp: Test new timer functionality.
* Do not throw sematic error unless probes actually used.wcohen2006-09-131-2/+0
|
* Systemtap perfmon support to access the processors perfmon hardware.wcohen2006-09-121-2/+468
|
* 2006-09-08 David Smith <dsmith@redhat.com>dsmith2006-09-081-61/+653
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+3
| | | | | | | | 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-0/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-23 Josh Stone <joshua.i.stone@intel.com>jistone2006-08-231-1/+2
| | | | | | | | | | PR 3093 From Eugeniy Meshcheryakov <eugen@debian.org>: * main.cxx (main): Use setenv instead of putenv, since gcc 4.2 doesn't like assigning string constants to char*. Also use const char* for result from getenv. * tapsets.cxx (dwflpp::setup): Copy string constant into a local array, to fix gcc 4.2 warning.
* Bugzilla Bug 2422: module("*") probes fail with debug-info-less modulesguanglei2006-08-011-2/+2
|
* 2006-06-30 Josh Stone <joshua.i.stone@intel.com>jistone2006-06-301-10/+15
| | | | | | * tapsets.cxx (hrtimer_builder::build): Enable hrtimers on >=2.6.17. * tapsets.cxx (hrtimer_derived_probe::emit_probe_entries): Correct compilation errors, fix return value.
* 2006-06-30 David Smith <dsmith@redhat.com>dsmith2006-06-301-7/+11
| | | | | | | | | | | | * tapsets.cxx (dwflpp::dwfl_assert): Added optional extra_msg parameter to be able to print out extra error message. (dwflpp::setup): Uses new 'extra_msg' parameter to dwfl_assert() to ask user to install kernel-debuginfo when dwfl_linux_kernel_report_kernel() or dwfl_linux_kernel_report_modules() fails (Bugzilla #2669). * buildrun.cxx (compile_pass): Checks to make sure module build directory exists before trying to run make there (Bugzilla #2669).
* 2006-06-27 Roland McGrath <roland@redhat.com>roland2006-06-271-51/+81
| | | | | | * tapsets.cxx (dwflpp::emit_address): New instance method. Get relocation details from Dwfl to emit in comment after address constant. (dwflpp::loc2c_emit_address): Just call that.
* 2006-06-05 David Smith <dsmith@redhat.com>dsmith2006-06-051-39/+130
| | | | | | | | | | | | | | | | | | | | | * tapsets.cxx (dwflpp::express_as_string): New function. Extracted from dwflpp::literal_stmt_for_local() so that dwflpp::literal_stmt_for_return() could also call it. (dwflpp::literal_stmt_for_local): Portion extracted to create dwflpp::express_as_string(). (dwflpp::literal_stmt_for_return): New function. Adds support for new symbolic access ("$return") to return value in .return probes. Fixes PR 1132. (target_variable_flavour_calculating_visitor::visit_target_symbol): Calls dwflpp::literal_stmt_for_return() when in a return probe and the variable name is "$return". (dwarf_var_expanding_copy_visitor::visit_target_symbol): Ditto. * stapfuncs.5.in: Noted that the retval() function is deprecated. * stapprobes.5.in: Corrected the name of the return value variable. * tapset/return.stp: Marked the retval() function as deprecated. * testsuite/semko/return01.stp: Added new test. * testsuite/semko/return02.stp: Ditto.
* 2006-06-02 Frank Ch. Eigler <fche@elastic.org>fche2006-06-021-2/+50
| | | | | | | | | | | | | | 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.
* 2006-06-01 Josh Stone <joshua.i.stone@intel.com>jistone2006-06-011-4/+5
| | | | | | | * tapsets.cxx (hrtimer_derived_probe::emit_interval): update API usage of hrtimers in preparation of getting exports from the kernel. (hrtimer_derived_probe::emit_probe_entries): ditto
* 2006-05-26 Josh Stone <joshua.i.stone@intel.com>jistone2006-05-271-7/+56
| | | | | | | | * tapsets.cxx (build_blacklist): build the sets of blacklisted functions and function returns. Manually added many __kprobes functions that should not be probed. (dwarf_query::dwarf_query): Call build_blacklist. (dwarf_query::blacklisted_p): Use blacklist sets.
* 2006-05-25 Josh Stone <joshua.i.stone@intel.com>jistone2006-05-251-0/+2
| | | | | | * tapsets.cxx (dwarf_var_expanding_copy_visitor::visit_target_symbol): Free allocated memory when supressing target-variable errors
* 2006-05-24 Frank Ch. Eigler <fche@elastic.org>fche2006-05-251-23/+50
| | | | | | | | | Pass 4 speedup. * tapsets.cxx (derived_probe::emit_common_header): New function, to emit code formerly inlined by emit_probe_prologue/epilogue. * translate.cxx (emit_common_header): Call it. * elaborate.h: Corresponding changes.
* 2006-05-18 Frank Ch. Eigler <fche@elastic.org>fche2006-05-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Organize "-t" output by script/parse level probes rather than derived-probes. * elaborate.cxx (derived_probe ctor): Remove name field setting. (alias_derived_probe): New class. (alias_expandion_builder::build): Create an instance of the above instead of parse-tree-level plain probe. * elaborate.h: Corresponding changes. (derived_probe::basest): Define. * staptree.cxx (probe ctor): Set new name field. * staptree.h (probe): Corresponding changes. (probe::basest): New field. * tapsets.cxx (emit_probe_prologue, emit_probe_entries): Switch to basest() probe name for Stat instance. (dwarf_derived_probe ctor): Stash away base probe. * translate.cxx (unparser::emit_probe): Remove index operand, just use probe name to generate symbols. (emit_module_init): Reorganize -t output in unregister functions. (translate_pass): Remove unparser::current_probenum field and all uses. * translate.h: Corresponding changes.
* 2006-05-15 Frank Ch. Eigler <fche@elastic.org>fche2006-05-161-5/+4
| | | | | | | | | * tapsets.cxx, translator.cxx (*): Designate more emitted functions as static. * translator.cxx (visit_print_format): Correct regression regression from two weeks ago. * stapfuncs.5.in: Tweak wording. Deprecate returnval() in favour of retval().
* 2006-05-05 Eugene Teo <eteo@redhat.com>eteo2006-05-051-2/+3
| | | | | | | | | PR 2433 * tapsets.cxx (dwarf_query::blacklisted_p): Extend the list of blacklisted .return probes to include "do_exit". Correct funcname typo for "sys_groupexit". * tapset/syscalls.stp: Remove .return probe aliases of never- returning syscall.exit and syscall.exit_group calls.
* 2006-05-03 Josh Stone <joshua.i.stone@intel.com>jistone2006-05-041-3/+5
| | | | | PR 2506 * tapsets.cxx (dwarf_query::blacklisted_p): skip probes in .exit.*
* "-t" option to collect information the number of times a probe runs andwcohen2006-05-021-1/+25
| | | | the average amount of time spent in the probe.
* 2006-04-25 Frank Ch. Eigler <fche@elastic.org>fche2006-04-251-12/+12
| | | | | | | | | | | | | | | | | PR 2427. * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): Support /* pure */ declaration. Stop using __tvar_ naming hack. (v_c_u::visit_print_format): Mark sprint and sprintf as side-effect-free. (deep_copy_visitor::visit_print_format): Propagate raw_components. * stap.1.in: Document declaration. * elaborate.cxx (semantic_pass_opt2): Verbose message tweak. (dead_stmtexpr_remover): Extend for more aggressive optimization. * tapsets.cxx (dwarf,mark_var_expanding_copy_visotor): Add /* pure */ declaration to rvalue expansions. * tapset/*.stp: Added /* pure */ declarations to many functions. * testsuite/parseok/unparsers.stp: Propagate guru mode flag. * testsuite/buildok/twentyfour.stp: New test.
* 2006-04-21 Frank Ch. Eigler <fche@elastic.org>fche2006-04-211-127/+212
| | | | | | | | | | | | | | | | | PR 953 * elaborate.h (derived_probe): Add field "name". Stop passing "probe index" to other emit_* calls. (emit_probe_context_vars): New member function. * elaborate.cxx (derived_probe ctor): Generate unique name. * translate.cxx (*): Adapt to index->name. (emit_probe): Realize that probe locals only occur at nesting=0. * tapsets.cxx (*derived_probe::emit_*): Adapt to index->name. (mark_var_expanding_copy_visitor): New class to process $argN. (mark_derived_probe ctor): Call it. (mark_derived_probe::emit_probe_context_vars): Do it. * buildrun.cxx (compile_pass): Add more optional gcc verbosity. Add CFLAGS += -freorder-blocks. * testsuite/buildok/marker.stp: New test.
* 2006-04-17 Frank Ch. Eigler <fche@elastic.org>fche2006-04-171-0/+14
| | | | | * tapsets.cxx (mark_derived_probe::emit_{de}registrations): Use cmpxchg to synchronize.
* * verbose message tweakfche2006-04-101-1/+1
|
* * paranoid error checkfche2006-04-081-1/+1
|
* * comment tweaksfche2006-04-081-10/+4
|
* 2006-04-08 Frank Ch. Eigler <fche@elastic.org>fche2006-04-081-127/+109
| | | | | | | | * tapsets.cxx (resolve_prologue_endings): Rewrote. (resolve_prologue_endings2): Removed. * gen-stapmark.h: Emit a 0-arity marker. * stapmark.h: Regenerated for arities 0..6.
* 2006-03-30 Martin Hunt <hunt@redhat.com>hunt2006-03-301-1/+1
| | | | | | * tapsets.cxx (dwarf_derived_probe::emit_registrations): Change maxactive so single-processor kernels using kretprobes don't get lots of dropped probes.
* 2006-03-30 Frank Ch. Eigler <fche@elastic.org>fche2006-03-301-4/+295
| | | | | | | | | PR 953, part 1 * tapsets.cxx: (mark_derived_probe*): New classes. (register_standard_tapsets): Register kernel/module.mark() family. * stapmark.h: New header for static instrumentation markers. * gen-stapmark.h: New perl script to generate it. * elaborate.cxx (derived_probe ctor): Ignore null location*.
* 2006-03-29 Josh Stone <joshua.i.stone@intel.com>jistone2006-03-301-0/+242
| | | | | | | | | | | * tapsets.cxx (hrtimer_derived_probe::*): creates a probe point based on the hrtimer APIs. * tapsets.cxx (hrtimer_builder::*): parses the user's time-spec into a 64-bit nanosecond value, and calls the appropriate derived_probe. * tapsets.cxx (register_standard_tapsets): add hrtimer bindings * translate.cxx (translate_pass): add linux/random.h include, used for generating 64-bit random numbers for hrtimers.
* 2006-03-03 Josh Stone <joshua.i.stone@intel.com>jistone2006-03-031-4/+4
| | | | | | | | | * main.cxx (main): search forward for dashes in the kernel release, to work properly with release names with more than one dash. * parse.cxx (eval_pp_conditional): ditto * tapsets.cxx (profile_derived_probe::profile_derived_probe): ditto * safety/safety.py (StaticSafety::__build_search_suffixes): ditto, and add copyright & GPL tag
* 2006-02-23 Frank Ch. Eigler <fche@elastic.org>fche2006-02-231-1/+1
| | | | | | | | | | | | | | | PR 1304 * parse.cxx (lexer): Take systemtap_session argument. (lexer::scan): Support $1..$NNNN and @1...@NNNN expansion. * stap.1.in: Document this. * testsuite/semok/args.stp: New test. * translate.cxx (var::init, emit_global): Emit code to allow named module parameters to initialize global string/number scalars. * stap.1.in: Don't document this yet. PR 2334 * main.cxx (main): Clarify "-v" option repeatibility. * stap.1.in: Ditto.
* 2006-02-22 Frank Ch. Eigler <fche@elastic.org>fche2006-02-221-3/+5
| | | | | | | | | PR 2293. * tapsets.cxx (emit_probe_epilogue): Emit early local_irq_save(). (emit_probe_epilogue): ... and matching _restore(). * main.cxx (main): Emit a "hello, I'm starting" message before pass 5 in verbose mode.
* 2006-02-07 Frank Ch. Eigler <fche@elastic.org>fche2006-02-081-0/+6
| | | | | | * src/testsuite/buildok/syscalls.stp: Build with "-u" to build-test all auxiliary functions. * tapsets.cxx (dwarf_query::add_probe_point): Add some "-vv" output.
* 2006-02-07 Josh Stone <joshua.i.stone@intel.com>jistone2006-02-081-0/+1
| | | | | | PR 2068 * tapsets.cxx (dwarf_query::blacklisted_p): add __switch_to to the blacklist for x86_64 architecture only.
* 2006-01-27 Frank Ch. Eigler <fche@elastic.org>fche2006-01-281-34/+23
| | | | | | | | * main.cxx: Make "-v" (verbose) flag a counter. * stap.1.in: Document this. * session.h: Corresponding changes. * {elaborate,buildrun,tapsets,translate}.cxx: Update all uses of verbose flag to compare it to sensible level for value of message.
* 2006-01-26 Frank Ch. Eigler <fche@elastic.org>fche2006-01-261-2/+4
| | | | | | | | | | | | | | | | | | | | | PR 2060: lock elevation, mop-up * staptree.cxx (functioncall_traversing_visitor): Store a current_function pointer during traversal. (visit_embeddedcode): Use it to handle $target-synthesized functions. (varuse_collecting_visitor::visit_assignment): Correct l-lr typo. (visit_foreach_loop): Note added write on sorted foreach. (visit_delete_statement): Note as read+write. * staptree.h: Corresponding changes. * elaborate.cxx (dead_assignment_remover::visit_expr_statement): Correct stmt token after possible expression rewriting. * tapsets.cxx (visit_target_symbol): Create naming convention to recognize $target-synthesized functions. * translate.cxx (emit_locks, emit_unlocks): New functions to emit lock/unlock sequences at the outermost level of a probe. (emit_probe): Call them. (varlock_*): #if-0 out the lock code generation. Later, these classes should be removed. (translate_pass): Emit read_trylock() kludge macro for old kernels.
* Took sys_execve off the blacklist for return probes, now that RHEL4 U3kenistoj2006-01-241-2/+1
| | | | includes the fix for PR #1345.
* 2006-01-24 Frank Ch. Eigler <fche@elastic.org>fche2006-01-241-39/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 2060 etc. * tapsets.cxx (visit_target_symbol): Tolerate failed resolution by letting target_symbol instance pass through to optimizer and type checker. * elaborate.cxx (semantic_pass_optimize): New family of functions and associated visitor classes. (visit_for_loop): Tolerate absent init/incr clauses. (semantic_pass): Invoke unless unoptimized (-u) option given. * main.cxx, session.h: Add support for flag. * staptree.cxx (visit_for_loop): Tolerate absent init/incr clauses. (traversing_visitor::visit_arrayindex): Visit the index expressions. (functioncall_traversing_visitor): New class. (varuse_tracking_visitor): New class. * staptree.h: Corresponding changes. * parse.cxx (parse_for_loop): Represent absent init/incr expressions with null statement pointer instead of optimized-out dummy numbers. * stap.1.in: Document optimization. * testsuite/{semko,transko}/*.stp: Added "-u" or other code to many tests to check bad code without optimizer elision. * testsuite/semok/optimize.stp: New test. * elaborate.cxx (unresolved, invalid, mismatch): Standardize error message wording. * stapfuncs.5.in: Tweak print/printf docs. * tapset/logging.stp: Remove redundant "print" auxiliary function, since it's a translator built-in. * testsuite/transok/five.stp: Extend test. * translate.cxx (emit_symbol_data): Put symbol table into a separate temporary header file, to make "-p3" output easier on the eyes. * buildrun.cxx (compile_pass): Eliminate test-mode support throughout. * main.cxx, session.h, translate.cxx: Ditto. * main.cxx (main): For last-pass=2 runs, print post-optimization ASTs.
* 2006-01-18 Josh Stone <joshua.i.stone@intel.com>jistone2006-01-181-0/+1
| | | | | * tapsets.cxx (profile_derived_probe::emit_probe_entries): Setup c->regs properly in light of the emit_probe_prologue change.
* 2006-01-10 Frank Ch. Eigler <fche@redhat.com>fche2006-01-101-1/+4
| | | | | | | PR 1972. * tapsets.cxx (var_expanding_copy_visitor::visit_target_symbol): Produce error message for $var access within .return probes. * testsuite/semko/thirtyfour.stp: New test.
* 2006-01-10 Frank Ch. Eigler <fche@redhat.com>fche2006-01-101-33/+33
| | | | | | | | | | | | | PR 2060. * buildrun.cxx (compile_pass): Add "V=1" to kbuild if verbose. * translate.cxx (translator_output): For output-file constructor, set an explicit output buffer. (emit_module_init, emit_module_exit): Reorganize output, to spit each individual probe registration/deregistration blurb into a separate function. * translate.h: Corresponding changes; set default buffer size to 8K. * translate.cxx, tapsets.cxx: Replace "endl" by buffer-friendly "\n" throughout code generation routines.