hunt [Fri, 19 Aug 2005 18:29:21 +0000 (18:29 +0000)]
2005-08-19 Martin Hunt <hunt@redhat.com>
* transport.c (_stp_cmd_handler): Remove. This was used by
stp-control.
* procfs.c (_stp_proc_write_cmd): Call schedule_work() instead
of running _stp_exit_handler immediately. Fixes a problem where
the module couldn't exit if all the output buffers were full.
Set .owner for the filesystem entries.
fche [Fri, 19 Aug 2005 15:55:39 +0000 (15:55 +0000)]
2005-08-19 Frank Ch. Eigler <fche@elastic.org>
* librelay.c (modpath): New global. Use it for insmod only.
* stpd.c (main): Set both modpath and modname, to support
modules specified by full path name.
roland [Thu, 18 Aug 2005 08:51:30 +0000 (08:51 +0000)]
2005-08-18 Roland McGrath <roland@redhat.com>
* loc2c.c (struct location): New member `emit_address'.
(alloc_location): Initialize new member from ORIGIN.
(location_from_address): New argument EMIT_ADDRESS.
Initialize new member.
(translate): Use LOC->emit_address hook to format DW_OP_addr constant.
(location_relative): Die if DW_OP_addr is used.
(default_emit_address): New function.
(c_translate_location): New argument EMIT_ADDRESS, pass it down.
Use default_emit_address if argument is null.
* loc2c.h: Update decl.
* loc2c-test.c (handle_variable): Update caller.
* tapsets.cxx (dwflpp::literal_stmt_for_local): Update caller.
(dwflpp::loc2c_emit_address): New static method.
roland [Thu, 18 Aug 2005 03:42:24 +0000 (03:42 +0000)]
2005-08-17 Roland McGrath <roland@redhat.com>
PR systemtap/1197
* loc2c.c (struct location): New members `fail', `fail_arg'.
(alloc_location): New function. Initialize those members.
(new_synthetic_loc, translate): Use that instead of obstack_alloc.
(location_from_address, location_relative): Likewise.
(FAIL): New macro. Use it everywhere in place of `error'.
(c_translate_location): Take new args FAIL, FAIL_ARG.
* loc2c.h: Update declaration.
* loc2c-test.c (fail): New function.
(handle_variable): Pass it to c_translate_location.
* tapsets.cxx (dwflpp::loc2c_error): New static method.
(dwflpp::literal_stmt_for_local): Pass it to to c_translate_location.
roland [Thu, 18 Aug 2005 03:41:29 +0000 (03:41 +0000)]
2005-08-17 Roland McGrath <roland@redhat.com>
PR systemtap/1197
* loc2c.c (struct location): New members `fail', `fail_arg'.
(alloc_location): New function. Initialize those members.
(new_synthetic_loc, translate): Use that instead of obstack_alloc.
(location_from_address, location_relative): Likewise.
(FAIL): New macro. Use it everywhere in place of `error'.
* loc2c-test.c (fail): New function.
(handle_variable): Pass it to c_translate_location.
* tapsets.cxx (dwflpp::loc2c_error): New static method.
(dwflpp::literal_stmt_for_local): Pass it to to c_translate_location.
fche [Tue, 16 Aug 2005 18:41:02 +0000 (18:41 +0000)]
2005-08-16 Frank Ch. Eigler <fche@elastic.org>
PR systemtap/1180
* tapsets.cxx (*): Add more verbose-predicatation to informative
messages. Correct more hex/dec ostream mismatches.
(query_function): Use entry/querypc, not prologue-end, for
function().return and .statement() probe points.
(dwarf_derived_probe ctor): Reorganize function/statement
probe point regeneration.
fche [Thu, 11 Aug 2005 16:53:45 +0000 (16:53 +0000)]
2005-08-11 Frank Ch. Eigler <fche@elastic.org>
* translate.cxx (emit_function): Add an extra { } around the
function body visitation.
* tapset/timestamp_functions.stp: New file.
* tapset/builtin_conversions.stp: Aggregated from [hex]string.
* tapset/builtin_logging.stp: Aggregated from log/warn/printk.
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.