summaryrefslogtreecommitdiffstats
path: root/translate.cxx
Commit message (Collapse)AuthorAgeFilesLines
* PR6534: add a comment blurb explaining sufficiency UTS_RELEASE compile-time ↵Frank Ch. Eigler2008-06-021-0/+6
| | | | check
* PR6534: make do without uts_sem (about to be unexported from 2.6.26-mm)Frank Ch. Eigler2008-06-021-20/+9
|
* PR 6562, Modify SYSTEMTAP_DEBUGINFO_PATH behaviour.Srikar Dronamraju2008-05-301-1/+3
|
* Make sure that return statements don't override existing errors.Josh Stone2008-05-281-0/+4
|
* Merge commit 'origin/dwarfless'Jim Keniston2008-05-121-0/+1
|\ | | | | | | PR 4311 - Function boundary tracing without debuginfo: Phases 1 and 2
| * Replaced [u_]arg() with [u]int_arg(), [u]long_arg(), {s|u}32_arg(),Jim Keniston2008-05-051-0/+1
| | | | | | | | | | | | | | {s|u}64_arg(), etc. Added asmlinkage(), fastcall(), regparm(). Dealt with some surprises -- e.g., rax is ZERO-extended eax. Seems to work well with -m32 and -m64 user apps, and with a (small) dwarfless subset of syscall.stp.
* | PR444886: add .../build/... to default debuginfo search pathFrank Ch. Eigler2008-05-051-1/+1
| |
* | cleanup: remove never-implemented runtime TEST_MODE compile flagFrank Ch. Eigler2008-04-281-3/+0
| |
* | 2008-04-14 David Smith <dsmith@redhat.com>David Smith2008-04-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elaborate.h (struct derived_probe_group): Removed emit_module_header virtual function. * translate.cxx (c_unparser::emit_common_header): Removed calls to emit_module_header function. * tapsets.cxx (be_derived_probe>): Removed emit_module_header function. (struct timer_derived_probe_group): Ditto. (struct profile_derived_probe_group): Ditto. (struct procfs_derived_probe_group): Ditto. (struct hrtimer_derived_probe_group): Ditto. (struct perfmon_derived_probe_group): Ditto. (dwarf_derived_probe_group::emit_module_decls): Moved kernel check back from deleted emit_module_header function. (uprobe_derived_probe_group::emit_module_decls): Ditto. (mark_derived_probe_group::join_group): Moved marker kernel check (to a new embedded code section) from deleted emit_module_header function.
* | Merge branch 'master' into unwindFrank Ch. Eigler2008-04-121-4/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: 2008-04-11 David Smith <dsmith@redhat.com> 2008-04-11 David Smith <dsmith@redhat.com> 2008-04-11 David Smith <dsmith@redhat.com> PR2949: add missing line PR2949: listings mode (stap -l PROBE) PR6393: don't bother print build (configure) date any more, with reliable git ids PR6393: regenerate git_version.h at every make PR6393: git version tagging at build time 2008-04-09 David Smith <dsmith@redhat.com> 2008-04-04 Masami Hiramatsu <mhiramat@redhat.com> 2008-04-04 David Smith <dsmith@redhat.com> 2008-04-04 Masami Hiramatsu <mhiramat@redhat.com> removing another part of retired LKET removing abandoned experiment: safety/* disassembly/symbol checks Conflicts: .gitignore ChangeLog runtime/ChangeLog
| * | 2008-04-11 David Smith <dsmith@redhat.com>David Smith2008-04-111-4/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elaborate.h (struct derived_probe_group): Added emit_module_header virtual function. * translate.cxx (c_unparser::emit_common_header): Calls each probe group's emit_module_header function. (translate_pass): Moved inclusion of linux/marker.h to mark_derived_probe_group::emit_module_header(). * tapsets.cxx (struct be_derived_probe_group): Added empty emit_module_header function. (struct timer_derived_probe_group): Ditto. (struct profile_derived_probe_group): Ditto. (struct procfs_derived_probe_group): Ditto. (struct hrtimer_derived_probe_group): Ditto. (struct perfmon_derived_probe_group): Ditto. (dwarf_derived_probe_group::emit_module_header): Moved kprobes kernel check from emit_module_decls() to here. (uprobe_derived_probe_group::emit_module_header): Moved uprobe kernel check from emit_module_decls() to here. (uprobe_derived_probe_group::emit_module_decls): Moved uprobe kernel check to emit_module_header(). (mark_derived_probe_group::emit_module_header): Moved marker kernel check from emit_module_decls and translate_pass() to here. (uprobe_derived_probe_group::emit_module_decls): Moved marker kernel check to emit_module_header().
| * 2008-04-04 Masami Hiramatsu <mhiramat@redhat.com>Masami Hiramatsu2008-04-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | PR 6028 * translate.cxx (c_unparser::emit_common_header): Add unwaddr for caching unwound address. * tapsets.cxx (common_probe_entryfn_prologue): Clear unwaddr. * loc2c-runtime.h (fetch_register): Call ia64_fetch_register with the address of c->unwaddr. * regs-ia64.c (ia64_fetch_register): Don't unwind stack if it has already unwound stack in same probe.
* | Include string.hMartin Hunt2008-04-091-0/+2
| |
* | Change stap to get kernel symbols from debuginfo andMartin Hunt2008-04-091-29/+108
| | | | | | | | compile them into the module.
* | Merge branch 'master' into unwindFrank Ch. Eigler2008-03-311-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | * master: Revert "Just a test commit" Just a test commit bump autoconf* version numbers to 0.7 replace mentions of CVS with GIT in docuemntation files 2008-03-27 Frank Ch. Eigler <fche@elastic.org> 2008-03-27 Frank Ch. Eigler <fche@elastic.org> 2008-03-26 Frank Ch. Eigler <fche@elastic.org> Revert "dummy commit" dummy commit
| * 2008-03-26 Frank Ch. Eigler <fche@elastic.org>fche2008-03-261-0/+3
| | | | | | | | | | * translate.cxx (emit_function): Set context last_stmt, in case an error occurs during the function.
* | rebased unwind_branch on top of current masterFrank Ch. Eigler2008-03-251-66/+29
|/
* 2008-03-10 Dave Brolley <brolley@redhat.com>brolley2008-03-101-2/+73
| | | | | | | | | | | | | | 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.
* PR5045: clean up after interruptsfche2008-02-281-2/+9
| | | | | | | | | | | 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-12 Martin Hunt <hunt@redhat.com>hunt2008-02-121-2/+2
| | | | | PR 5757 * tapsets.cxx, translate.cxx: Cleanup findentation a bit.
* 2008-01-23 Dave Brolley <brolley@redhat.com>brolley2008-01-231-0/+18
| | | | | | | * translate.cxx (var::fini): New method. (c_unparser::emit_module_init): Call var::fini when deregistering variables without indices. (c_unparser::emit_module_exit): Likewise.
* PR 4936: probe pont conditions part 2; reorg in prep for full rewritingfche2008-01-181-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2008-01-14 Martin Hunt <hunt@redhat.com>hunt2008-01-151-16/+8
| | | | | * translate.cxx (emit_module_init): Call _stp_print_kernel_info() to print out version information and internal memory usage stats.
* 2008-01-14 Martin Hunt <hunt@redhat.com>hunt2008-01-141-0/+1
| | | | | * translate.cxx (emit_module_exit): When using timing, delete timing stats when finished.
* 2007-11-15 David Smith <dsmith@redhat.com>dsmith2007-11-151-1/+1
| | | | | | | | | | | * 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-12 Martin Hunt <hunt@redhat.com>hunt2007-11-121-3/+35
| | | | | | | | | | | | | * translate.cxx (visit_print_format): Strings without a format or formatted with "%s" or "%s\n" should be printed with calls to _stp_print(). Call _stp_print_char() if printing a char. * staptree.cxx (parse_print): Check for "print_char". * staptree.h (struct print_format): Add print_char. (parse_print): Update prototype. * parse.cxx (parse_symbol): Set print_char bool in print_format.
* 2007-10-03 Frank Ch. Eigler <fche@elastic.org>fche2007-10-041-49/+40
| | | | | | | | | PR 5102 * translate.cxx (visit_statement): Add new parameter regarding whether c->last_stmt needs to be updated. Update callers, mostly passing "false". (visit_EXPRESSIONTYPE): Generally omit setting c->last_stmt, unless the construct can set c->last_error.
* PR 5096: improve code generation for function callsfche2007-10-031-18/+19
| | | | | | | | | 2007-10-03 Frank Ch. Eigler <fche@elastic.org> PR 5096 * translate.cxx (emit_function): Put nesting limit/control logic into function body ... (visit_functioncall): ... and not into each call site.
* PR 3635: reduce number of global objectsfche2007-10-021-27/+40
| | | | | | | | | 2007-10-02 Frank Ch. Eigler <fche@redhat.com> PR 3635 * translate.cxx (emit_global): Wrap all globals and locks into one top-level struct. Update references to former "global_VAR" prefix. * translate.h (emit_global_init): New function.
* 2007-10-02 Frank Ch. Eigler <fche@redhat.com>fche2007-10-021-21/+24
| | | | | | | | | | | | | | | | | | | 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.
* 2007-09-25 Josh Stone <joshua.i.stone@intel.com>jistone2007-09-251-1/+1
| | | | | * tapsets.cxx (translator_output::~translator_output): Fix mismatched delete / delete [].
* 2007-09-12 Frank Ch. Eigler <fche@elastic.org>fche2007-09-131-5/+24
| | | | | | | | | | | PR 5023 * translate.cxx (c_unparser::visit_literal_number): Support LLONG_MIN. (visit_unary_expression): Likewise. 2007-09-12 Frank Ch. Eigler <fche@elastic.org> PR 5023. * buildok/ten.stp: Extend some more.
* 2007-09-12 Martin Hunt <hunt@redhat.com>hunt2007-09-121-7/+3
| | | | | | | | | | | | | | 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-12 David Smith <dsmith@redhat.com>dsmith2007-09-121-0/+1
| | | | | | * translate.cxx (c_unparser::emit_common_header): Added 'data' variable to context structure to support procfs probes. * tapsets.cxx: Improved procfs probe handling.
* 2007-08-30 David Smith <dsmith@redhat.com>dsmith2007-08-301-2/+14
| | | | | | | | PR 4983 * translate.cxx (c_tmpcounter::visit_print_format): Don't declare temporaries for number and string constants. (c_unparser::visit_print_format): Use numeric and string constants directly instead of copying them into temporaries.
* 2007-08-21 David Smith <dsmith@redhat.com>dsmith2007-08-211-2/+12
| | | | | | | PR 2305 * translate.cxx (c_unparser::visit_foreach_loop): When the user requested sorting an array of aggregates by value, sort by @count.
* 2007-08-16 Josh Stone <joshua.i.stone@intel.com>jistone2007-08-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | PR 4591 * parse.cxx (parser::parse_symbol): Tweak 'print' matching to allow all the new variants with printd and println. * staptree.h (struct print_format): Add fields for the new print variants, and parse_print() to help matching. * staptree.cxx (print_format::parse_print): New static method to match the print variants and determine their properties. (print_format::print): Handle the new print types. (deep_copy_visitor::visit_print_format): Copy the new fields. * translate.cxx (c_unparser::visit_print_format): Insert delims and newlines where appropriate for new print functions. * stap1.in: Document the new print functions. testsuite/ * lib/stap_run.exp: Make sure to match the entire output, in case there are multiple pass/fail messages. * buildok/printf.stp: Add lines for new print variants. * parseko/printd01.stp: Make sure that bad printd calls are handled. * parseko/printd02.stp: Ditto. * parseko/printd03.stp: Ditto. * parseko/printd04.stp: Ditto. * systemtap.base/print.stp: Try a bunch of different print calls. * systemtap.base/print.exp: Driver for above.
* 2007-08-10 Josh Stone <joshua.i.stone@intel.com>jistone2007-08-111-1/+2
| | | | | | | | | | | | | | | | | | | 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-08-09 Frank Ch. Eigler <fche@elastic.org>fche2007-08-091-1/+1
| | | | | From Lai Jiangshan <laijs@cn.fujitsu.com>: * translate.cxx (emit_module_exit): Use stp_warn for warning.
* 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.