roland [Thu, 11 Aug 2005 04:27:29 +0000 (04:27 +0000)]
2005-08-10 Roland McGrath <roland@redhat.com>
* loc2c.c (emit_base_store): New function.
(emit_bitfield): Rewritten to handle stores, change parameters.
(c_translate_fetch): Update caller.
(c_translate_store): New function.
* loc2c.h: Declare it.
* loc2c-test.c (handle_variable): Grok "=" last argument to do a store.
roland [Thu, 11 Aug 2005 04:26:33 +0000 (04:26 +0000)]
2005-08-10 Roland McGrath <roland@redhat.com>
* loc2c.c (emit_base_store): New function.
(emit_bitfield): Rewritten to handle stores, change parameters.
(c_translate_fetch): Update caller.
(c_translate_store): New function.
* loc2c-test.c (handle_variable): Grok "=" last argument to do a store.
fche [Wed, 10 Aug 2005 15:49:43 +0000 (15:49 +0000)]
2005-08-10 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx: Move around "focusing on ..." messages to print
them only for matching functions/modules.
(dwflpp ctor): Also add cu (source file) name to derived
probe point.
graydon [Tue, 9 Aug 2005 18:17:24 +0000 (18:17 +0000)]
2005-08-09 Graydon Hoare <graydon@redhat.com>
* elaborate.cxx:
(delete_statement_symresolution_info): New struct.
(symresolution_info::visit_delete_statement): Use it.
(delete_statement_typeresolution_info): New struct.
(typeresolution_info::visit_delete_statement): Use it.
(symresolution_info::find_var): Accept -1 as 'unknown' arity.
* elaborate.h: Update to reflect changes in .cxx.
* translate.cxx (mapvar::del): New method.
(c_unparser::getmap): Check arity >= 1;
(delete_statement_operand_visitor): New struct.
(c_unparser::visit_delete_statement): Use it.
* staptree.cxx (vardecl::set_arity): Accept and ignore -1.
(vardecl::compatible_arity): Likewise.
* testsuite/buildok/eight.stp: New test for 'delete' operator.
fche [Fri, 5 Aug 2005 17:04:29 +0000 (17:04 +0000)]
2005-08-05 Frank Ch. Eigler <fche@elastic.org>
PR translator/1175
* translate.cxx (*): Added unlikely() markers to most emitted error
checks.
(mapvar::get,set): Handle NULL<->"" impedance mismatch.
(itervar::get_key): Ditto. Use base index=1 for keys.
* testsuite/buildok/one.stp: Extend. And it runs with -p5 too.
* stap.1: Document use of ";" statament as mechanism for grammar
ambiguity resolution.
* stp_check.in: Set $prefix.
* systemtap.spec.in: Prereq kernel-devel, kernel-debuginfo,
and not tcl.
* tapsets.cxx: Make slightly less verbose.
* translate.cxx
hunt [Wed, 3 Aug 2005 18:52:23 +0000 (18:52 +0000)]
2005-08-03 Martin Hunt <hunt@redhat.com>
* librelay.c (open_control_channel): Set the receive buffer
to 512K, or the max allowed.
* stpd.c: Remove "-n" subbug option and change "-b" option
so you can specify buffering in different ways. Add a verbose option.
Exec the "stp_check" script.
fche [Wed, 3 Aug 2005 16:54:12 +0000 (16:54 +0000)]
2005-08-03 Frank Ch. Eigler <fche@elastic.org>
* README: Be more specific about prerequisites.
* tapset/builtin_string.stp: New builtin.
* testsuite/buildok/seven.stp, semko/eighteen.stp: New tests.
hunt [Mon, 1 Aug 2005 21:40:52 +0000 (21:40 +0000)]
2005-08-01 Martin Hunt <hunt@redhat.com>
* librelay.h: Get structs and enums from
../transport/transport_msgs.h to eliminate duplication.
* librelay.c (send_request): Retry if send fails.
(open_relayfs_files): Use fopen() instead of open() for the
percpu tmpfiles.
(request_last_buffers): Just send cpu number for STP_BUF_INFO request.
(reader_thread): Ditto.
(process_subbufs): Use fwrite_unlocked() instead of write().
(sigchld): Removed.
(init_stp): Go back to using system() instead of fork and exec
to load module. When done, send a TRANSPORT_INFO request.
(cleanup_and_exit): Change parameter to simple flag to
indicate if the module needs removing.
(sigproc): Remove complicated logic and just send STP_EXIT.
(stp_main_loop): When receiving STP_TRANSPORT_INFO, set
the local params and reply with a STP_START. When
receiving STP_START, there was an error, so cleanup and exit.
* stpd.c (main): Added new options to set number of
buffers and their size.
hunt [Mon, 1 Aug 2005 21:39:52 +0000 (21:39 +0000)]
2005-08-01 Martin Hunt <hunt@redhat.com>
* io.c (_stp_vlog): Use _stp_pid instead os _stp_tport->pid.
* print.c (_stp_print_flush): Don't need _stp_tport.
*runtime.h (probe_start): Just call _stp_transport_init().
(probe_exit): Just call _stp_transport_close().
hunt [Mon, 1 Aug 2005 21:39:14 +0000 (21:39 +0000)]
2005-08-01 Martin Hunt <hunt@redhat.com>
* control.h: Remove STP commands from here and put in
transport_msgs.
* transport_msgs.h: New file containing the structs and
values for the messages exchanged between stpd and transport.
* transport.h: Moved stuff shared with stpd to transport_msgs.h
* transport.c: Complete rewrite to better handle complicated
initialization involving exchanging data with stpd. Supports
buffer size negotiation and more.
roland [Fri, 29 Jul 2005 08:37:14 +0000 (08:37 +0000)]
2005-07-29 Roland McGrath <roland@redhat.com>
* configure.ac: Add AM_CONDITIONAL definition of HAVE_LIBDW.
* Makefile.am [HAVE_LIBDW] (stap_SOURCES_libdw): New variable.
(stap_SOURCES): Use it, moving loc2c.c there.
* configure, config.in: Regenerated.
* configure.ac: Don't check for libelf.h, not actually #include'd.
Update -ldw check for merged libdwfl+libdw.
(stap_LIBS): New substituted variable. Set only this, not LIBS,
with -ldw check.
* Makefile.am (stap_LDADD): New variable, use @stap_LIBS@.
roland [Fri, 29 Jul 2005 08:37:06 +0000 (08:37 +0000)]
2005-07-29 Roland McGrath <roland@redhat.com>
* systemtap.spec.in: Include %{_datadir}/systemtap/tapset directory.
(%check): Add section, run make check.
* Makefile.am (EXTRA_DIST): Add runtest.sh.
* Makefile.in: Regenerated.
* systemtap.spec.in: Include man pages.
* Makefile.am (man_MANS): Renamed to dist_man_MANS.
* configure.ac: Add AM_CONDITIONAL definition of HAVE_LIBDW.
* Makefile.am [HAVE_LIBDW] (stap_SOURCES_libdw): New variable.
(stap_SOURCES): Use it, moving loc2c.c there.
* configure, config.in: Regenerated.
* configure.ac: Don't check for libelf.h, not actually #include'd.
Update -ldw check for merged libdwfl+libdw.
(stap_LIBS): New substituted variable. Set only this, not LIBS,
with -ldw check.
* Makefile.am (stap_LDADD): New variable, use @stap_LIBS@.
* Makefile.am (AM_CPPFLAGS): Use ${pkgdatadir}.
(AM_CFLAGS): Use -W instead of -Wextra, for gcc 3 compatibility.
(stpd_LDFLAGS): Variable removed.
(AM_MAKEFLAGS): Variable removed.
roland [Fri, 29 Jul 2005 08:37:04 +0000 (08:37 +0000)]
2005-07-29 Roland McGrath <roland@redhat.com>
* systemtap.spec.in: Include %{_datadir}/systemtap/tapset directory.
(%check): Add section, run make check.
* Makefile.am (EXTRA_DIST): Add runtest.sh.
* Makefile.in: Regenerated.
* systemtap.spec.in: Include man pages.
* Makefile.am (man_MANS): Renamed to dist_man_MANS.
* systemtap.spec.in (LDFLAGS): Punt using $ORIGIN here, just hard-code
%{_libdir}.
(elfutils_version): Bump to 0.111.
[bundled_elfutils]: Don't massage libdwfl.h header any more.
roland [Fri, 29 Jul 2005 08:18:18 +0000 (08:18 +0000)]
2005-07-29 Roland McGrath <roland@redhat.com>
* librelay.c (process_subbufs): Use unsigned for I.
(sigproc): Add __attribute__((unused)) on parameter.
(sigchld): Likewise. Avoid shadowing global variable name.
(stp_main_loop): Add a cast.
* elaborate.cxx (derived_probe::derived_probe): Accept NULL probe.
* staptree.cxx (provide, require): Move from here...
* staptree.h: to here, and virtualize deep-copy methods.
* translate.cxx
(c_unparser::emit_common_header): Include loc2c-runtime.h
* tapsets.cxx
(dwflpp::iterate_over_modules): Use new, faster getmodules loop.
(dwflpp::literal_stmt_for_local): New method, call loc2c.
(var_expanding_copy_visitor): New struct which expands $-vars.
(dwarf_derived_probe): Rebuild this->body using var expander.
(query_function): Refactor logic a bit for speed.
* loc2c.{c,h}: Copies (with minor changes) of Roland's work
from elfutils CVS.
* Makefile.am (AM_CFLAGS): Set to elfutils-style.
(stap_SOURCES): Add loc2c.c.
* Makefile.in: Regenerate.
* stap.1: Beginnings of a man page.
* Makefile.am: Install it. Comment out stpd LDADD goodies.
* configure.ac: Futilely complain about non-stpd LIBS.
* Makefile.in, configure.in: Regenerated.
* main.cxx (usage): Remove ARGS from help text, as nothing is
done with these yet.
* translate.cxx: Add "pt_regs*" field to context.
* tapsets.cxx (*): Correct kprobes API interface.
* testsuite/buildok/three.stp: New test, copied from semok.
* Makefile.am (install-data-local): Also install runtime/relayfs,
so scripts can build against headers located thereunder.
* Makefile.in: Regenerated.
* Makefile.am (stpd_LDFLAGS): Set rpath correclty because otherwise
automake doesn't seem to get it right when binaries are in libexec subdirs.
(AM_CPPFLAGS): revert.
* systemtap.spec.in (LDFLAGS): Set libexecdir here instead.
Support %{ embedded-c %}
* staptree.h (embeddedcode): New statement subtype. Stub support in
visitors.
* staptree.cxx: Ditto.
* parse.cxx: Parse %{ / %}. Accept "_" as identifier leading char.
(parse_probe): Simplify calling convention.
* elaborate.h: Store embedded code.
* elaborate.cxx: Pass it.
* translate.cxx: Transcribe it. Return some dropped module init/exit
code.
* Makefile.am: Add buildok/buildko tests.
* Makefile.in: Regenerated.
* main.cxx: Return EXIT_SUCCESS/FAILURE even for weird rc.
* testsuite/parseok/nine.stp: Test _identifiers.
* testsuite/transko/*.stp: Tweak to force -p3 rather than -p2 errors.
* testsuite/semok/transko.stp: ... and keep it that way in the future.
* testsuite/parse*/*: Some new tests for %{ %}.
* testsuite/build*/*: New tests for -p4.
* translate.cxx (itervar): New class.
(*::visit_foreach_loop): Implement.
Various bug fixes.
* staptree.cxx (deep_copy_visitor::*): Copy tok fields.
* elaborate.cxx (lvalue_aware_traversing_visitor):
(mutated_map_collector):
(no_map_mutation_during_iteration_check): New classes.
(semantic_pass_maps): New function to check map usage.
(semantic_pass): Call it.
* testsuite/transok/eight.stp: Test 'foreach' loop translation.
* testsuite/semko/{thirteen,fourteen,fifteen}.stp:
Test prohibited forms of foreach loops.