hiramatu [Mon, 3 Dec 2007 21:30:31 +0000 (21:30 +0000)]
2007-12-03 Masami Hiramatsu <mhiramat@redhat.com>
PR 5376
* parse.cxx (lexer::scan): Treat '*' as an alphabet if the wildcard
flag is true.
(parser::parse_probe_point): Call parser::next() with wildcard = true.
(parser::scan_pp): Add wildcard flag and pass it to lexer::scan.
(parser::next): Ditto.
(parser::peek): Ditto.
* parse.h : Ditto.
* testsuites/perseko/twentytwo.stp: Change testcase to the wildcarded
probe points with spaces.
hiramatu [Tue, 20 Nov 2007 21:03:16 +0000 (21:03 +0000)]
2007-11-20 Masami Hiramatsu <mhiramat@redhat.com>
PR 4935.
* parse.cxx (parser::parse_probe_point): Parse "if" condition
following probe point.
* staptree.h (probe_point): Add "condition" field.
(probe): Add "condition" field and "add_condition" method.
(deep_copy_visitor): Add "deep_copy" method for the expression.
* staptree.cxx (probe_point::probe_point): Initalize it.
(probe::add_condition): Implement it.
(probe::print): Output "condition" field.
(probe::str): Ditto.
(deep_copy_visitor::deep_copy): Implement it.
* elaborate.h (derived_probe): Add "insert_condition_statement"
method.
* elaborate.cxx (derived_probe::derived_probe): Initialize "condition"
field, and insert a condition check routine on the top of body.
(derived_probe::insert_condition_statement): Implement it.
(alias_expansion_builder::build): Pass the condition from the alias
referer to new alias.
* tapsets.cxx (be_derived_probe): Remove unused constructor.
(dwarf_derived_probe::dwarf_derived_probe): Insert a condition check
routine on the top of body.
(mark_derived_probe::mark_derived_probe): Ditto.
(mark_builder::build): Pass the base location to mark_derived_probe.
dsmith [Thu, 15 Nov 2007 16:51:11 +0000 (16:51 +0000)]
2007-11-15 David Smith <dsmith@redhat.com>
* tapsets.cxx: Removed mark_query structure.
(mark_derived_probe::mark_derived_probe): Just looks for "kernel"
marker probes.
(mark_builder::build_no_more): No longer kern_dw, instead clears
the marker cache.
(mark_builder::build): Now parses Module.markers file to find
marker list and stores them in a cache.
(register_standard_tapsets): Removed 'module("foo").mark("bar")'.
All markers now go through 'kernel.mark("bar")'.
zhaolei [Wed, 14 Nov 2007 06:19:28 +0000 (06:19 +0000)]
2007-11-14 Zhaolei <zhaolei@cn.fujitsu.com>
From Lai Jiangshan <laijs@cn.fujitsu.com>
* signal.stp (signal.do_action): Call __get_action_mask to get mask
to fix semantic error of accessing a struct.
* signal.stp (__get_action_mask): Add.
kenistoj [Tue, 13 Nov 2007 21:57:21 +0000 (21:57 +0000)]
PR 5270
* main.cxx: Restored pre-10-08 version: moved uprobes build to
buildrun.cxx.
* buildrun.cxx: Reworked uprobes build so that the resulting
Module.symvers can be used in building the stap-generated
module. If user isn't root, call verify_uprobes_uptodate()
rather than trying (and failing) to rebuild uprobes.ko.
* buildrun.h: uprobes_enabled() and make_uprobes() are no
longer extern.
* runtime/uprobes/Makefile: Added uprobes.ko target for use
by verify_uprobes_uptodate().
hunt [Mon, 12 Nov 2007 22:14:20 +0000 (22:14 +0000)]
2007-11-12 Martin Hunt <hunt@redhat.com>
* stap.1.in: Replaced references to the log() function.
* stapex.5.in: Ditto.
* stapfuncs.5.in: Ditto. ALso remove print and printf. They are
documented in stap.1.in.
hunt [Mon, 12 Nov 2007 21:55:53 +0000 (21:55 +0000)]
2007-11-12 Martin Hunt <hunt@redhat.com>
* 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".
hiramatu [Fri, 9 Nov 2007 18:12:06 +0000 (18:12 +0000)]
2007-11-09 Masami Hiramatsu <mhiramat@redhat.com>
PR3858
* print.c: Add -DRELAY_HOST=<hostname> and -DRELAY_GUEST=<hostname>
options support.
(_stp_print_flush): Disable irqs if -DRELAY_* option is specified.
* print_old.c: Export stp_print_flush to other modules if the
-DRELAY_HOST option is specified.
* print_new.c: Ditto.
* transport.c (_stp_transport_init): Reduce relay buffer size to
64KB*2 if -DRELAY_GUEST is specified.
* systemtap.printf/sharedbuf.exp: New test for buffer sharing option.
* systemtap.printf/sharedbuf.stp: Ditto.
* systemtap.printf/hello.stp: Ditto.
* systemtap.printf/hello2.stp: Ditto.
zhaolei [Thu, 8 Nov 2007 02:02:47 +0000 (02:02 +0000)]
2007-11-8 Zhaolei <zhaolei@cn.fujitsu.com>
From Lai Jiangshan <laijs@cn.fujitsu.com>
* rpc.stp (clones_from_clnt): Use deref to check, then use
atomic_read to read an atomic_t to avoid compilation error of
type matching.
(tasks_from_clnt): Ditto.
hunt [Thu, 1 Nov 2007 19:19:33 +0000 (19:19 +0000)]
2007-11-01 Martin Hunt <hunt@redhat.com>
* procfs.c, control.c, transport.c: Recognize when stapio
is detached and disable delayed work. Enable when attached.
Cleanup code to destroy workqueue on exit.
mmason [Thu, 25 Oct 2007 23:25:45 +0000 (23:25 +0000)]
stat-common.c: Allow histogram bucket elision to be turned off
with -DHIST_ELISION=<negative #>. Also cleaned up looping code to
prevent unnecessary interation over non-existent buckets.
hiramatu [Fri, 19 Oct 2007 19:54:23 +0000 (19:54 +0000)]
2007-10-19 Masami Hiramatsu <mhiramat@redhat.com>
From Satoru Moriya <satoru.moriya.br@hitachi.com>:
* staplog.c :(create_output_dir): New function for creating output
directory.
(create_output_filename): New function for making output filename.
(print_rchan_info): New function for displaying relay channel status.
(open_output_file): New function for opening output file.
(output_cpu_logs): Cleanup code and fix bugs to retrieve buffer
data even when the last buffer is full and even if the systemtap
uses old(non-utt) format. Add a routine for '-a' option.
(cmd_staplog): Add '-a' option.
(help_staplog): Ditto.
Increase reliability under loads.
* systemtap.samples/pfaults.exp: Increase MAXACTION.
* systemtap.context/backtrace.tcl: Handle just
a single userspace address.
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.