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.
jistone [Mon, 8 May 2006 23:04:39 +0000 (23:04 +0000)]
2006-05-08 Josh Stone <joshua.i.stone@intel.com>
PR 2594
From Thang P Nguyen <thang.p.nguyen@intel.com>
* context.stp (probefunc): expands ability to detect the function
for different types of probes.
wcohen [Fri, 5 May 2006 20:35:30 +0000 (20:35 +0000)]
2006-05-05 Will Cohen <wcohen@redhat.com>
* small_demos/fileopen.stp: Shows use of target() to look at pid.
* small_demos/rwtiming.stp: Shows per executable histograms of time
spent in read and write system calls.
eteo [Fri, 5 May 2006 17:58:08 +0000 (17:58 +0000)]
2006-05-05 Eugene Teo <eteo@redhat.com>
PR 2433
* tapsets.cxx (dwarf_query::blacklisted_p): Extend the list of
blacklisted .return probes to include "do_exit". Correct funcname
typo for "sys_groupexit".
* tapset/syscalls.stp: Remove .return probe aliases of never-
returning syscall.exit and syscall.exit_group calls.
jistone [Wed, 3 May 2006 23:50:48 +0000 (23:50 +0000)]
2006-05-03 Josh Stone <joshua.i.stone@intel.com>
* loc2c-runtime.h (deref_string): resolved gcc "warning:
assignment makes integer from pointer without a cast" when
using a pointer as the source address.
fche [Mon, 1 May 2006 13:50:23 +0000 (13:50 +0000)]
2006-04-30 Frank Ch. Eigler <fche@elastic.org>
PR 2610.
* translate.cxx (c_unparser::visit_arrayindex, visit_stat_op):
Detect empty aggregates consistently.
(visit_print_format): Ditto. Also detect errors due to
argument evaluation.
(translator_output::*): Add a flush before a failing assert,
to produce more context when debugging.
PR 2427.
* staptree.cxx (varuse_collecting_visitor::visit_embeddedcode):
Support /* pure */ declaration. Stop using __tvar_ naming hack.
(v_c_u::visit_print_format): Mark sprint and sprintf as
side-effect-free.
(deep_copy_visitor::visit_print_format): Propagate raw_components.
* stap.1.in: Document declaration.
* elaborate.cxx (semantic_pass_opt2): Verbose message tweak.
(dead_stmtexpr_remover): Extend for more aggressive optimization.
* tapsets.cxx (dwarf,mark_var_expanding_copy_visotor): Add
/* pure */ declaration to rvalue expansions.
* tapset/*.stp: Added /* pure */ declarations to many functions.
* testsuite/parseok/unparsers.stp: Propagate guru mode flag.
* testsuite/buildok/twentyfour.stp: New test.
PR 953
* elaborate.h (derived_probe): Add field "name". Stop passing
"probe index" to other emit_* calls.
(emit_probe_context_vars): New member function.
* elaborate.cxx (derived_probe ctor): Generate unique name.
* translate.cxx (*): Adapt to index->name.
(emit_probe): Realize that probe locals only occur at nesting=0.
* tapsets.cxx (*derived_probe::emit_*): Adapt to index->name.
(mark_var_expanding_copy_visitor): New class to process $argN.
(mark_derived_probe ctor): Call it.
(mark_derived_probe::emit_probe_context_vars): Do it.
* buildrun.cxx (compile_pass): Add more optional gcc verbosity.
Add CFLAGS += -freorder-blocks.
* testsuite/buildok/marker.stp: New test.