dsmith [Fri, 12 Jan 2007 16:33:16 +0000 (16:33 +0000)]
2007-01-12 David Smith <dsmith@redhat.com>
* tapsets.cxx
(dwarf_var_expanding_copy_visitor::visit_target_symbol): Since
array behavior has changed (setting to 0 no longer deletes the
array element), we delete the internal counter array element when
providing target variable access in return probes.
hunt [Wed, 10 Jan 2007 15:07:25 +0000 (15:07 +0000)]
2007-01-10 Martin Hunt <hunt@redhat.com>
PR 3708
* map.c (str_copy): Check for NULL pointers.
(_new_map_set_int64): Don't check val for 0.
(_new_map_set_str): Don't check val for NULL.
fche [Tue, 2 Jan 2007 04:33:41 +0000 (04:33 +0000)]
2007-01-01 Frank Ch. Eigler <fche@redhat.com>
* configure.ac: Bump version to 0.5.12 for release.
* configure: Regenerated.
* NEWS, AUTHORS: Populate & repopulate.
* examples/*: Added several .stp/.txt files from the wiki.
fche [Sat, 30 Dec 2006 04:25:51 +0000 (04:25 +0000)]
2006-12-29 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx (*group:emit_module_init): flush stdout less for timing
mode. Also, Set probe_point variable ...
* translate.cxx (emit_module_init): ... so on registration failure, a
usable error message can be generated.
fche [Sat, 30 Dec 2006 03:54:51 +0000 (03:54 +0000)]
2006-12-29 Frank Ch. Eigler <fche@redhat.com>
PR 3523.
* tapsets.cxx (common_probe_entryfn_prologue,epilogue): Restore
support for -t (benchmarking) mode.
* translate.cxx (emit_common_header,emit_module_init):Ditto.
(emit_module_exit,emit_probe): Ditto, with most meat here.
2006-12-29 Frank Ch. Eigler <fche@redhat.com>
PR 3523.
* buildok/fourteen.stp, fourteen-plus.stp: Tweak & add a test.
* systemtap.base/bench.stp: Work around randomized-ordered probes.
* systemtap.base/bench.exp: Tighten output requirements.
jistone [Fri, 22 Dec 2006 22:18:02 +0000 (22:18 +0000)]
2006-12-22 Josh Stone <joshua.i.stone@intel.com>
* stap.1.in: Document how to specify the size of global arrays.
testsuite/
* buildok/array_size.stp, parseko/array01.stp, parseko/array02.stp,
parseko/array03.stp, parseko/array04.stp, transko/array01.stp,
systemtap.base/array_size.exp, systemtap.base/array_size.stp:
Tests for specifying the size of global arrays.
jistone [Fri, 22 Dec 2006 02:34:05 +0000 (02:34 +0000)]
2006-12-21 Josh Stone <joshua.i.stone@intel.com>
PR 3671
* parse.cxx (parser::parse_global): Allow a maxsize on global arrays.
* staptree.h (struct vardecl): Add the maxsize field.
* staptree.cxx (vardecl::vardecl): Init. maxsize.
(vardecl::set_arity): Don't allow arity 0 when there's a maxsize.
(vardecl::compatible_arity): Ditto.
(vardecl::print): Include maxsize in output.
(target_symbol::print): Ditto.
* translate.cxx (struct mapvar, mapvar::mapvar): Add maxsize.
(mapvar::init): Init maps with the given maxsize if specified, else
keep using MAXMAPENTRIES.
(mapvar::set): Make the error message give the maxsize.
(mapvar::add): Ditto, and check for overflow on pmap add.
(c_unparser::getmap): Pass the maxsize from the vardecl to mapvar.
dsmith [Wed, 20 Dec 2006 15:56:14 +0000 (15:56 +0000)]
2006-12-20 David Smith <dsmith@redhat.com>
PR 3519.
* Makefile.am: Added 'examples' directory to the 'EXTRA_DIST'
variable so that the examples directory will be added to the
distribution directory. Added variables 'SAMPLE_DEST_DIR' and
'SAMPLE_SRC' and target 'dist-add-samples' to copy some of the
testsuite sample scripts to the examples directory when creating a
distribution directory.
* Makefile.in: Regenerated.
* systemtap.spec.in: Added 'examples' directory to the %doc list
so that the examples directory will be installed on a user's
system.
fche [Tue, 19 Dec 2006 22:00:15 +0000 (22:00 +0000)]
2006-12-19 Frank Ch. Eigler <fche@redhat.com>
PR 3522.
* tapsets.cxx (dwflpp::emit_address): Call
_stp_module_relocate only once per session.
Error message cleanup: duplicate elimination etc.
* session.h (saved_errors): Store a set of 'em.
(num_errors): Return set size. Remove old numeric field.
Update all callers.
* elaborate.cxx (systemtap_session::print_errors):
Print each encountered message just once.
* staptree (semantic_error): Make msg2 writeable.
Add a chain field.
* tapsets.cxx (*var_expanding*:visit_target_symbol): Set saved
semantic_error's chain field.
* elaborate.cxx (register_library_aliases, visit_foreach_loop,
visit_functioncall, derive_probes): Plop "while: ..." error
message prefix/suffix right into the semantic_error message string.
* parse.cxx (lexer::scan): Identify erroneous token better
in error message for unresolvable $N/@M command line args.
* util.h (lex_cast_hex): Use std::hex, not std::ios::hex.
2006-12-19 Frank Ch. Eigler <fche@redhat.com>
PR 3522.
* buildok/twentyfive.stp: New test for static $var access.
jistone [Tue, 19 Dec 2006 00:24:32 +0000 (00:24 +0000)]
2006-12-18 Josh Stone <joshua.i.stone@intel.com>
* systemtap.base/deref.exp, systemtap.base/deref.exp: Add a test for
successfully dereferencing pointers of various sizes. This is known to
fail on x86 for 64-bit values -- PR 3079.
dsmith [Mon, 18 Dec 2006 19:32:01 +0000 (19:32 +0000)]
2006-12-18 David Smith <dsmith@redhat.com>
* lket/b2a/Makefile.in: Regenerated. This needed to be done since
lket/b2a/README was removed but lket/b2a/Makefile.in still had a
reference to it which was causing "make distdir" to fail.
dsmith [Thu, 14 Dec 2006 16:11:41 +0000 (16:11 +0000)]
2006-12-14 David Smith <dsmith@redhat.com>
* tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added
'return_ts_map' member variable.
(dwarf_var_expanding_copy_visitor::visit_target_symbol):
Optimization. If we've already seen this target variable in this
return probe, return the last replacement (instead of creating a
new replacement).
dsmith [Wed, 13 Dec 2006 20:56:19 +0000 (20:56 +0000)]
2006-12-13 David Smith <dsmith@redhat.com>
* tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added
'add_probe' member variable. Initialized it in ctor.
(dwarf_var_expanding_copy_visitor::visit_target_symbol):
Optimization. Instead of generating one entry probe per target
variable accessed in a return probe, now just generates one entry
probe for all target variables accessed in a particular return
probe. It does this by creating a new probe in the new
'add_probe' member variable.
(dwarf_derived_probe::dwarf_derived_probe): If add_probe isn't
NULL, make sure it gets derived later.
jistone [Sat, 9 Dec 2006 02:03:58 +0000 (02:03 +0000)]
2006-12-08 Josh Stone <joshua.i.stone@intel.com>
PR 3681.
* staptree.h (struct vardecl): Add a literal 'init' member for the
initialization value of globals.
* staptree.cxx (vardecl::vardecl): Initialize 'init' to NULL.
(vardecl::print): Print global init value during pass-1 output.
* main.cxx (printscript): Print global init values during verbose
pass-2 output.
* parse.cxx (parser::parse_global): Set the initialization literal of
global vardecls.
* translate.cxx (var::init): Don't unconditionally override the value
of numeric globals when the module_param isn't used.
(c_unparser::emit_global_param): Write numeric module_params directly
into the global variable, as an int64_t instead of long.
(c_unparser::emit_global): Add initialization to global declarations.
Don't create a temp module_param long for numeric globals anymore.
runtime/
* runtime.h (param_set_int64_t, param_get_int64_t,
param_check_int64_t): New functions to allow taking module parameters
directly as int64_t values.
testsuite/
* systemtap.base/global_init.exp, systemtap.base/global_init.stp: New
test for checking the timeliness of global initialization.
jistone [Fri, 8 Dec 2006 02:17:09 +0000 (02:17 +0000)]
2006-12-07 Josh Stone <joshua.i.stone@intel.com>
PR 3624.
* tapsets.cxx (struct be_derived_probe): Add a new priority parameter
for begin/end probes, and a comparison function for sorting.
(be_builder::build): Parse the priority & pass it to be_derived_probe.
(be_derived_probe_group::emit_module_init, emit_module_exit): Sort the
probe list by priority before emitting any code.
(register_standard_tapsets): Add new begin/end variants.
* parse.cxx (parser::parse_literal): Allow negative numeric literals,
by checking for a '-' unary operator right before a number.
testsuite/
* systemtap.base/be_order.exp, systemtap.base/be_order.stp,
semok/beginend.stp: New tests for begin/end priorities.
* lib/stap_run.exp: Anchor OUTPUT_CHECK_STRING to the end of output.
* systemtap.base/maxactive.exp: Fix to compare output to the end.
* systemtap.base/probefunc.exp: Ditto.
* systemtap.samples/ioblocktest.exp: Ditto.
* systemtap.samples/ioblocktest.stp: Ditto.
* systemtap.samples/tcptest.exp: Ditto.
jistone [Thu, 7 Dec 2006 03:01:42 +0000 (03:01 +0000)]
2006-12-06 Josh Stone <joshua.i.stone@intel.com>
PR 3623.
* tapsets.cxx (timer_derived_probe_group::emit_module_decls): Restart
the timers if we are in STARTING or RUNNING state.
(hrtimer_derived_probe_group::emit_module_decls): Ditto.
(be_derived_probe_group::emit_module_init): indicate error to the rest
of the initialization if any begin probes fail.
* translate.cxx (c_unparser::emit_module_init): Set the global error
state on an initialization error so timers know to shut down.
runtime/
* time.c (stp_timer_reregister): Add a global to control whether the
gettimeofday timer should restart itself, for clean shutdown.
(__stp_time_timer_callback): Check the global.
(_stp_kill_time, _stp_init_time): Set the global.
(_stp_gettimeofday_ns): Switch to preempt_enable_no_resched.
* time.c (__stp_time_cpufreq_callback): Use the cpu# from the notifier.
(_stp_init_time): No need to disable preemption around cpufreq init.
dsmith [Wed, 29 Nov 2006 19:19:36 +0000 (19:19 +0000)]
2006-11-29 David Smith <dsmith@redhat.com>
* tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added
'add_block' member variable. Constructor sets it to NULL.
(dwarf_var_expanding_copy_visitor::visit_target_symbol): Fixes the
problem of accessing a cached target variable in a loop. Cached
target variable is assigned to a temporary variable, which can be
safely access multiple times. In addition, the cached value is
deleted after being read.
(dwarf_derived_probe::dwarf_derived_probe): Adds in the new block
of code created in visit_target_symbol() to the beginning of the
derived probe.
dsmith [Tue, 28 Nov 2006 21:21:53 +0000 (21:21 +0000)]
2006-11-28 David Smith <dsmith@redhat.com>
* semko/thirtyfour.stp: Checks for writing to target variable in
.return probe.
* semok/twentyfour.stp: Tests read access to target variable in
.return probe.
dsmith [Tue, 28 Nov 2006 19:47:17 +0000 (19:47 +0000)]
2006-11-28 David Smith <dsmith@redhat.com>
* tapsets.cxx
(dwarf_var_expanding_copy_visitor::visit_target_symbol):
Improved handling target variables in return probes by having a
per-thread counter.
dsmith [Mon, 20 Nov 2006 22:44:49 +0000 (22:44 +0000)]
2006-11-20 David Smith <dsmith@redhat.com>
* tapsets.cxx
(dwarf_var_expanding_copy_visitor::visit_target_symbol): BZ
1382. Target variables can be accessed in return probes. A new
function entry probe is generated that saves the target variables
so that they can be accesssed in the return probe.
guanglei [Sun, 19 Nov 2006 07:22:47 +0000 (07:22 +0000)]
bugfix for #3526:
runtime/lket/b2a/lket_b2a.[ch]: bugfix for #3536
lket_trace.stp: add the logging of pid, ppid
process.stp: add logging of tid, ppid for lket_internal.process.execve.
Change to use for_each_process() in process_snapshot() to get
the info of all running processes.
register_event.stp: update the registering codes of execve event.
dsmith [Fri, 10 Nov 2006 19:59:02 +0000 (19:59 +0000)]
2006-11-10 David Smith <dsmith@redhat.com>
* tapsets.cxx
(dwarf_var_expanding_copy_visitor::visit_target_symbol): Minor
improvement to error handling by throwing exceptions before
allocations are done.
dsmith [Fri, 10 Nov 2006 16:51:10 +0000 (16:51 +0000)]
2006-11-10 David Smith <dsmith@redhat.com>
* semko/maxactive03.stp: Stop on pass2 instead of on pass1.
* lib/stap_run.exp: As a side-effect, stap_run() sets global
'probe_errors' and 'skipped_probes' to the number of probe errors
and skipped probes seen while running the probe.
* systemtap.base/maxactive.exp: Uses extended stap_run() to find
number of skipped probes instead of using private stap_run()
variant.
hunt [Thu, 9 Nov 2006 17:57:40 +0000 (17:57 +0000)]
2006-11-09 Martin Hunt <hunt@redhat.com>
* transport_msgs.h: Change all ints to int32_t. Prefix
all struct names with "_stp".
* transport.c: Use new struct names.
(_stp_handle_start): Send pointer size and endianess.
* procfs.c: Use new struct names.