| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
* translate.cxx (emit_symbol_data): Use ~0 instead of -1 for big unsigned constant
|
| |
| |
| |
| |
| |
| | |
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.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|\| |
|
| |
| |
| |
| |
| | |
On powerpc, function descriptors are in the .opd section as NO_TYPE.
Include them in stap-symbols.h
|
|\| |
|
| |
| |
| |
| | |
* translate.cxx (dump_unwindsyms): Initialize eh_frame to 0, not NULL.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
Makefile.in
|
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
* translate.cxx (dump_unwindsyms): Just check that dwfl_module_relocations()
return more than 1 relocation section bases before calling
dwfl_module_address_section().
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
aclocal.m4
configure
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
* translate.cxx (dump_unwindsyms): Get and check against module end, only
check STT_FUNC && SHN_ABS for kernel, check shndxp for non-allocated
section.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|\| |
|
| |
| |
| |
| | |
* translate.cxx (dump_unwindsyms): Filter out sym.st_value < base values.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$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.
|
|
|
|
| |
return != break
|
| |
|
|
|
|
|
| |
* translate.cxx (emit_symbol_data): Abort dwfl_getmodules loop
as soon as we run out of modules we're looking for.
|
|
|
|
| |
* translate.cxx (emit_common_header): Always emit atomic_t skipped_* counters.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* translate.cxx (dump_unwindsyms): Check elfutils version and whether
build_id_vaddr < base, and if so add main_bias to address.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
* translate.cxx (visit_arrayindex): Update last_stmt.
|
|
|
|
|
|
|
|
| |
Impact: trivial cleanup.
Avoid emitting empty struct global code that is harmless.
Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
|
|
|
|
|
| |
* translate.cxx (dump_unwindsyms): Adjust extra_offset always
against module base as workaround for buggy elfutils < 0.138.
|
|
|
|
|
|
|
| |
2009-02-23 David Smith <dsmith@redhat.com>
* translate.cxx (translate_pass): Made probe_start()/probe_exit()
function definitions match their declarations.
|
|
|
|
|
| |
* translate.cxx (dump_unwindsyms): Adjust sym_addr for ET_DYN always
against module base as workaround for buggy elfutils < 0.138.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
println(@cast(myptr, "task_struct")->pid)
println(@cast(myptr, "task_struct", "kernel")->pid)
Merge branch 'typecast', bump ChangeLog entries to push date
|