* bench2/bench.rb: Remove the deprecated "-m" option
to stpd. Also, don't use merge mode for relayfs.
* bench2/run_binary_print: New test. Compare various ways of
printing binary data.
* stpd.c (usage): Remove "-m" option.
(main): Print warning if "-m" is used.
* librelay.c (merge_output): Rewrite to handle
new format that support binary.
(stp_main_loop): Read merge option from the
transport info message.
* print.c (_stp_print_flush): Rewrite so one version works for
relayfs or procfs. Use proper per-cpu functions.
(_stp_reserve_bytes): New function. Reserve bytes in the output buffer.
(_stp_print_binary): New function. Write a variable number of
64-bit values directly into the output buffer.
* string.c (_stp_sprintf): Rewrite using new per-cpu buffers.
(_stp_vsprintf): Ditto.
(_stp_string_cat_cstr): Ditto.
(_stp_string_cat_char): Ditto.
* runtime.h: Set defaults for MAXTRYLOCK and TRYLOCKDELAY to make
runtime tests in bench2 happy.
tapset/nfsd.stp, tapset/nfs_proc.stp, tapset/nfs.stp:
Change NFS file identifier. Change NFS version data type
from String to INT. Add version variable to nfs_open
and nfs_release.
LKET/iosyscall.stp:
change log_iosyscall_sync() be sync with different timing methods.
LKET/utils.stp:
add reset_maxaction() since there are too many functions called inside "probe begin".
LKET/nfsd.stp, LKET/nfs_proc.stp, LKET/nfs.stp:
New trace hooks for NFS, including both NFS client and server side activities.
LKET/register_event.stp:
Add the register event calls for NFS trace hooks.
* elaborate.h (struct derived_probe): Replace emit_registrations()
function with emit_registrations_start() and
emit_registrations_end().
(struct derived_probe_group): Added emit_module_init().
(struct derived_probe_group_container): Added emit_module_init(),
emit_module_init_call(), and emit_module_exit().
* elaborate.cxx (struct alias_derived_probe): Updated
emit_regitrations calls.
* translate.cxx (emit_module_init): Instead of actually emitting
per-probe-point registrations/unregistrations, let the session's
derived_probe_group_container do it.
* tapsets.cxx (emit_probe_timing): New function that handles
probe timing code.
(be_derived_probe::emit_registrations_start): Renamed from
emit_registrations.
(be_derived_probe_group::emit_module_init): New function that
outputs probes create and destroy functions.
(dwarf_derived_probe::emit_registrations): Removed, but most code
moved to emit_registrations_start().
(dwarf_derived_probe::emit_registrations_start): Handles details
of multiple dwarf probe registrations.
(dwarf_derived_probe::emit_registrations_end): Handles cleanup
details of multiple dwarf probe registrations.
(dwarf_derived_probe_group::emit_module_init): New function that
outputs probes create and destroy functions.
(timer_derived_probe::emit_registrations_start): Renamed from
emit_registrations. Added mutiple probe handling.
(timer_derived_probe::emit_registrations_end): Handles cleanup
details of multiple probe registrations.
(timer_derived_probe_group::emit_module_init): New function that
outputs probes create and destroy functions.
(profile_derived_probe::emit_registrations_start): Renamed from
emit_registrations. Added mutiple probe handling.
(profile_derived_probe::emit_registrations_end): Handles cleanup
details of multiple probe registrations.
(profile_derived_probe_group::emit_module_init): New function that
outputs probes create and destroy functions.
(mark_derived_probe::emit_registrations_start): Renamed from
emit_registrations. Added mutiple probe handling.
(mark_derived_probe::emit_registrations_end): Handles cleanup
details of multiple probe registrations.
(mark_derived_probe_group::emit_module_init): New function that
outputs probes create and destroy functions.
(hrtimer_derived_probe::emit_registrations_start): Renamed from
emit_registrations. Added mutiple probe handling.
(hrtimer_derived_probe::emit_registrations_end): Dummy function.
(hrtimer_derived_probe_group::emit_module_init): New function that
outputs probes create and destroy functions.
(derived_probe_group_container::emit_module_init): Added function
to call all probe group's emit_module_int functions.
(derived_probe_group_container::emit_module_init_call): Added
function to handle probe group initialization cleanup.
(derived_probe_group_container::emit_module_exit): Added
function to handle probe group cleanup.
Add basic support for initialized globals.
* parse.cxx (parse_global): Parse initialization clause, implement
by rewriting to "probe begin { var = value }".
* parse.h: Corresponding changes.
* stap.1.in: Document optional initialization.
2006-09-06 Frank Ch. Eigler <fche@elastic.org>
* parseok/eighteen.stp, semok/twentythree.stp: New files for
testing initialized globals.
Improve unresolved target-symbol error messages.
* staptree.h (target_symbol): Add new field saved_conversion_error.
* elaborate.cxx (typeresolution_info::visit_target_symbol): Throw
that if found instead of generic error.
* tapsets.cxx (t_v_f_c_v::visit_target_symbol): Set it.
dsmith [Mon, 28 Aug 2006 17:59:50 +0000 (17:59 +0000)]
2006-08-28 David Smith <dsmith@redhat.com>
* translate.cxx: Added inclusion of session.h.
(translate_pass): Instead of asking each probe to emit itself, we
ask the session's probes member variable to emit all the probes.
* tapsets.cxx: Added inclusion of session.h. Added a
register_probe member function to all derived_probe based
classes. Added a derived_probe_group derived class for all probe
types:
(be_derived_probe_group): New class.
(never_derived_probe_group): New class.
(dwarf_derived_probe_group): New class.
(timer_derived_probe_group): New class.
(profile_derived_probe_group): New class.
(mark_derived_probe_group): New class.
(hrtimer_derived_probe_group): New class
(derived_probe_group_container): New class.
* elaborate.h: Removed inclusion of session.h since session.h now
includes elaborate.h.
(derived_probe): Added register_probe member function.
(derived_probe_group): Added class definition. This is the base
class of all of the derived probe groups - dwarf, timer, etc.
(derived_probe_group_container): Added class definition. An
instance of this class will be stored in the session and contain
all the other probe groups.
* elaborate.cxx (derived_probe_group::register_probe): Added
derived_probe_group::register_probe stubs.
(alias_derived_probe::register_probe): Added register_probe member
function.
(semantic_pass_symbols): After deriving a probe, the probes now
register themselves with the session.
* session.h: Includes elaborate.h to get
derived_probe_group_container definition. systemtap_session class
'probes' member variable switched from a vector of derived probes
to a derived_probe_group_container.
* buildrun.cxx: Added inclusion of session.h since it was removed
from elaborate.h.
* main.cxx: Added inclusion of session.h since it was removed
from elaborate.h.
* parse.h: Added forward struct declarations.
* staptree.h: Removed inclusion of session.h.
jistone [Wed, 23 Aug 2006 20:54:03 +0000 (20:54 +0000)]
2006-08-23 Josh Stone <joshua.i.stone@intel.com>
PR 3093
From Eugeniy Meshcheryakov <eugen@debian.org>:
* main.cxx (main): Use setenv instead of putenv, since gcc 4.2
doesn't like assigning string constants to char*. Also use
const char* for result from getenv.
* tapsets.cxx (dwflpp::setup): Copy string constant into a
local array, to fix gcc 4.2 warning.
guanglei [Wed, 23 Aug 2006 09:05:29 +0000 (09:05 +0000)]
vfs.stp:
New tapset from Thomas Zanussi(trz@us.ibm.com) to probe vfs layer activities.
nfs.stp:
New tapset from Li Xuepeng(xuepengl@cn.ibm.com) to probe nfs file operations
and nfs address space operations on client side.
nfs_proc.stp:
New tapset from Li Xuepeng to probe some nfs RPC procedure stub functions
on client side.
nfsd.stp:
New tapset from Li Xuepeng to probe nfs server side activities, including
some RPC procedure stub functions, nfsd dispatch routine, and nfsd_* functions
jistone [Tue, 22 Aug 2006 20:55:59 +0000 (20:55 +0000)]
2006-08-22 Josh Stone <joshua.i.stone@intel.com>
PR 3094
From Eugeniy Meshcheryakov <eugen@debian.org>:
* stap.1.in: In groff, '-' produces a Unicode hyphen. Use '\-'
where a plain-old minus sign is desired, e.g., code examples.
* lket.5.in, stapex.5.in, stapfuncs.5.in, stapprobes.5.in: ditto
hunt [Mon, 21 Aug 2006 15:37:08 +0000 (15:37 +0000)]
2006-08-21 Martin Hunt <hunt@redhat.com>
* lib/stap_run.exp: Check for existence of installtest_p
before running it. This reenables running individual tests
with runtest.
* lib/stap_run2.exp: Ditto.
* lib/stap_run_binary.exp: Ditto.
jistone [Thu, 17 Aug 2006 16:09:21 +0000 (16:09 +0000)]
2006-08-17 Josh Stone <joshua.i.stone@intel.com>
* signal.stp: Changes on behalf of Manoj S Pattabhiraman:
1. As per the suggestions, i have removed the argstr from the
probe points.
2. Added some checks to find whether the signals generated are
USER or Kernel Mode in signal_handle probe.
dsmith [Mon, 14 Aug 2006 21:09:21 +0000 (21:09 +0000)]
2006-08-14 David Smith <dsmith@redhat.com>
* elaborate.cxx (semantic_pass): Calls semantic_pass_optimize1()
and semantic_pass_optimize2().
(visit_functioncall): Removed setting relaxed_p since
semantic_pass_opt5 does it.
(semantic_pass_opt5): Goes ahead and removes duplicate functions
since semantic_pass_opt1() won't be run again.
(semantic_pass_optimize1): Renamed from semantic_pass_optimize().
Moved semantic_pass_opt5() to semantic_pass_optimize2().
(semantic_pass_optimize2): New function that contains optimization
passes that need to be done after type inference.
fche [Sat, 12 Aug 2006 05:13:09 +0000 (05:13 +0000)]
2006-08-12 Frank Ch. Eigler <fche@elastic.org>
* configure.ac, Makefile.am: Descend into testsuite/
directory. Remove local test logic.
* configure, Makefile.in: Regenerated.
* runtest.sh: Not yet removed.
* HACKING: Update for new testsuite layout.
2006-08-12 Frank Ch. Eigler <fche@elastic.org>
* all: Reorganized old pass-1..4 tests one dejagnu bucket.
Moved over old pass-5 tests, except for disabled syscalls tests.
* Makefile (installcheck): New target for running pass-1..5
tests against installed systemtap.
dsmith [Thu, 10 Aug 2006 19:19:05 +0000 (19:19 +0000)]
2006-08-10 David Smith <dsmith@redhat.com>
* elaborate.cxx (duplicate_function_remover): Added class.
(get_functionsig): Added function.
(semantic_pass_opt5): New function merges duplicate identical
functions into one function.
(semantic_pass_optimize): Calls semantic_pass_opt5.
* translate.cxx (c_unparser::emit_probe): Changed to merge
duplicate probes bodies by making the duplicate probe just call
the original probe (BZ# 2421).
jistone [Thu, 10 Aug 2006 00:40:08 +0000 (00:40 +0000)]
2006-08-09 Josh Stone <joshua.i.stone@intel.com>
* tapset/signal.stp: Create a new tapset that addresses process signals.
Much of this was contributed by Manoj Pattabhiraman (IBM).
* tapset/process.stp: Remove aliases that now belong in signal tapset
* examples/small_demos/proc_snoop.stp,
testsuite/buildok/process_test.stp: Rename process.signal_* to
new signal.* tapset.
PR 2922
* time.c (_stp_init_time): call cpufreq_get for each cpu from
a non-atomic context (module init time).
* time.c (__stp_init_time): remove call to cpufreq_get from IPI.
* time.c (__stp_time_timer_callback): disable IRQ's to avoid
perturbations in measurements.
* time.c (_stp_gettimeofday_us): disable preemption to avoid CPU
swaps while we're computing the time.
* parse.cxx (parser::expect_unknown2): New function that looks for
2 possible token types.
* parse.cxx (parser::expect_ident_or_keyword): New function that
calls parser::expect_unknown2.
* parse.cxx (parser::parse_symbol): Calls
parser::expect_ident_or_keyword to allow keywords to appear when
expanding target symbols (Bugzilla #2913).
* parse.h: Added prototypes for parser::expect_unknown2 and
parser::expect_ident_or_keyword.
* testsuite/parseok/seventeen.stp: New test to check for allowing
keywords when expanding target symbols.