guanglei [Thu, 15 Jun 2006 07:01:42 +0000 (07:01 +0000)]
added io syscall event hooks.
the io syscall hook differs with syscall hook since it will
provide all the available info of function parameters instead
of logging only the syscall name. Useful to trace the detail
behavour of io related syscalls
hunt [Fri, 9 Jun 2006 19:54:52 +0000 (19:54 +0000)]
2006-06-09 Martin Hunt <hunt@redhat.com>
* transport.c: Using the default workqueue was causing problems
because of the long delays on probe_exit(). Created a new
systemtap work queue and used that instead.
dsmith [Mon, 5 Jun 2006 21:49:14 +0000 (21:49 +0000)]
2006-06-05 David Smith <dsmith@redhat.com>
* tapsets.cxx (dwflpp::express_as_string): New function.
Extracted from dwflpp::literal_stmt_for_local() so that
dwflpp::literal_stmt_for_return() could also call it.
(dwflpp::literal_stmt_for_local): Portion extracted to create
dwflpp::express_as_string().
(dwflpp::literal_stmt_for_return): New function. Adds support for
new symbolic access ("$return") to return value in .return
probes. Fixes PR 1132.
(target_variable_flavour_calculating_visitor::visit_target_symbol):
Calls dwflpp::literal_stmt_for_return() when in a return probe and
the variable name is "$return".
(dwarf_var_expanding_copy_visitor::visit_target_symbol): Ditto.
* stapfuncs.5.in: Noted that the retval() function is deprecated.
* stapprobes.5.in: Corrected the name of the return value
variable.
* tapset/return.stp: Marked the retval() function as deprecated.
* testsuite/semko/return01.stp: Added new test.
* testsuite/semko/return02.stp: Ditto.
fche [Mon, 5 Jun 2006 19:45:56 +0000 (19:45 +0000)]
2006-06-05 Frank Ch. Eigler <fche@elastic.org>
PR 2645 cont'd.
* elaborate.cxx (derive_probes): Pass down optional flag
from alias reference to expansion.
* testsuite/semok/twentytwo.stp: Test passing-down.
* stapprobes.5.in: Specify passing-down property of optional flag.
fche [Fri, 2 Jun 2006 23:13:38 +0000 (23:13 +0000)]
2006-06-02 Frank Ch. Eigler <fche@elastic.org>
PR 2645 cont'd.
* elaborate.cxx (find_and_build): Support optional wildcards too.
(derive_probes): Change last argument to indicate optionalness of
parent probe point (alias reference).
(alias_expansion_builder): Shrink epilogue-mode alias body copying.
Pass along alias reference optionality.
* elaborate.h: Corresponding changes.
* testsuite/semko/thirtyfive.stp, semok/twentytwo.stp: New tests.
jistone [Fri, 2 Jun 2006 19:11:24 +0000 (19:11 +0000)]
2006-06-02 Josh Stone <joshua.i.stone@intel.com>
* process.stp (exec, exec_complete): conditionally include
compat_do_execve for 64-bit kernels
* process.stp (handle_signal): use optional probes to alternate
between function or inline
dsmith [Fri, 2 Jun 2006 15:54:26 +0000 (15:54 +0000)]
2006-06-02 David Smith <dsmith@redhat.com>
* main.cxx (usage): Added exitcode parameter.
(main): Improved a few error messages. Also, when an error is
given, stap now always exits with a status of 1.
jistone [Thu, 1 Jun 2006 17:05:57 +0000 (17:05 +0000)]
2006-06-01 Josh Stone <joshua.i.stone@intel.com>
* tapsets.cxx (hrtimer_derived_probe::emit_interval): update
API usage of hrtimers in preparation of getting exports from
the kernel.
(hrtimer_derived_probe::emit_probe_entries): ditto
jistone [Sat, 27 May 2006 00:32:46 +0000 (00:32 +0000)]
2006-05-26 Josh Stone <joshua.i.stone@intel.com>
* tapsets.cxx (build_blacklist): build the sets of blacklisted
functions and function returns. Manually added many __kprobes
functions that should not be probed.
(dwarf_query::dwarf_query): Call build_blacklist.
(dwarf_query::blacklisted_p): Use blacklist sets.
hunt [Fri, 26 May 2006 22:57:25 +0000 (22:57 +0000)]
2006-05-26 Martin Hunt <hunt@redhat.com>
* errno.stp: Add octal option for returnstr.
* [i686,x86_64]/syscalls.stp (umask): Print args and return
in octal.
(add_key): Comment out. This syscall is added by a xen patch
and may not be present.
(tux): Ditto.
jistone [Wed, 24 May 2006 19:17:13 +0000 (19:17 +0000)]
2006-05-24 Josh Stone <joshua.i.stone@intel.com>
PR 2677
* sym.c (_stp_symbol_sprint_basic): New function that returns
just the symbol name, and doesn't bother with String.
* context.stp (probefunc): Use _stp_symbol_sprint_basic
dsmith [Wed, 24 May 2006 18:37:50 +0000 (18:37 +0000)]
2006-05-24 David Smith <dsmith@redhat.com>
* elaborate.cxx (isglob): New function.
(match_key::globmatch): New function.
(match_node::find_and_build): Uses isglob() and
match_key::globmatch() to provide support for wildcards such as
"kernel.syscall.*read*" (Bugzilla #1928).
* elaborate.h (match_key::globmatch): Added function declaration.
* parse.cxx (parser::parse_probe_point): Collects one or more
tokens into a single probe-point functor string.
* testsuite/parseko/twentytwo.stp: New file.
* testsuite/parseok/sixteen.stp: New file.
dsmith [Wed, 24 May 2006 15:09:42 +0000 (15:09 +0000)]
2006-05-24 David Smith <dsmith@redhat.com>
* testsuite/parseko/cmdlinearg01.stp: New file.
* testsuite/parseko/cmdlinearg02.stp: New file.
* testsuite/parseko/eighteen.stp: New file.
* testsuite/parseko/foreachstmt01.stp: New file.
* testsuite/parseko/foreachstmt02.stp: New file.
* testsuite/parseko/foreachstmt03.stp: New file.
* testsuite/parseko/foreachstmt04.stp: New file.
* testsuite/parseko/foreachstmt05.stp: New file.
* testsuite/parseko/forstmt01.stp: New file.
* testsuite/parseko/forstmt02.stp: New file.
* testsuite/parseko/forstmt03.stp: New file.
* testsuite/parseko/forstmt04.stp: New file.
* testsuite/parseko/functiondecl01.stp: New file.
* testsuite/parseko/functiondecl02.stp: New file.
* testsuite/parseko/functiondecl03.stp: New file.
* testsuite/parseko/functiondecl04.stp: New file.
* testsuite/parseko/functiondecl05.stp: New file.
* testsuite/parseko/functiondecl06.stp: New file.
* testsuite/parseko/functiondecl07.stp: New file.
* testsuite/parseko/ifstmt01.stp: New file.
* testsuite/parseko/ifstmt02.stp: New file.
* testsuite/parseko/nineteen.stp: New file.
* testsuite/parseko/preprocess01.stp: New file.
* testsuite/parseko/preprocess02.stp: New file.
* testsuite/parseko/preprocess03.stp: New file.
* testsuite/parseko/preprocess04.stp: New file.
* testsuite/parseko/preprocess05.stp: New file.
* testsuite/parseko/preprocess06.stp: New file.
* testsuite/parseko/preprocess07.stp: New file.
* testsuite/parseko/preprocess08.stp: New file.
* testsuite/parseko/preprocess09.stp: New file.
* testsuite/parseko/probepoint01.stp: New file.
* testsuite/parseko/probepoint02.stp: New file.
* testsuite/parseko/probepoint03.stp: New file.
* testsuite/parseko/seventeen.stp: New file.
* testsuite/parseko/ternarystmt01.stp: New file.
* testsuite/parseko/twenty.stp: New file.
* testsuite/parseko/twentyone.stp: New file.
* testsuite/parseko/whilestmt01.stp: New file.
* testsuite/parseko/whilestmt02.stp: New file.
fche [Thu, 18 May 2006 23:11:22 +0000 (23:11 +0000)]
2006-05-18 Frank Ch. Eigler <fche@elastic.org>
Organize "-t" output by script/parse level probes rather than
derived-probes.
* elaborate.cxx (derived_probe ctor): Remove name field setting.
(alias_derived_probe): New class.
(alias_expandion_builder::build): Create an instance of the above
instead of parse-tree-level plain probe.
* elaborate.h: Corresponding changes.
(derived_probe::basest): Define.
* staptree.cxx (probe ctor): Set new name field.
* staptree.h (probe): Corresponding changes.
(probe::basest): New field.
* tapsets.cxx (emit_probe_prologue, emit_probe_entries):
Switch to basest() probe name for Stat instance.
(dwarf_derived_probe ctor): Stash away base probe.
* translate.cxx (unparser::emit_probe): Remove index
operand, just use probe name to generate symbols.
(emit_module_init): Reorganize -t output in unregister functions.
(translate_pass): Remove unparser::current_probenum field and all
uses.
* translate.h: Corresponding changes.
jistone [Thu, 18 May 2006 00:47:48 +0000 (00:47 +0000)]
2006-05-17 Josh Stone <joshua.i.stone@intel.com>
* process.stp: Rename signal.send to signal_send and process.complete
to process_complete, to allow process.* to work properly.
* process.stp (_IS_ERR): declare parameter type
* process.stp (process.create): correct new_pid assignment
dsmith [Tue, 16 May 2006 18:51:34 +0000 (18:51 +0000)]
2006-05-16 David Smith <dsmith@redhat.com>
* parse.cxx (parser::parser): Added initializer for 'context'
member variable.
(tt2str): Added support for new tok_keyword type.
(operator <<): Ignores keyword content when outputting error
message.
(lexer::scan): Recognizes keywords, such as 'probe', 'global',
'function', etc. and classifies them as type 'tok_keyword'. This
causes keywords to become reserved so they cannot be used for
function names, variable names, etc.
(parser::parse): Changed tok_identifier to tok_keyword when looking
for "probe", "global", or "function". Also sets context member
variable which remembers if we're in probe, global, function, or
embedded context.
(parser::parse_probe, parser::parse_statement)
(parser::parse_global, parser::parse_functiondecl)
(parser::parse_if_statement, parser::parse_delete_statement)
(parser::parse_break_statement, parser::parse_continue_statement)
(parser::parse_for_loop, parser::parse_while_loop)
(parser::parse_foreach_loop, parser::parse_array_in): Looks for
tok_keyword instead of tok_identifier.
(parser::parse_probe_point): Allows keywords as part of a probe
name, since "return" and "function" are keywords.
(parser::parse_return_statement): Looks for tok_keyword instead of
tok_identifier. Make sure we're in function context.
(parser::parse_next_statement): Looks for tok_keyword instead of
tok_identifier. Make sure we're in probe context.
* parse.h: Added parse_context enum. Added 'tok_keyword' to
token_type enum. Added parse_context 'context' member variable to
parser class.
* stap.1.in: Because the string() function has been removed,
the 'string()' function reference has been changed to a 'sprint()'
function reference.
* stapex.5.in: Ditto.
* stapfuncs.5.in: The description of the string() and hexstring()
functions has been removed.
* testsuite/buildok/context_test.stp: Calls to the string()
function were converted to sprint() function calls.
* testsuite/buildok/fifteen.stp: Ditto.
* testsuite/buildok/nineteen.stp: Ditto.
* testsuite/buildok/process_test.stp: Ditto.
* testsuite/buildok/task_test.stp: Ditto.
* testsuite/buildok/timestamp.stp: Ditto.
* testsuite/buildok/twentyone.stp: Ditto.
* testsuite/semok/args.stp: Ditto.
* testsuite/semok/seven.stp: Ditto.
* testsuite/buildok/fourteen.stp: Calls to log()/string() were
converted to a call to printf().
* testsuite/buildok/sixteen.stp: Ditto.
* testsuite/buildok/thirteen.stp: Ditto.
* testsuite/buildok/twentythree.stp: Ditto.
* testsuite/buildok/twentytwo.stp: Ditto.
* testsuite/buildok/seven.stp: Calls to the string()
function were converted to sprint() calls. Calls to the
hexstring() function were converted to sprintf() calls.
* testsuite/semok/eleven.stp: Ditto.
* testsuite/buildok/seventeen.stp: Calls to log()/hexstring() were
converted to a call to printf().
* testsuite/semko/nineteen.stp: Ditto.
* testsuite/parseok/three.stp: Because keywords are reserved, a
variable named 'string' was renamed to 'str'.
* testsuite/parseok/two.stp: Because keywords are reserved, a
variable named 'global' was renamed to 'gbl'.
* testsuite/transko/two.stp: Because the parser now checks for
'next' and 'return' statement context, a 'next' statement was
removed from a function and a 'return' statement was removed from
a probe.
dsmith [Tue, 16 May 2006 16:13:09 +0000 (16:13 +0000)]
2006-05-16 David Smith <dsmith@redhat.com>
* conversions.stp (hexstring, string): Removed functions. Because
of parser changes, "string" is now a reserved word and cannot be a
function name. Use 'sprintf("0x%x", num)' to replace hexstring()
and either 'sprint(num)' or 'sprintf("%d", num)' to replace
string().
fche [Tue, 16 May 2006 03:24:57 +0000 (03:24 +0000)]
2006-05-15 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx, translator.cxx (*): Designate more emitted
functions as static.
* translator.cxx (visit_print_format): Correct regression
regression from two weeks ago.
* stapfuncs.5.in: Tweak wording. Deprecate returnval() in favour
of retval().
jistone [Wed, 10 May 2006 00:47:59 +0000 (00:47 +0000)]
2006-05-09 Josh Stone <joshua.i.stone@intel.com>
* examples/small_demos/proc_snoop.stp: monitor all process events.
* testsuite/buildok/task_test.stp: test compilation of all task
functions.
* testsuite/buildok/process_test.stp: test all process events and
associated variables.