summaryrefslogtreecommitdiffstats
path: root/translate.cxx
Commit message (Collapse)AuthorAgeFilesLines
...
| * build compatibility fix for gcc 3.4Frank Ch. Eigler2009-06-091-1/+1
| | | | | | | | * translate.cxx (emit_symbol_data): Use ~0 instead of -1 for big unsigned constant
* | Only sign modules if --unprivileged is specified.Dave Brolley2009-06-111-33/+0
| | | | | | | | | | | | Don't generate an error message for unsigned modules. Make sure module signature exists before attempting to copy to the cache. Allow timer p[robes for unprivileged users.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-06-031-1/+14
|\|
| * Detect kretprobe trampoline and use fallback unwinder.Mark Wielaard2009-06-031-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | * runtime/sym.h (_stp_kretprobe_trampoline): Document. * translate.cxx (unwindsym_dump_context): Add stp_kretprobe_trampoline_addr. (dump_unwindsyms): Detect kretprobe_trampoline_holder symbol address. (emit_symbol_data): Initialize and emit _stp_kretprobe_trampoline. * runtime/transport/symbols.c (_stp_do_relocation): Detect kernel load address and adjust _stp_kretprobe_trampoline. * runtime/stack-i386.c (__stp_stack_print): Always use fallback unwinder when hitting kretprobe_trampoline_holder. * runtime/stack-x86_64.c (__stp_stack_print): Likewise.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-291-0/+1
|\|
| * PR10206: Include NOTYPE symbols in stap-symbols.hAnanth N Mavinakayanahalli2009-05-281-0/+1
| | | | | | | | | | On powerpc, function descriptors are in the .opd section as NO_TYPE. Include them in stap-symbols.h
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-221-39/+105
|\|
| * Fix gcc warning about Dwarf_Addr initialization.Mark Wielaard2009-05-211-1/+1
| | | | | | | | * translate.cxx (dump_unwindsyms): Initialize eh_frame to 0, not NULL.
| * PR10177: init/kill time in sleepy context onlyJosh Stone2009-05-201-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Previously, _stp_init_time and _stp_kill_time were being called from begin/end/error probes, which will run with preemption disabled. The BUG reported on RT kernels showed that cpufreq_unregister_notifier can end up sleeping, which violates our preemption block. This patch moves the init/kill into systemtap_module_init/exit, where it is safe to sleep. The code maintains a new predicate with the define STAP_NEED_GETTIMEOFDAY, so we don't still incur any timer overhead if it's not used.
| * Properly read eh_frame and pass is_ehframe correctly.Mark Wielaard2009-05-201-2/+2
| | | | | | | | | | | | | | | | | | * runtime/unwind.c (adjustStartLoc): Add extra dbug_unwind. (_stp_search_unwind_hdr): Always pass true for is_ehframe. (unwind_frame): Properly pass through is_ehframe to adjustStartLoc(). (unwind): Add extra dbug_unwind. * translate.cxx (dump_unwindsyms): Output and use correct eh_frame and eh_len.
| * Fetch and store both debug_frame and eh_frame tables.Mark Wielaard2009-05-201-39/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | * runtime/sym.h (_stp_module): Remove unwind_data, unwind_data_len and unwind_is_ehframe fields. Add debug_frame, eh_frame, debug_frame_len, eh_frame_len and eh_frame_addr fields. * runtime/unwind.c: Use debug_frame and debug_frame_len instead of unwind_data and unwind_data_len throughout. (cie_for_fde): Take unwind_data and is_ehframe as direct arguments. * runtime/unwind/unwind.h (cie_for_fde): New function declaration. * translate.cxx (get_unwind_data): Fetch and return both debug_frame and eh_frame tables. (dump_unwindsyms): Dump both debug_frame and eh_frame tables.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-231-1/+1
|\| | | | | | | | | | | Conflicts: Makefile.in
| * PR 9941: Add predicate function callback to check for an early abortRajan Arora2009-04-221-1/+1
| | | | | | | | | | | | | | * tapsets.cxx: Add dwfl_report_offline_predicate to check pending interrupts for an early abort. * tapsets.h: Declare it. * translate.cxx: Add callback to function call.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-221-5/+1
|\|
| * Simplify section size logic.Mark Wielaard2009-04-221-5/+1
| | | | | | | | | | | | * translate.cxx (dump_unwindsyms): Just check that dwfl_module_relocations() return more than 1 relocation section bases before calling dwfl_module_address_section().
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-211-1/+2
|\|
| * fix a bug with %% in format stringsTim Moore2009-04-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | * translate.cxx (c_unparser::visit_print_format): Always use _stp_printf if a format string contains "%%". Previously a format string with no arguments would always be printed with _stp_print. * testsuite/systemtap.printf/basic6.stp: New test for %% in format strings. * testsuite/systemtap.printf/basic6.exp: test driver * testsuite/systemtap.examples/grapher.stp: Remove workaround for "%%" literal problem.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-211-8/+22
|\| | | | | | | | | | | | | Conflicts: aclocal.m4 configure
| * Micro-optimization: no-modules translate pass 3 case.Mark Wielaard2009-04-191-8/+22
| | | | | | | | | | | | | | | | Saves 250ms in the unlikely case there are no modules needed. * translate.cxx (emit_symbol_data_done): New function. (emit_symbol_data): Call emit_symbol_data_done immediately when no module data is needed.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-161-15/+43
|\|
| * Keep track of relocation section sizes.Mark Wielaard2009-04-141-15/+43
| | | | | | | | | | | | | | | | * runtime/sym.h (_stp_section): Add size field. * translate.cxx (dump_unwindsyms): Get start of module address space, turn seclist into vector of secname, size pairs, track relocation section size, or add module address range if no sections, output size in _stp_section list.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-141-16/+29
|\|
| * Cleanup symbol table sanity checking.Mark Wielaard2009-04-091-16/+29
| | | | | | | | | | | | * translate.cxx (dump_unwindsyms): Get and check against module end, only check STT_FUNC && SHN_ABS for kernel, check shndxp for non-allocated section.
* | 2009-04-14 Dave Brolley <brolley@redhat.com>Dave Brolley2009-04-141-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * translate.cxx (c_unparser::emit_unprivileged_user_check): Generate code to check _stp_unprivileged_user. * testsuite/lib/systemtap.exp (setup_server): Copy stap-env to $net_path. * runtime/transport/transport.c: Set up _stp_unprivileged_user. * runtime/staprun/staprun_funcs.c (check_signature): Distiguish among verification failure due to errors, tampering, untrusted signer. (check_permissions): Likewise. (check_groups): Set unprivileged_user. * runtime/staprun/staprun.c (insert_stap_module): Set _stp_unprivileged_user. * runtime/staprun/modverify.h (MODULE_OK): #define it. (MODULE_UNTRUSTED,MODULE_CHECK_ERROR,MODULE_ALTERED): Likewise. * runtime/staprun/modverify.c (modverify.h): #include it. (verify_it): Distiguish among verification failure due to errors, tampering, untrusted signer. (verify_module): Likewise. * runtime/staprun/common.c (unprivileged_user): Define it. * runtime/staprun/staprun.h (unprivileged_user): Declare it. * cache.cxx (get_from_cache): Get the module signature file. * stap-authorize-server-cert: Source `dirname $0`/stap-env. * stap-authorize-signing-cert: Likewise. * stap-client: Likewise. * stap-find-or-start-server: Likewise. * stap-find-servers: Likewise. * stap-gen-cert: Likewise. * stap-server: Likewise. * stap-serverd: Likewise. * stap-start-server: Likewise.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-081-3/+11
|\|
| * Omit symbols that have suspicious addresses (before base) from symbol table.Mark Wielaard2009-04-081-2/+5
| | | | | | | | * translate.cxx (dump_unwindsyms): Filter out sym.st_value < base values.
| * PR10026: Read marker/tracepoint args directlyJosh Stone2009-04-061-1/+6
| | | | | | | | | | | | | | | | | | | | We already stash the context variables for markers and tracepoints into the locals for the probe body, but then we were using separate functions to read those locals for each particular probe body. This patch instead teaches the unparser how to emit the local name directly for those context variables. The resulting code from the translator is much simpler now.
* | Disable unprivileged user check temporarily.Dave Brolley2009-04-081-3/+5
| |
* | 2009-04-06 Dave Brolley <brolley@redhat.com>Dave Brolley2009-04-061-0/+40
|/ | | | | | | | * translate.cxx (emint_unprivileged_user_check): New method of c_unparser. (c_unparser::emit_module_init): If --unprivileged has been specified, generate code to call systemtap_unprivileged_user_check. (translate_pass): Call emit_unprivileged_user_check. * translate.h (emint_unprivileged_user_check): New method of c_unparser.
* Reorder includes so regs.c and regs-ia64.c included before task_finder.c.William Cohen2009-04-021-2/+0
|
* PR10019: --skip-badvars to suppress run-time memory errors tooFrank Ch. Eigler2009-04-011-0/+2
| | | | | | | | * NEWS: Note this change. * hash.cxx (find_script_hash): Add s.skip_badvars into hash. * translate.cxx (translate_pass): Emit STP_SKIP_BADVARS. * runtime/loc2c-runtime.h (DEREF_FAULT, STORE_DEREF_FAULT): Provide dummy implementation if STP_SKIP_BADVARS.
* PR10000: emit _stp_relocate* calculations correctly for kernel/module global ↵Frank Ch. Eigler2009-03-271-3/+4
| | | | | | | | | | | | | | | | $data * translate.cxx (dump_unwindsyms): Also emit STT_OBJECT symbols, therefore .data etc. sections into stap-symbols.h. * tapsets.cxx (iterate_over_modules): Omit a dwfl_getmodules() RC-checking assertion that blocked meaningful $context var error messages. (dwflpp::emit_address): Bypass dwfl_module_relocate_address() for kernel symbols as it has been unreliable; subtract sess.sym_stext manually. * testsuite/buildok/seventeen.stp: Extend test with module $global.
* brown paper bag fix for commit 5d6b0142Frank Ch. Eigler2009-03-241-2/+2
| | | | return != break
* further accelerate pass-3 symbol/unwind process, skip one more iterationFrank Ch. Eigler2009-03-241-2/+4
|
* accelerate pass-3 symbol/unwind generationFrank Ch. Eigler2009-03-241-2/+2
| | | | | * translate.cxx (emit_symbol_data): Abort dwfl_getmodules loop as soon as we run out of modules we're looking for.
* fix build regression w/o -tFrank Ch. Eigler2009-03-201-2/+0
| | | | * translate.cxx (emit_common_header): Always emit atomic_t skipped_* counters.
* PR9967: don't count -DINTERRUPTIBLE=1 reentrancy against MAXSKIPPEDFrank Ch. Eigler2009-03-201-2/+3
| | | | | | | * tapsets.cxx (common_probe_entryfn_prologue): Become conditional on !INTERRUPTIBLE. * translate.cxx (emit_module_exit): Still print skipped_count_reentrant with -t, even if skipped_count was zero.
* Get the canonical path of the main file for comparison at runtime.Mark Wielaard2009-03-171-0/+9
| | | | | | | | | When given directly by the user through -d or in case of the kernel name and path might differ. path should be used for matching. * runtime/sym.h (_stp_module): Add path field. * runtime/task_finder.c (__stp_tf_vm_cb): Use module path to compare vm_path. * translate.cxx (dump_unwindsyms): Output canonical path.
* Add workaround for dwfl_module_build_id bug with elfutils < 0.140.Mark Wielaard2009-03-161-7/+25
| | | | | * translate.cxx (dump_unwindsyms): Check elfutils version and whether build_id_vaddr < base, and if so add main_bias to address.
* Let -DINTERRUPTIBLE=0 mask interrupts in probesJosh Stone2009-03-091-0/+3
| | | | | | | | | | | | | | | Some time ago we loosened up the code for all probe types to allow interrupts during the handler. However, when probing something like kernel.trace("*"), you get a mix of probes in and out of the interrupt path, and it becomes much more common to have probes skipped due to interrupt reentrancy. The common_probe_entryfn_prologue and common_probe_entryfn_epilogue functions had an interruptible flag, but this was no longer used anywhere. I removed this flag, but then reused the logic to check an INTERRUPTIBLE macro instead. Now users can use -DINTERRUPTIBLE=0 to prevent interrupt reentrancy in their script, at the cost of a bit more overhead to toggle the interrupt mask.
* Check pending_interrupts more frequently during unwindsyms (pass 3) processingFrank Ch. Eigler2009-03-081-0/+3
|
* Tweak tracepoint logic to run on tracepoint_synchronize_unregister()-less RHEL5Frank Ch. Eigler2009-03-071-0/+5
|
* PR9919: Set last_stmt for array (scalar or statistical) assignments.Mark Wielaard2009-03-041-2/+2
| | | | * translate.cxx (visit_arrayindex): Update last_stmt.
* Skip generating empty struct globalWenji Huang2009-02-241-15/+17
| | | | | | | | Impact: trivial cleanup. Avoid emitting empty struct global code that is harmless. Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* Adjust extra_offset address against module base.Mark Wielaard2009-02-241-0/+4
| | | | | * translate.cxx (dump_unwindsyms): Adjust extra_offset always against module base as workaround for buggy elfutils < 0.138.
* Made probe_start()/probe_exit() function definitions match their declarations.David Smith2009-02-231-2/+2
| | | | | | | 2009-02-23 David Smith <dsmith@redhat.com> * translate.cxx (translate_pass): Made probe_start()/probe_exit() function definitions match their declarations.
* Adjust ET_DYN symbol addresses against module base.Mark Wielaard2009-02-211-1/+10
| | | | | * translate.cxx (dump_unwindsyms): Adjust sym_addr for ET_DYN always against module base as workaround for buggy elfutils < 0.138.
* Ignore kernel functions with "absolute" addresses.Mark Wielaard2009-02-201-7/+6
| | | | | | | translate.cxx (dump_unwindsyms): Augment the test for creating the stap-symbols to be STT_FUNC && !(SHN_UNDEF || SHN_ABS). The combination STT_FUNC && SHN_ABS only seems to occur on older i386 kernels and covers the vDSO "functions" we were seeing.
* Ignore symbols before module base address.Mark Wielaard2009-02-191-0/+6
|
* Enable typecasting with @castJosh Stone2009-02-181-1/+9
|\ | | | | | | | | | | | | println(@cast(myptr, "task_struct")->pid) println(@cast(myptr, "task_struct", "kernel")->pid) Merge branch 'typecast', bump ChangeLog entries to push date