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.
PR 2220
* translate.cxx (visit_statement): Tolerate 0 first argument.
(visit_for_loop, visit_foreach_loop): Call it thusly for condition
expression.
(visit_embededcode, visit_block, visit_null_statement): Don't
call visit_statement() at all.
2006-04-18 Frank Ch. Eigler <fche@elastic.org>
* conversions.stp (string, hex_string): Use snprintf for safety.
2006-04-18 Frank Ch. Eigler <fche@elastic.org>
* systemtap.samples/control_limits.stp: Adapt to new action counting.
* Makefile.am (install-data-local): Rewrite. Set
ownership and permissions for all files and directories
under runtime and tapset. Restrict files to source code.
* Makefile.in: Rebuilt.
2006-04-12 Martin Hunt <hunt@redhat.com>
PR 2497
* translate.cxx (translate_pass): Don't
reset STP_STRING_SIZE if it was already defined.
Set it to 1024 by default.
PR2525
* timestamp.stp (__check_xtime_lock): check if xtime is available
(gettimeofday_s, gettimeofday_ms, gettimeofday_us): error out if
called when xtime is not available, to avoid deadlock
* librelay.c (merge_output): Set the output filename if necessary.
* stpd.c (main): Don't reset output_filename just because
relayfs is possible. Move that code to librelay.c.