kenistoj [Tue, 16 Oct 2007 23:40:49 +0000 (23:40 +0000)]
* runtime/uprobes/uprobes.[ch], uprobes_i386.[ch],
uprobes_ppc64.h, uprobes_s390.h: Adjusted SLOT_IP and
arch_validate_probed_insn to accept task pointer (needed by
x86_64); added uprobe_probept_arch_info and uprobe_task_arch_info
(ditto).
* runtime/uprobes/uprobes_i386.c: Fixed a couple of glitches
discovered when porting to x86_64
roland [Mon, 15 Oct 2007 23:31:50 +0000 (23:31 +0000)]
2007-10-15 Roland McGrath <roland@redhat.com>
PR 5101
* loc2c.c (struct location): Replace regno union member with struct
member reg, fields regno and offset.
(translate): Update uses.
(emit_base_fetch, emit_base_store, emit_loc_register): Likewise.
Fail if reg.offset is not zero.
(location_relative): Handle DW_OP_plus_uconst relative to loc_register.
(c_translate_array): Handle array index into loc_register.
dsmith [Mon, 15 Oct 2007 20:12:36 +0000 (20:12 +0000)]
2007-10-15 David Smith <dsmith@redhat.com>
* tapsets.cxx (mark_query::handle_query_module): Checks for marker
to be in the proper section.
(mark_derived_probe_group::emit_module_decls): Updated emitted
marker C code for 10/2/2007 markers patch. Fixes PR 5178.
zhaolei [Mon, 15 Oct 2007 05:24:01 +0000 (05:24 +0000)]
2007-10-15 Zhaolei <zhaolei@cn.fujitsu.com>
From Cai Fei <caifei@cn.fujitsu.com>
* conversions.stp: Add a function kernel_string_n for copy
non-0-terminated string with fixed length from kernel space at
given address.
* stapfuncs.5.in: Add kernel_string_n.
* nfsd.stp: Using kernel_string_n to copy non-0-terminated string
with fixed length from kernel space at given address.
* nfs_proc.stp: Ditto.
dsmith [Fri, 12 Oct 2007 20:29:21 +0000 (20:29 +0000)]
2007-10-12 David Smith <dsmith@redhat.com>
* tapsets.cxx (dwflpp::setup): Added 'debuginfo_needed' parameter
to not error if no debuginfo present.
(hex_dump): New function.
(mark_query::handle_query_module): Updated for
10/2/2007 markers patch. Currently only handles markers in the
kernel image itself - not in modules.
hunt [Fri, 12 Oct 2007 19:46:35 +0000 (19:46 +0000)]
2007-10-12 Martin Hunt <hunt@redhat.com>
* transport.c (_stp_ask_for_symbols): Don't ask for
transport_info yet. Need to wait until symbols are
received.
(_stp_work_queue): Rename _stp_ready_q to _stp_ctl_ready_q.
* procfs.c: Create a ".symbols" channel and use it for
STP_MODULE and STP_SYMBOLS. Rename "cmd" channel to ".cmd".
* control.c: Ditto.
hunt [Fri, 12 Oct 2007 19:42:32 +0000 (19:42 +0000)]
2007-10-12 Martin Hunt <hunt@redhat.com>
Changes to separate the symbols from the command channel.
* cap.c (init_cap): Add CAP_DAC_OVERRIDE.
* staprun.h: Change init_ctl_channel prototype.
* ctl.c (init_ctl_channel): Modify to open either
a command or symbol channel. Use ".cmd" and ".symbols"
as the new names.
* mainloop.c (init_stapio): Call init_ctl_channel(0);
* staprun.c (cleanup): Call stop_symbol_thread().
(main): Call start_symbol_thread().
* staprun_funcs.c (handle_symbols): Make a thread.
(start_symbol_thread): New.
(stop_symbol_thread): New.
kenistoj [Tue, 9 Oct 2007 22:06:40 +0000 (22:06 +0000)]
PR 5083
* runtime/uprobes/uprobes.c: Adjust module ref-count
when creating or removing uprobe_process, so "rmmod
--wait uprobes" waits as needed until uretprobed
functions return.
kenistoj [Mon, 8 Oct 2007 21:52:12 +0000 (21:52 +0000)]
PR 5709
* main.cxx: Add pass 4.5: make uprobes.ko in runtime/uprobes
* buildrun.cxx: Add uprobes_enabled() and make_uprobes().
Factor run_make_cmd() out of compile_pass().
* buildrun.h: Add uprobes_enabled and make_uprobes decls.
* tapsets.cxx: Do correct #include for modprobed uprobes.ko;
set need_uprobes in pass 2.
* session.h: Add need_uprobes
* runtime/staprun/common.c: Add -u option -> need_uprobes
* runtime/staprun/staprun_funcs.c: Generalize insert_module()
to support inserting uprobes.ko.
* runtime/staprun/staprun.c: Add enable_uprobes(). insert_module
call becomes insert_stap_module().
* runtime/staprun/staprun.h: Reflect insert_module() and
need_uprobes changes
* runtime/uprobes/*.[c,h]: uprobes is built as a module,
rather than included into the source of the stap-generated
module.
* runtime/uprobes/Makefile: Added
fche [Sat, 6 Oct 2007 02:42:29 +0000 (02:42 +0000)]
PR1119: unused variable elision warnings
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.
* aux_syscalls.stp (_struct_timeval): Removed. No longer
necessary now that we have structure access in scripts.
(_struct_timespec): Ditto.
(_struct_itimerval): Ditto.
(_struct_timezone_u): Remove random CATCH_DEREF_FAULT()
line.
(_stp_sigset_str): New.
(_struct_sigaction_u): New.
fche [Thu, 4 Oct 2007 03:21:00 +0000 (03:21 +0000)]
2007-10-03 Frank Ch. Eigler <fche@elastic.org>
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.
fche [Tue, 2 Oct 2007 21:41:06 +0000 (21:41 +0000)]
PR 3635: reduce number of global objects
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.
fche [Tue, 2 Oct 2007 17:44:25 +0000 (17:44 +0000)]
2007-10-02 Frank Ch. Eigler <fche@redhat.com>
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.
* aux_syscalls.stp (_stp_lookup_str, _stp_lookup_or_str):
New functions to efficiently and safely read arrays of values
and return a string.
(_signal_name): Reimplement using _stp_lookup_str().
(_semctl_cmd): Ditto.
(__fork_flags): Ditto.
(_mmap_flags): Ditto.
(_mprotect_prot_str): Ditto.
(_shmat_flags_str): Ditto.
(_at_flag_str): Ditto.
(get_mmap_args): Complete rewrite for safety and correctness.
From Cai Fei <caifei@cn.fujitsu.com>
* rpc.stp (sunrpc.clnt.shutdown_client): Add argument progname's
definition for probe sunrpc.clnt.shutdown_client, because it
is in the man page but not defined in tapset.
From Cai Fei <caifei@cn.fujitsu.com>
* rpc.stp (sunrpc.clnt.call_sync, sunrpc.clnt.call_async): Fix
the output format of flags in argstr from hex to decimal just
to make it same as other probes.
Specified explicit types for __find_bdevname() parameters and return value. The types could not be determined correctly when __find_bdevname() was used in nfs.stp
Added __page_index() to work around problem dereferencing unions in stap language.
Made generic.fop.sendfile conditional on kernel <= 2.6.22. generic_file_sendfile() was removed in 2.6.23.
From Lai Jiangshan <laijs@cn.fujitsu.com>
* syscall.stp (syscall.brk): Add probe point
kernel.function("ia64_brk").
* syscall.stp (syscall.mremap): Add probe point
kernel.function("ia64_mremap").
From Lai Jiangshan <laijs@cn.fujitsu.com>
* syscall.stp (syscall.brk): Add probe point
kernel.function("ia64_brk")
* syscall.stp (syscall.mremap): Add probe point
kernel.function("ia64_mremap")
PR 3916
* buildrun.cxx (compile_pass): Add new autoconf options for checking
time related APIs.
* time.c (stp_time_t): Rename cpufreq to freq.
(__stp_get_freq): Rename from __stp_estimate_cpufreq. Use tsc_khz or
cpu_khz if it is available. Use itc_freq on ia64.
(__stp_ktime_get_real_ts): New function to get current kernel time.
(__stp_time_timer_callback): Call __stp_ktime_get_real_ts to get
base time.
(__stp_init_time): Ditto.
(__stp_constant_freq): New function to check the processor has
constant frequency timestamp counter.
(_stp_kill_time): Don't use the cpufreq notifier if the processor has
constant frequency timestamp counter.
(_stp_init_time): Ditto.
* autoconf-ktime-get-real.c : New file.
* autoconf-constant-tsc.c: Ditto.
* autoconf-tsc-khz.c: Ditto.