* 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.
* translate.cxx (c_unparser::emit_common_header): Added 'data'
variable to context structure to support procfs probes.
* tapsets.cxx: Improved procfs probe handling.
* stat-common.c (_stp_stat_calc_buckets): New function. Common
bucket calculation and error reporting code.
(_stp_bucket_to_val): New function.
(_stp_val_to_bucket): Renamed and now handles negative numbers.
(_stp_stat_print_histogram): Handle negative values in log histograms.
(__stp_stat_add): Cleanup..
PR 4633
* systemtap.context/backtrace.stp: Add testcases for the return
probe and the profile probe.
* systemtap.context/backtrace.tcl: Ditto.
* /systemtap.context/systemtap_test_module2.c: Ditto.
* systemtap.maps/pmap_agg_overflow.stp: Ensure that the percpu arrays
don't overflow before we get the chance to test aggregation overflow.
Also use a more optimal overflow limit (MAXMAPENTRIES + 1).
PR4542
* tapsets.cxx (dwarf_query::build_blacklist): add __switch_to to
blacklisted_return_probes on i686
* systemtap.stress/current.stp: Don't probe the return of __switch_to
on i686
From Lai Jiangshan <laijs@cn.fujitsu.com>
* syscalls2.stp (quotactl): Init special_str before use.
(rt_sigqueueinfo): Change pid's type from %p to %d in argstr.
dsmith [Thu, 30 Aug 2007 20:23:50 +0000 (20:23 +0000)]
2007-08-30 David Smith <dsmith@redhat.com>
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.
fche [Fri, 24 Aug 2007 19:26:51 +0000 (19:26 +0000)]
2007-08-24 Frank Ch. Eigler <fche@redhat.com>
PR 4899
* tapsets.cxx (dwflpp::has_single_line_record): Extended,
abstraction violated.
(iterate_over_srcfile_lines): Remove exactly line number match
logic. Improve error message to offered better-checked alternative
line numbers.
(query_srcfile_line): Whoops, pass scope_die down for statement("...")
probes, to enable $target var processing.
hunt [Thu, 23 Aug 2007 13:05:49 +0000 (13:05 +0000)]
2007-08-23 Martin Hunt <hunt@redhat.com>
From Cai Fei <caifei@cn.fujitsu.com>
* aux_syscalls.stp (_waitid_opt_str): New.
(_wait4_opt_str): Just handle wait4 options.
* syscalls2.stp (sys_waitid): Use _waitid_opt_str.
zhaolei [Thu, 23 Aug 2007 01:52:26 +0000 (01:52 +0000)]
2007-08-23 Zhaolei <zhaolei@cn.fujitsu.com>
* aux_syscalls.stp (_send_flags_str): Add support for MSG_MORE
(used in send, sendto, sendmsg and compat_sys_sendmsg).
Change name of _send_flags_str to _sendflags_str for unify with
_recvflags_str.
* syscalls2.stp(send, sendto, sendmsg, compat_sys_sendmsg): Change
name of _send_flags_str to _sendflags_str for unify with _recvflags_str.
zhaolei [Thu, 23 Aug 2007 01:46:33 +0000 (01:46 +0000)]
2007-08-21 Zhaolei <zhaolei@cn.fujitsu.com>
* aux_syscalls.stp (_send_flags_str): Add support for MSG_MORE
(used in send, sendto, sendmsg and compat_sys_sendmsg).
Change name of _send_flags_str to _sendflags_str for unify with
_recvflags_str.
hunt [Wed, 22 Aug 2007 15:12:22 +0000 (15:12 +0000)]
2007-08-22 Martin Hunt <hunt@redhat.com>
* aux_syscalls.stp (_utimensat_flag_str): New.
(_dfd_str): New.
(_struct_timeval2_u): Deleted.
(_struct_timeval_u): Take a number of structs to decode.
(_struct_compat_timeval2_u): Deleted
(_struct_compat_timeval_u): Take a number of structs to decode.
(_struct_timespec_u): Take a number of structs to decode.
Recognize UTIME_NOW and UTIME_OMIT.
(_struct_compat_timespec_u): Ditto.
wenji [Wed, 22 Aug 2007 09:42:12 +0000 (09:42 +0000)]
2007-08-22 Wenji Huang <wenji.huang@oracle.com>
* nfsd.stp (nfsd.proc?.*): Modify evaluating client_ip
with function addr_from_rqst to make it compatible in kernel>=2.6.19
(nfsd.proc4.compound,nfsd.read,nfsd.write): Fix typo.
(nfsd.unlink): Fix reference to variable iap.
hiramatu [Mon, 20 Aug 2007 18:25:14 +0000 (18:25 +0000)]
2007-08-20 Masami Hiramatsu <mhiramat@redhat.com>
* ioblock.stp: Fix __bio_ino() not to access i_ino if the page is not
assigned to any inode.
* stack-x86_64.c: Fix backtrace to use the value of stack register
instead of its address.
hunt [Fri, 17 Aug 2007 20:02:15 +0000 (20:02 +0000)]
2007-08-17 Martin Hunt <hunt@redhat.com>
PR3857
From Masami Hiramatsu
* utt.c (utt_subbuf_start_callback): Use overwrite flag.
* control.c (_stp_ctl_open_cmd): Set overwrite_flag off.
(_stp_ctl_close_cmd): Set overwrite flag on.
fche [Fri, 17 Aug 2007 17:29:30 +0000 (17:29 +0000)]
2007-08-17 Frank Ch. Eigler <fche@elastic.org>
As suggested by "Zhaolei" <zhaolei@cn.fujitsu.com>:
* elaborate.cxx (semantic_pass_optimize[12],
unresolved, invalid, mismatch): Use stringstream and
print_error(semantic_error) instead of ad-hoc cerr.
jistone [Fri, 17 Aug 2007 01:54:28 +0000 (01:54 +0000)]
2007-08-16 Josh Stone <joshua.i.stone@intel.com>
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.
hunt [Thu, 16 Aug 2007 12:55:19 +0000 (12:55 +0000)]
2007-08-16 Martin Hunt <hunt@redhat.com>
* aux_syscalls.stp (__get_argv): Add parameter to
optionally skip the first argv (argv[0]).
(__get_compat_argv): Ditto.
* syscalls.stp (execve): Set args to the whole argv.
For argstr use filename plus argv starting at [1].
(compat_execve): Ditto.
* ppc64/syscalls.stp (sys32_exevve): Ditto.
From Cai Fei <caifei@cn.fujitsu.com>
* syscalls.stp (sts_getpgid): Add pid arg.