1 2009-02-10 Frank Ch. Eigler <fche@elastic.org>
3 * tapsets.cxx (find_variable_and_frame_base): Tolerate -1 return
4 value from dwarf_getscope_die.
6 2009-02-07 Josh Stone <jistone@redhat.com>
8 * buildrun.cxx (compile_pass): Pull in autoconf options in a header
9 of #defines rather than -DXXX, and make that header a build dependency.
10 * buildrun.cxx (output_autoconf): New function to consolidate the
11 computation of each autoconf test.
12 * cache.cxx (add_to_cache, get_from_cache, clean_cache): Start treating
13 the stapconf header as a first-class cached item.
14 * cache.h: Move definitions of things only needed in cache.cxx
15 * hash.cxx (find_stapconf_hash): Generate stapconf_name as a .h now.
16 * main.cxx (main): Default the stapconf_name based on getpid().
18 2009-02-06 Josh Stone <jistone@redhat.com>
20 * hash.cxx (find_hash): Compute a separate script-independent hash
21 for caching autoconf values, saved in session.stapconf_path.
22 * buildrun.cxx (compile_pass): Tweak the Makefile to read/save
23 the autoconf values in the cache directory
25 2009-02-06 Frank Ch. Eigler <fche@elastic.org>
27 * buildrun.cxx: Add STAPCONF_PROCFS_OWNER test.
29 2009-02-05 Will Cohen <wcohen@redhat.com>
32 * scripts/kernel-doc: Correct productname tag.
34 2009-02-05 Frank Ch. Eigler <fche@elastic.org>
37 * buildrun.cxx: Add STAPCONF_VM_AREA autoconf test.
39 2009-02-04 Mark Wielaard <mjw@redhat.com>
41 * NEWS: process().mark(), sys/sdt.h and dtrace compatibility script.
43 2009-02-04 Mark Wielaard <mjw@redhat.com>
45 * NEWS: Mention run-stap.
47 2009-02-04 Mark Wielaard <mjw@redhat.com>
49 * NEWS: Add Beginner Guide.
51 2009-02-04 Mark Wielaard <mjw@redhat.com>
53 * NEWS: Mention SystemTap Tapset Reference Manual.
55 2009-02-03 Frank Ch. Eigler <fche@elastic.org>
58 * tapsets.cxx (common_probe_entryfn_prologue): Revert.
59 * translate.cxx (emit_common_header): Revert.
61 2009-02-03 Dave Brolley <brolley@redhat.com>
63 * NEWS: Update status of client/server.
64 * stap-server.8.in: Add description of client/server certificate
66 * stap-server (initialization): Ensure that all server response
68 (check_request): Parse the client's command line here.
69 (check_comnpatibility): Don't require client/server platform match
71 (fatal,error): Correct quoting typos.
72 stap-server.8.in: Add SSL information.
73 * stap-stop-server: Use 'ps -e' to list processes.
74 * stap-add-server-cert: The directory name now refers to the database
75 directly, not the directory below it.
76 * stap-serverd: Specify the full database directory name when calling
79 2009-02-03 Mark Wielaard <mjw@redhat.com>
81 * elaborate.cxx (match_node::find_and_build): Disambiguate error
84 2009-02-02 Stan Cox <scox@redhat.com>
86 * NEWS, stapprobes.5.in: Add process.label.
88 2009-02-01 Stan Cox <scox@redhat.com>
90 * tapsets.cxx (dwflpp::iterate_over_cu_labels): New.
92 (dwarf_derived_probe::register_patterns): Register .label.
94 2009-02-01 Mark Wielaard <mjw@redhat.com>
96 * translate.cxx (dump_unwindsyms): Process extra_offset with
97 dwfl_module_relocate_address.
99 2009-01-30 Masami Hiramatsu <mhiramat@redhat.com>
102 * configure.ac (AC_CONFIG_FILES): Add initscript/systemtap.in.
103 * configure: Regenerated.
104 * systemtap.spec: Add systemtap-initscript subpackage.
106 2009-01-30 Dave Brolley <brolley@redhat.com>
108 * Makefile.am (install-scripts): New target. Set exec_prefix and
109 sysconfdir properly in installed scripts.
110 * stap-find-or-start-server: Set exec_prefix and sysconfdir for use
111 from the source tree by dejagnu. Leave a hook to modify them when
113 * stap-start-server: Likewise.
114 * stap-client (configuration): Likewise. Check for the existence of the
115 default certificate databases before checking their security.
116 (parse_options): Issue fatal error if no usable certificate databases
118 (check_db,check_db_file): Check that the database and files are owned
119 by the user running the client.
120 (fatal): Print "ERROR:" tag here. Adjust all callers.
121 * stap-server (initialization): Set exec_prefix and sysconfdir for use
122 from the source tree by dejagnu. Leave a hook to modify them when
123 installed. Check that all specified files and directories exist.
124 (fatal): Print "ERROR:" tag here. Adjust all callers.
126 * stap-serverd (initialization): Set exec_prefix and sysconfdir for use
127 from the source tree by dejagnu. Leave a hook to modify them when
129 (check_db,check_db_file,check_db_cert): Check that the database and
130 files are owned by the user running the server.
131 (fatal): Print "ERROR:" tag here. Adjust all callers.
132 * Makefile.in: Regenerated.
133 * aclocal.m4: Regenerated.
135 2009-01-30 Frank Ch. Eigler <fche@elastic.org>
137 * git_version.sh: Don't print GIT_BRANCH into GIT_MESSAGE, as it
138 is local, and "(no branch)" confuses other stuff. The SHA1 commit
141 2009-01-29 Dave Brolley <brolley@redhat.com>
143 * stap-client (initialization): Set our_host_name and our_domain_name
145 (find_and_connect_to_server): Correct the extraction of a host name
146 looked up by ip address. Replace 'localhost' with the actual host name.
147 (choose_server): Don't set our_host_name and our_domain_name here.
148 Don't change the name of our host to 'localhost' here. Check that
149 ahavi has provided the host name. Don't check that avahi has provided
150 the ip address. Pass the host name to send_receive.
151 (send_receive): Change the name of our host to 'localhost' here.
152 (check_db): Add recommended (but not fatal) access permission checks.
153 (check_db_file): Likewise.
154 * stap-gen-server-cert: Create the certificate database and the
155 certificate file with the recommended access permissions.
156 * stap-server (initialization): Call check_db to check the security of
157 the chosen certificate database.
158 (check_db,check_db_file,check_cert_file,warning): New functions.
160 2009-01-28 Dave Brolley <brolley@redhat.com>
162 * stap-client (initialization): Call check_db to check the security of
163 the default certificate databases. Initialize find_all.
164 (parse_options): Handle the --server option.
165 (process_server): New function.
166 (process_ssl): Call check_db to check the security of the specified
167 certificate database.
168 (find_and_connect_to_server): Create the server's .jar file
169 here. Create the connection log file here. Process $specified_servers
170 if present. Use $find_all on stap-find-servers. Issue server connection
172 (choose_server): ... not here.
173 (send_receive): Don't create the server's .jar file here.
174 Always check the local certificate databases. Echo the
175 name of the database used to successfully authenticate the
177 (check_db,check_db_file): New functions.
178 (warning): New function.
179 * stap-add-server-cert: Create the client database with 755 permissions.
180 * stap-client-connect.c (sslerr.h): #include it.
181 (errWarn): Handle SEC_ERROR_BAD_DATABASE and SSL_ERROR_BAD_CERT_DOMAIN.
182 (do_connect): Don't call PR_GetHostByName or PR_EnumerateHostEnt.
183 (client_main): No longer takes 'hostName' argument. Update all callers.
185 2009-01-26 Mark Wielaard <mjw@redhat.com>
187 * dtrace: Handle (absense of) -o argument correctly.
189 2009-01-26 Stan Cox <scox@redhat.com>
191 * tapsets.cxx (find_variable_and_frame_base): Allow for disjoint
193 * runtime/sdt.h: Change label prefix.
195 2009-01-26 Mark Wielaard <mjw@redhat.com>
197 * configure.ac: Check for version.h.in before installing.
198 * configure: Regenerated.
200 2009-01-23 Frank Ch. Eigler <fche@elastic.org>
203 * tapsets.cxx (translate_location, translate_components,
204 translate_final_fetch_or_store, literal_stmt_for_*): Don't pass
205 superfluous module_bias down to loc2c code, since it's been
206 subtracted out already.
208 2009-01-23 Mark Wielaard <mjw@redhat.com>
210 * configure.ac: Use install-pkgincludeHEADERS for elfutils to only
211 get include-elfutils/elfutils/version.h. And explicitly exit if
212 configuring elfutils fails.
213 * configure: Regenerated.
214 * .gitignore: Add build-elfutils, include-elfutils, lib-elfutils
217 2009-01-23 Mark Wielaard <mjw@redhat.com>
219 * configure.ac: Use make -k install-data for elfutils.
220 * configure: Regenerated.
222 2009-01-22 David Smith <dsmith@redhat.com>
224 * systemtap.spec: Added 'nss-devel' buildreq so that the 'client'
225 subpackage could be built correctly. Added file-based buildreq
226 for xmlto's pdf support, which works on f8, f9, f9, and rhel5.
228 * configure.ac: Fixed typo.
229 * configure: Regenerated.
231 2009-01-22 Stan Cox <scox@redhat.com>
233 * dtrace: Rewritten to handle dtrace -h -G
234 * runtime/sdt.h: New .probes layout. Make labels unique, args unused.
235 * tapsets.cxx (dwarf_builder::build): New .probes layout.
236 Don't reset location->components[0].
238 2009-01-21 Mark Wielaard <mjw@redhat.com>
240 * configure.ac: Create PIECFLAGS and PIECXXFLAGS, like PIELDFLAGS.
241 Don't duplicate -pie in PIELDFLAGS.
242 * configure: Regenerated.
243 * Makefile.am: Add @PIECFLAGS@ and @PIECXXFLAGS@ to executable
245 * Makefile.in: Regenerated.
247 2009-01-21 Mark Wielaard <mjw@redhat.com>
249 * Makefile.am (distclean-local): Remove build-elfutils,
250 include-elfutils and lib-elfutils here, not in clean-local.
251 * Makefile.in: Regenerated.
252 * configure.ac: Only muck with CPPFLAGS and include-elfutils when
253 actually building with bundled elfutils.
254 * configure: Regenerated.
256 2009-01-21 Mark Wielaard <mjw@redhat.com>
258 * Makefile.am (clean-local): Remove build-elfutils, include-elfutils
260 * Makefile.in: Regenerated.
261 * aclocal.m4: Regenerated.
262 * configure: Regenerated.
264 2009-01-20 Frank Ch. Eigler <fche@elastic.org>
266 * tapsets.cxx (dwarf..:visit_target_symbol): Print more data
267 for failed $$vars fields to help explain printed "var=?".
269 2009-01-20 Frank Ch. Eigler <fche@elastic.org>
271 * dwarf_wrappers.cxx (dwfl_assert): Tolerate rc==-1, for which
272 dwfl_errmsg(-1)=>NULL.
274 2009-01-19 Dave Brolley <brolley@redhat.com>
276 * stap-serverd (initialization): Call stap-add-server-cert only if
277 it has been installed.
279 2009-01-13 Stan Cox <scox@redhat.com>
281 * systemtap.spec (sdt-devel): New subpackage.
282 * Makefile.am (oldincludedir): New.
283 (oldinclude_HEADERS): New.
284 (bin_SCRIPTS): Add dtrace
285 * Makefile.in: Regenerated.
286 * runtime/sduprobes.h: Renamed to sdt.h
288 2009-01-13 Dave Brolley <brolley@redhat.com>
290 * stap-find-or-start-server,stap-start-server,stap-serverd,stap-server:
291 Ensure we call other systemtap tools from the installed location.
292 * stap-client: Likewise. Also, use SYSTEMTAP_STAPRUN if it is set.
294 2009-01-13 Dave Brolley <brolley@redhat.com>
296 * stap-add-server-cert: Failure to make the client database readable
297 is now only a warning. Directory argument now refers to the location
298 of the 'client' directory.
299 * stap-gen-server-cert: Ensure that the certificate is readable by
300 all. Warn if unsuccessful. Don't add the certificate to the local
301 client-side database.
302 * stap-serverd: Call stap-add-server-cert after stap-gen-server-cert.
304 2009-01-11 Wenji Huang <wenji.huang@oracle.com>
306 * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Fix too
307 large number on 32-bits machines.
308 (uprobe_derived_probe_group::emit_module_decls): Ditto.
310 2009-01-11 Mark Wielaard <mjw@redhat.com>
312 * configure.ac: Add prefix as STAP_PREFIX for config.h.
313 * config.in: Regenerated.
314 * configure: Regenerated.
316 2009-01-09 Elliott Baron <ebaron@redhat.com>
318 * stap.1.in: Added %M info.
320 2009-01-09 Dave Brolley <brolley@redhat.com>
322 * Makefile.am (stamp-ssl): Removed.
323 (ssl/server/stap-server.cert): Removed.
324 (install-data-local): Don't install $(builddir)/ssl.
325 (stap-add-server-cert): Create database directory if it does not
326 exist. Ensure the database is readable by others.
327 * stap-client (initialization): Initialize local_ssl_dbs and
328 public_ssl_dbs. Don't initialize ssl_db.
329 (parse_options): Concatenate additional_local_ssl_dbs with
331 (process_ssl): Build up additional_local_ssl_dbs in the order
332 specified on the command line.
333 (choose_server): Set server for non-local domains. Print
334 $tmpdir_client/connect to stderr if we can't connect.
335 (send_receive): Try connecting to the given server using all of the
336 databases in $local_ssl_dbs and $public_ssl_dbs. Keep log in
337 $tmpdir_client/connect.
338 (interrupt): Use SIGTERM to kill stap-client-connect.
339 * stap-client-connect.c (prerror.h,secerror.h): #include them.
340 (errWarn): Try to the the error text from NSPR. Handle specific errors
342 (handle_connection): Stop processing on write error of the local file.
343 (do_connect): Cleanup on error. Call SSL_ForceHandshake to catch
344 authentication errors here.
345 * stap-gen-server-cert: Don't create the client's database directory.
346 * stap-server: Redirect the output of signtool to /dev/null.
347 * stap-server-connect.c (handle_connect): Call SSL_ForceHandshake to catch
348 authentication errors here. Clean up temp files on error.
349 (accept_connection): Don't close the socket on error.
350 stap-serverd (initialization): Print a message if the given socket is busy.
351 Search for a local certificate database. Create and initialize one if not
353 (listen): Don't discard stderr fomr stap-server-connect.
354 * stap-start-server: Check for existence of local certificate database as
355 evidence that the server is listening.
356 * Makefile.in: Regenerated.
358 2009-01-08 William Cohen <wcohen@redhat.com>
360 * configure.ac: Check for xmlto that generates pdf.
361 * configure: Regenerated.
363 2009-01-07 William Cohen <wcohen@redhat.com>
365 * configure.ac: Add --enable-refdocs configure option and
367 * Makefile.in: Regenerated.
368 * aclocal.m4: Likewise.
369 * configure: Likewise.
371 2009-01-07 Mark Wielaard <mjw@redhat.com>
373 * configure.ac: Warn when not building docs because tools not found.
374 * configure: Regenerated.
376 2009-01-07 Mark Wielaard <mjw@redhat.com>
378 * configure.ac: Add --enable-server configure option and
379 set BUILD_SERVER appropriately.
380 * Makefile.am (man_MANS, bin_PROGRAMS, bin_SCRIPTS): Only add
381 stap-server and friends when BUILD_SERVER set.A
382 * Makefile.in: Regenerated.
383 * aclocal.m4: Likewise.
384 * configure: Likewise.
386 2009-01-06 Frank Ch. Eigler <fche@elastic.org>
389 * buildrun.cxx (compile_pass): Add $(LINUXINCLUDES) to autoconf
390 trial builds. Add new autoconf test for task_struct uid->cred switch.
392 2009-01-06 Dave Brolley <brolley@redhat.com>
394 * systemtap.spec (stap-client): Add stap-add-server-cert,
396 (stap-server): Add stap-server-connect.
398 2009-01-05 Dave Brolley <brolley@redhat.com>
401 * stap-gen-server-cert: Try mkpasswd, apg and then user_enter_password
402 when generating the password for the server certificate/key
404 (user_enter_password): New function.
406 2008-12-31 Frank Ch. Eigler <fche@elastic.org>
408 * translate.cxx (dump_unwindsyms): Adapt to elfutils build-id
409 bug that was fixed in 0.138.
410 * configure.ac: Look for elfutils/version.h.
411 * config.in, configure: Regenerated.
413 2008-12-30 Dave Brolley <brolley@redhat.com>
416 From Eugeniy Meshcheryakov <eugen@debian.org>
417 * Makefile.am (stap_client_connect_CFLAGS): Use $(nss_CFLAGS) and
419 (stap_server_connect_CFLAGS): Likewise.
420 * configure.ac: Use PKG_CHECK_MODULES to configure nss and nspr.
421 * Makefile.in: Regenerated.
422 * aclocal.m4: Regenerated.
423 * configure: Regenerated.
425 2008-12-30 Dave Brolley <brolley@redhat.com>
427 * Makefile.am (install-data-local): Test for existence of $(builddir)/ssl
428 before installing it.
429 * Makefile.in: Regenerated.
431 2008-12-29 Frank Ch. Eigler <fche@elastic.org>
433 * Makefile.am (install-data, uninstall-data): Use
434 $(DESTDIR)$(sysconfdir) instead of hard-coded /etc paths.
436 2008-12-26 Dave Brolley <brolley@redhat.com>
438 * Makefile.am (stamp-ssl): Disable automatic building of this target.
439 * Makefile.in: Regenerated.
441 2008-12-24 Dave Brolley <brolley@redhat.com>
443 * stap-client (netcat): Removed.
444 (initialization): Initialize ssl_db.
445 (parse_options): Handle the --ssl option.
446 (process_ssl): New function.
447 (send_request): Removed.
448 (receive_response): Removed.
449 (unpack_response): Use signtool to verify the contents of the
450 server's response against a local copy of the server's
452 (find_and_connect_to_server): Make sure the server is referred to
453 as localhost if it is running on the local host. Call send_receive
454 in order to contact the server and perform the transaction.
455 (connect_to_server): Removed.
456 (disconnect_from_server): Removed.
457 (send_receive): New function.
458 (process_response): Work in $tmpdir_server.
459 (terminate, interrupt): Kill any running stap-client-connect.
460 * stap-find-or-start-server: Pass arguments to stap-start-server.
461 * stap-start-server: Pass arguments to stap-serverd.
462 * stap-server (port): Removed.
464 (receive_request): Removed.
465 (unpack_request): Use unzip.
466 (package_response): Use signtool to sign the response into a .jar
468 (send_response): Removed.
469 * stap-serverd (netcat): Removed.
471 (initialize): Don't call recursively. Use a loop to select a port.
472 (listen): Call stap-server-connect.
473 (process_request): Removed.
474 (terminate): Kill any running stap-server-connect job.
475 * systemtap.spec: client and server sub packages require nss and nss-tools,
476 and no longer require nc or net-tools.
477 * Makefile.am (bin_PROGRAMS): Add stap-client-connect and
479 (bin_SCRIPTS): Add stap-gen-server-cert.
480 (stap_client_connect_LDFLAGS, stap_server_connect_LDFLAGS): New.
481 (stamp-ssl): New target.
482 (ssl/server/stap-server.cert): New target.
483 (stap_client_connect_*): New.
484 (stap_server_connect_*): New.
485 (install-data-local): Install /etc/systemtap/ssl.
486 (uninstall-local): Remove /etc/systemtap.
487 * Makefile.in: Regenerated.
488 * aclocal.m4: Regenerated.
490 2008-12-22 Masami Hiramatsu <mhiramat@redhat.com>
493 * buildrun.cxx (compile_pass): Use flags macro to expand KBUILD_CFLAGS
494 for support kernels built with O= option.
496 2008-12-21 Will Cohen <wcohen@redhat.com>
498 * systemtap.spec: Add generations of tapset reference manual material.
500 2008-12-21 Stan Cox <scox@redhat.com>
502 * tapsets.cxx (dwflpp::die_has_pc): Don't abort if dwarf_ranges fails.
503 (dwflpp::find_variable_and_frame_base): A pc requires dwarf_nscopes
505 2008-12-19 Elliott Baron <ebaron@redhat.com>
508 * elaborate.cxx: Handling for %M.
509 * runtime/vsprintf.c: Likewise.
510 * staptree.cxx: Likewise.
511 * translate.cxx: Likewise.
512 * staptree.h: Added %M converter, conv_memory_hex, to enum
514 2008-12-16 Roland McGrath <roland@redhat.com>
516 * systemtap.spec (Requires): Add kernel-devel, is correct virtual
517 provide in kernel-*-devel rpms.
518 (with_sqlite): Typo fix in default defn check.
519 [%{with_sqlite}] (Requires): Remove. BuildRequires causes the correct
520 automatic dependency.
522 2008-12-16 Stan Cox <scox@redhat.com>
524 * tapsets.cxx (dwarf_builder::build): Consider alignment when
525 fetching .probes values. Convert .mark to .statement(0x) instead
526 of .statement(foo.c:N)
528 2008-12-11 Dave Brolley <brolley@redhat.com>
531 * stap-client: Don't use -d on netcat. Redirect from /dev/null instead.
532 * stap-server: Likewise.
533 * stap-serverd: Likewise.
535 2008-12-09 Frank Ch. Eigler <fche@elastic.org>
538 * tapsets.cxx (common_probe_entryfn_prologue): Add new "fakeregs"
539 param. Set context regs_buffer with plausible dummy values if needed.
541 (mark_builder::build): Add kernel to unwindsyms_modules.
542 * translate.cxx (emit_common_header): Add pt_regs regs_buffer field
545 2008-12-09 Dave Brolley <brolley@redhat.com>
548 * stap-client: Use netcat or nc, whichever is available.
549 * stap-server: Likewise.
550 * stap-serverd: Likewise.
552 2008-12-08 David Smith <dsmith@redhat.com>
555 * tapsets.cxx (dwflpp::cu_function_caching_callback): Handles NULL
556 return from dwarf_diename().
557 (dwflpp::print_locals): Ditto.
558 (dwflpp::find_variable_and_frame_base): Ditto.
559 (dwflpp::literal_stmt_for_return): Ditto.
560 (dwarf_builder::build): Ditto.
562 2008-12-08 Frank Ch. Eigler <fche@elastic.org>
565 * buildrun.cxx (uprobes_home): Make local, based on
566 session.runtime_path.
568 2008-12-05 Frank Ch. Eigler <fche@elastic.org>
570 * tapsets.cxx, translate.cxx: Set default elfutils debuginfo_path
571 to start with "+", to enable debuginfo<->stripped checksum checking.
572 * stap.1.in: Note this.
574 2008-12-05 Kent Sebastian <ksebasti@redhat.com>
577 * doc/langref.tex, elaborate.cxx, runtime/vsprintf.c,
578 stap.1.in, staptree.cxx, staptree.h, translate.cxx:
579 Remove printf %n directive and references to it in documentation.
581 2008-12-03 Roland McGrath <roland@redhat.com>
584 * run-stap.in: New file.
585 * configure.ac: Generate run-stap from it.
586 * configure: Regenerated.
589 * buildrun.cxx (run_pass): Obey SYSTEMTAP_STAPRUN environment variable.
591 2008-12-03 Frank Ch. Eigler <fche@elastic.org>
594 * configure.ac: Suggest --prefix if configured without.
595 * configure: Regenerated.
597 2008-12-03 Frank Ch. Eigler <fche@elastic.org>
599 PR 5982: rename -B to -r
600 * main.cxx (main): Treat -r REV and -r /PATH as complimentary.
601 Imply -p4 if target mismatches host versions.
602 (usage): Document -r more.
603 * hash.cxx (find_hash): Add in the kernel_build_tree.
604 * buildrun.cxx (compile_pass, kernel_built_uprobes): Simplify
606 * tapsets.cxx (setup_kernel, setup_user): Ditto.
607 * translate.cxx (emit_symbol_data): Ditto.
608 * stap.1.in: Document -r /PATH.
610 2008-12-01 Rajan Arora <rarora@redhat.com>
612 PR 5892: Add -B and parameterize all occurences of /lib/modules/...
613 * buildrun.cxx (compile_pass, kernel_built_uprobes): Audit
614 mentions of /lib/modules/... with path to kernel_build_tree
616 * tapsets.cxx (setup_kernel, setup_user, mark_builder::build):
618 * translate.cxx (emit_symbol_data): Likewise.
619 * session.h (struct systemtap_session): New member kernel_build_tree.
620 * main.cxx (main): Add case for 'B' and attempt to fetch Version for
621 the kernel build tree using include/config/kernel.release in build
622 path, remove -r REV implies -p4 logic altogether.
625 2008-11-29 Frank Ch. Eigler <fche@elastic.org>
628 * buildrun.cxx (verify_uprobes_uptodate, make_uprobes): Simplify
630 * cache.cxx (add_to_cache, clean_cache): Reset s.use_cache upon
632 * hash.cxx (find_hash): Ditto.
633 * main.cxx (main): Simplify/conditionalize warning messages. Save
634 module to $cwd if last_pass==4 but cache encountered errors.
636 2008-11-28 Frank Ch. Eigler <fche@elastic.org>
639 * translate.cxx (dump_unwindsyms): Tweak symbols for
640 STP_NEED_{SYMBOL,UNWIND}_DATA
642 2008-11-28 Elliott Baron <ebaron@redhat.com>
645 * translate.cxx (dump_unwindsyms): Output #ifdef for
648 2008-11-28 Frank Ch. Eigler <fche@elastic.org>
651 * parse.cxx (parse::parse_probe): Prevent alias names from
652 being marked "?" or "!".
654 2008-11-28 Frank Ch. Eigler <fche@elastic.org>
657 * elaborate.cxx (print_error_source, print_warning): Tolerate
660 2008-11-27 Frank Ch. Eigler <fche@elastic.org>
663 From Wenji Huang <wenji.huang@oracle.com>:
664 * elaborate.cxx (print_error): Don't suppress if listings_mode.
665 * main.cxx (main): Suppress "pass N failed" if listings_mode.
667 2008-11-26 Stan Cox <scox@redhat.com>
669 * tapsets.cxx (dwarf_builder::build): Support debuginfo static uprobes.
671 2008-11-26 Frank Ch. Eigler <fche@elastic.org>
673 * translate.cxx (emit_module_exit): Add another synchronize_sched.
675 2008-11-26 Frank Ch. Eigler <fche@elastic.org>
677 * main.cxx (main): Advise users to try '--vp ...' after a pass error.
679 2008-11-26 Frank Ch. Eigler <fche@elastic.org>
681 * translate.cxx (emit_module_exit): Call synchronize_sched during
682 module shutdown if it's available.
683 * buildrun.cxx (compile_pass): Test for it.
685 2008-11-25 Frank Ch. Eigler <fche@elastic.org>
688 * tapsets.cxx (uprobe*emit_module_decls): Rewrite the generated
689 stap_uprobe_change function, to hold mutex for a shorter period
690 and to produce more meaningful KERN_INFO traces if -DDEBUG_UPROBES.
691 (uprobe*emit_module_exit): Switch to KERN_INFO also.
693 2008-11-25 Will Cohen <wcohen@redhat.com>
695 * scripts/kernel-doc: Clean up SystemTap function formatting.
697 2008-11-25 Will Cohen <wcohen@redhat.com>
699 * scripts/kernel-doc: Make executable.
701 2008-11-25 Will Cohen <wcohen@redhat.com>
703 * scripts/kernel-doc: New.
704 * configure.ac: Add doc/SystemTap_Tapset_Reference/Makefile.
705 * configure, doc/SystemTap_Tapset_Reference/Makefile.in: Regenerate.
707 2008-11-25 Mark Wielaard <mjw@redhat.com>
709 * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit):
710 struct stap_dwarf_probe field is called pp, not pp_name.
712 2008-11-24 Kent Sebastian <ksebasti@redhat.com>
715 * stap.1.in (PRINTING): printf directives, more examples.
717 2008-11-22 Frank Ch. Eigler <fche@elastic.org>
719 * tapsets.cxx (MAXUPROBES): Tweak its definition. Use it
721 * stap.1.in (MAXUPROBES): Document it.
723 2008-11-22 Frank Ch. Eigler <fche@elastic.org>
726 * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit,decls):
727 Print kprobe missed stats if STP_TIMING.
728 (uprobe_derived_probe_group::emit_module_exit,declx): Track
729 uprobe missed stats if STP_TIMING>
730 * translate.cxx (emit_module_exit): Print uprobe missed stats.
732 2008-11-21 Frank Ch. Eigler <fche@elastic.org>
735 * tapsets.cxx (common_probe_entryfn_{pro,epi}logue):
736 Track separate skip counts for low-stack and reentrancy conditions.
737 * translate.cxx (emit_common_header): Declare counters.
738 (emit_module_exit): Print them.
739 (emit_unlocks): Don't bother redundantly testing skipped_count.
741 2008-11-21 Frank Ch. Eigler <fche@elastic.org>
743 * translate.cxx (emit_module_exit): Perform shutdown probe
744 synchronization after all unregistrations and end/error probe
747 2008-11-20 Frank Ch. Eigler <fche@elastic.org>
750 * translate.cxx (emit_global, emit_global_init, emit_module_exit,
751 emit_locks): Track & print global.s_VAR_lock_skip_count.
753 2008-11-20 Frank Ch. Eigler <fche@elastic.org>
755 * main.cxx (main): Correct thinko in --vp option with <5 arg chars.
757 2008-11-18 Jim Keniston <jkenisto@us.ibm.com>
760 * runtime/uprobes2/uprobes_x86.c: Allow probing of instructions
761 with fs: and gs: prefixes. Apply fix from runtime/uprobes.
763 2008-11-18 Frank Ch. Eigler <fche@elastic.org>
766 * main.cxx (usage,main): Process new --vp option.
767 * session.h (perpass_verbose): New field.
769 2008-11-11 Stan Cox <scox@redhat.com>
771 * Makefile.am (pkglib_LIBRARIES): New.
772 * Makefile.in: Regenerated
773 * stapprobes.5.in (process.mark): New.
774 * tapsets.cxx (register_patterns): Add process.mark.
775 (dwarf_builder::build): Likewise.
777 2008-11-14 Frank Ch. Eigler <fche@elastic.org>
779 * tapsets.cxx (common_probe_entryfn_{pro,epi}logue):
780 Set "interruptible" to default true, thus disabling local_irq_*
781 calls for all current probe point types.
783 2008-11-13 Wenji Huang <wenji.huang@oracle.com>
786 * translate.cxx (c_unparser::visit_print_format): Add checking bound
787 for actual parameters.
789 2008-11-13 Frank Ch. Eigler <fche@elastic.org>
791 * systemtap.spec, configure.ac: Bump version to 0.8.
792 * configure.in: Regenerated.
794 2008-11-11 Przemysław Pawełczyk <przemyslaw@pawelczyk.it>
795 Mark Wielaard <mjw@redhat.com>
797 * tapsets.cxx (find_variable_and_frame_base): Add scope name to
798 semantic error messages if available.
800 2008-11-06 Wenji Huang <wenji.huang@oracle.com>
803 * tapsets.cxx (profile_builder): Add default kernel symbols to profile.
805 2008-11-06 Stan Cox <scox@redhat.com>
807 * tapsets.cxx (dwflpp::module_address_to_global):
808 ET_EXEC needs no further relocation.
810 2008-11-04 Frank Ch. Eigler <fche@elastic.org>
812 From Masami Hiramatsu <mhiramat@redhat.com>, PR 6028.
813 * tapsets.cxx (dwarf_derived_probe): New field access_vars, for
814 tracking result from ..
815 (dwarf_var_expanding_copy_visitor): Collect a flag about whether
816 any $expressions appear within.
817 (emit_probe_local_init): ... and run ia64 bspcache() on if true.
819 2008-11-03 Jim Keniston <jkenisto@us.ibm.com>
821 Add a version of uprobes that works with the 2.6.27 version of utrace.
822 * runtime/uprobes2/uprobes.[ch]: uprobes2
823 * runtime/uprobes2/uprobes_x86.[ch]: Simplified to use post-2.6.24
824 unified pt_regs names ("ax" rather than "eax" or "rax").
825 * runtime/uprobes2/uprobes_arch.[ch]: Pull in the arch-specific
826 file from the appropriate directory.
827 * runtime/uprobes/uprobes.[ch]: #ifdef added to pull in file from
828 ../uprobes2 if we're running the new utrace.
829 * runtime/uprobes/Makefile: Updated
830 * Makefile.am: Install runtime/uprobes2/*.
831 * Makefile.in: Regenerated
832 * buildrun.cxx: Always copy uprobes's Module.symvers into the
833 directory where stap builds the script .ko.
835 2008-11-03 Mark Wielaard <mjw@redhat.com>
837 * tapsets.cxx (literal_stmt_for_return): Add function name and file
838 to semantic error messages.
840 2008-10-29 Frank Ch. Eigler <fche@elastic.org>
842 * translate.cxx (dump_unwindsyms): Work on CONFIG_RELOCATABLE=n
843 kernels, or for whatever other scenarios dwfl_module_relocation_info
846 2008-10-27 Josh Stone <joshua.i.stone@intel.com>
848 * translate.cxx (c_unparser::visit_print_format): Fix the argument passed
849 for printf %c formats.
851 2008-10-27 Rajan Arora <rarora@redhat.com>
853 * elaborate.cxx (add_global_var_display): Added check for globals
856 2008-10-24 Josh Stone <joshua.i.stone@intel.com>
858 * tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls): Support
859 the new abstractions around the hrtimer expires field. The field is
860 renamed starting in 2.6.28-rc1, but accessor functions are provided for
862 * buildrun.cxx (compile_pass): Added autoconf-hrtimer-getset-expires.c
864 2008-10-24 Jim Keniston <jkenisto@us.ibm.com>
867 * tapsets.cxx: Allow probing of 32-bit ppc apps with
870 2008-10-20 Elliott Baron <ebaron@redhat.com>
873 * elaborate.cxx (typeresolution_info::visit_print_format): add case
875 * staptree.cxx (print_format::components_to_string): add case for
877 (print_format::string_to_components): add parsing for "c" conversion.
878 * staptree.h (enum conversion_type): add conv_char member.
880 2008-10-17 Frank Ch. Eigler <fche@elastic.org>
882 * stap-report: Add kernel config extracts. Generate to stdout.
883 * Makefile.am (bin_SCRIPTS): Install it.
884 * systemtap.spec: Package it.
885 * Makefile.in: Regenerated.
887 2008-10-17 Jim Keniston <jkenisto@us.ibm.com>
890 * runtime/autoconf-oneachcpu-retry.c: Compiles successfully on
893 2008-10-14 Kent Sebastian <ksebasti@redhat.com>
895 * cache.cxx (cache_clean): Minor changes, mainly stylistic.
896 * session.h: remove cache_max member var (used only in cache.cxx now)
898 2008-10-10 Frank Ch. Eigler <fche@elastic.org>
901 * tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Tolerate
902 failed register_*kprobe during initialization; warn instead.
904 2008-10-10 Kent Sebastian <ksebasti@redhat.com>
906 * cache.cxx (cache_clean): New group of functions implementing cache
909 2008-10-09 Rajan Arora <rarora@redhat.com>
911 * elaborate.cxx (systemtap_session::print_error_source): New.
912 (systemtap_session::print_error): Call it.
913 (systemtap_session::print_warning): Likewise.
914 * parse.cxx (parser::print_error): Likewise.
915 * session.h (struct systemtap_session::print_error_source):
917 * parse.cxx (lexer::get_input_contents): New.
918 (parser::parse): Call it.
919 (lexer::set_current_file): New.
920 (parser::parse): Call it.
921 * parse.h (class lexer::get_input_contents): Declare it.
922 (class lexer::set_current_file): Declare it.
923 (class lexer): New member current_file.
924 (class lexer): Update input_contents from vector<char>
926 (struct source_loc): New member stap_file.
927 * staptree.h (struct stapfile): New member file_contents.
929 2008-10-09 Stan Cox <scox@redhat.com>
931 * tapsets.cxx (query_cu): Fix typo.
933 2008-10-06 Wenji Huang <wenji.huang@oracle.com>
936 * translate.cxx (dump_unwindsyms): Extract build-id from debuginfo.
937 (emit_module_init): Check build-id if able.
939 2008-10-03 Jim Keniston <jkenisto@us.ibm.com>
942 * runtime/uprobes/uprobes.c: When a probed process forks with
943 uretprobe_instances outstanding, create a uprobe_process and
944 uprobe_task for the child, and clone the uretprobe_instances.
945 This requires us to allow the SSOL vma to be copied on fork.
946 * testsuite/systemtap.base/bz6850.{exp,c,stp}: new test case
948 2008-09-30 Mark Wielaard <mjw@redhat.com>
950 * tapsets.cxx (literal_stmt_for_local): Check if alternatives can be
951 provided after calling dwarf_formref_die.
952 (literal_stmt_for_return): Likewise.
954 2008-09-26 Frank Ch. Eigler <fche@elastic.org>
956 * elaborate.cxx (add_global_var_display): Implicitly sort arrays.
958 2008-09-26 Frank Ch. Eigler <fche@elastic.org>
961 * elaborate.cxx (systemtap_session::print_error): Fix
962 duplicate elimination in face of token compression.
963 * tapsets.cxx (literal_stmt_for_local, literal_stmt_for_return):
964 Change error message to fit old pattern.
966 2008-09-26 Frank Ch. Eigler <fche@elastic.org>
968 BZ 6829: avoid calling unregister_uprobe() when responding
969 to a task-finder exec/exit callback, as uprobes likes to
970 clean such things up by itself.
972 2008-09-12 Prerna Saxena <prerna@linux.vnet.ibm.com>
974 BZ 3016 : Handling members of anonymous structs/unions
975 * tapsets.cxx (translate_components, print_members) : enable
976 translator to identify members of anonymous structs / unions.
977 * testsuite/semok/thirtythree.stp : New test-case.
978 * NEWS : Modify translator code to identify members of anonymous
981 2008-09-24 Mark Wielaard <mjw@redhat.com>
983 * dwarf_wrappers.cxx (dwfl_assert(string,bool)): Call
984 dwfl_assert(string,int), not dwarf_assert().
986 2008-09-12 Dave Brolley <brolley@redhat.com>
988 * stap-client (staprun_PATH): Ensure that $first_stap is not empty.
989 * stap-start-server: Use 'ps' to check that the server started.
991 2008-09-12 Masami Hiramatsu <mhiramat@redhat.com>
994 * tapsets.cxx (dwarf_derived_probe::emit_probe_local_init): Use REG_IP
995 instead of pp to check probe address.
997 2008-09-12 Frank Ch. Eigler <fche@elastic.org>
999 GCC 4.4 (var-tracking) build-compatilibity.
1000 * parse.h: #include <stdint.h>.
1001 * tapsets.cxx (utrace_...::visit_target_symbol_arg): Use
1002 lex_cast<int>(foo) instead of atoi(foo.c_str()) for simpler
1003 c++ object lifetime.
1004 * Makefile.am (staprun_CFLAGS, stapio_CFLAGS): Add
1005 -fno-strict-aliasing, since that code is too casual with pointers.
1006 * Makefile.in: Regenerated.
1008 2008-09-12 Dave Brolley <brolley@redhat.com>
1011 From Eugeniy Meshcheryakov eugen@debian.org:
1012 * stap-server.8.in: Correct formatting problems.
1014 2008-09-12 Dave Brolley <brolley@redhat.com>
1016 * stap-find-servers (match_server): Don't read past the start of the
1017 next server description. Don't use '^' at the start of the regexp
1019 * systemtap.spec: client and server sub packages require avahi.
1021 2008-09-12 Wenji Huang <wenji.huang@oracle.com>
1023 * elaborate.cxx (add_global_var_display): Don't, in listing mode.
1025 2008-09-11 Frank Ch. Eigler <fche@elastic.org>
1028 * tapsets.cxx (query_cu): Search for prologues for user-space probes.
1029 (query_func_info): Use prologue_end if available; silently back down
1030 to entrypc probing if needed.
1032 2008-09-10 Josh Stone <joshua.i.stone@intel.com>
1034 * main.cxx (printscript): Ensure no variables are printed in probe lists
1035 unless -L was specified.
1037 2008-09-10 Frank Ch. Eigler <fche@elastic.org>
1039 * parse.cxx, parse.h: Rewrite scanner lookahead data structure
1040 to a simple ~fixed vector.
1042 2008-09-10 Frank Ch. Eigler <fche@elastic.org>
1044 PR6876: translator speedup for many $vars
1045 * session.h (systemtap_session.functions): vector->map.
1046 * coveragedb.cxx, elaborate.cxx, main.cxx, tapsets.cxx, translate.cxx:
1049 2008-09-10 Mark Wielaard <mjw@redhat.com>
1051 * configure.ac: Check for dwarf_getelf. elfutils 0.126+.
1052 Use AM_PROG_MKDIR_P instead of AC_PROG_MKDIR_P.
1053 * Makefile.in: Regenerated.
1054 * aclocal.m4: Likewise.
1055 * config.in: Likewise.
1056 * configure: Likewise.
1058 2008-09-10 Dave Brolley <brolley@redhat.com>
1060 * systemtap.spec: Remove avahi-tools and nc from dependencies
1061 for systemtap and systemtap-runtime packages. Remove stap-*
1062 scripts from %files of systemtap and systemtap-runtime
1063 packages. Make sure systemattap-runtime only picks up
1064 staprun.8* man pages. Create new systemtap-client and
1065 systemtap-server packages.
1066 * NEWS: Add network security warning for the systemtap
1069 2008-09-10 Mark Wielaard <mjw@redhat.com>
1071 * translate.cxx (dump_unwindsyms): Rename module_base output to
1074 2008-09-10 Mark Wielaard <mjw@redhat.com>
1076 * translate.cxx (dump_unwindsyms): Output module_base.
1078 2008-09-10 Mark Wielaard <mjw@redhat.com>
1080 * translate.cxx (get_unwind_data): New function.
1081 (dump_unwindsyms): Output unwind data.
1083 2008-09-09 Masami Hiramatsu <mhiramat@redhat.com>
1085 * stapprobes.5.in: Added a description about $return.
1087 * tapsets.cxx (utrace_var_expanding_copy_visitor): Change
1088 visit_target_symbol_syscall() to visit_target_symbol_context().
1089 (utrace_var_expanding_copy_visitor::visit_target_symbol_context):
1090 Handle not only $syscall but also $return.
1091 (utrace_var_expanding_copy_visitor::visit_target_symbol): Ditto.
1093 2008-09-09 Masami Hiramatsu <mhiramat@redhat.com>
1095 * stapprobes.5.in: Added a description about $argN.
1097 * tapsets.cxx (utrace_var_expanding_copy_visitor): Added
1098 visit_target_symbol_arg() and visit_target_symbol_syscall().
1099 (visit_target_symbol_arg): New function for handling $argN.
1100 (visit_target_symbol_syscall): New function for handling $syscall.
1101 (visit_target_symbol): Use visit_target_symbol_arg() and
1102 visit_target_symbol_syscall().
1104 2008-09-09 Masami Hiramatsu <mhiramat@redhat.com>
1106 * stapprobes.5.in : Added a line for $name context variable.
1107 * translate.cxx (c_unparser::emit_common_header): Add marker_name and
1108 marker_format fields to context.
1109 * tapsets.cxx (common_probe_entryfn_prologue) : Ditto.
1110 (mark_derived_probe_group::emit_module_decls) : Ditto.
1111 (mark_var_expanding_copy_visitor) : change visit_target_symbol_format
1112 to visit_target_symbol_context.
1113 (mark_var_expanding_copy_visitor::visit_target_symbol_context): handle
1114 not only $format but also $name.
1115 (mark_var_expanding_copy_visitor::visit_target_symbol): Ditto.
1117 2008-09-07 Frank Ch. Eigler <fche@elastic.org>
1119 * tapsets.cxx (build_blacklist): Add some x86 raw port-io spots.
1121 2008-09-06 Frank Ch. Eigler <fche@elastic.org>
1123 * tapsets.cxx (utrace_derived_probe ctor): Handle
1124 process.* probe point reverse engineering (pid- and path-less).
1126 2008-09-05 Stan Cox <scox@redhat.com>
1128 * elaborate.cxx (add_global_var_display): Handle scalar statistics.
1130 2008-09-05 Frank Ch. Eigler <fche@elastic.org>
1132 * configure.ac, Makefile.am, systemtap.spec: Don't look for libcap.
1133 * configure, Makefile.in: Regenerated.
1135 2008-09-05 Wenji Huang <wenji.huang@oracle.com>
1138 * main.cxx (usage,main,printscript): Improve listing mode with "-L".
1139 * stap.1.in, stapex.5.in: Document it.
1141 2008-09-04 Frank Ch. Eigler <fche@elastic.org>
1143 * main.cxx (usage): Remove some dwarfless items.
1145 2008-09-02 Frank Ch. Eigler <fche@elastic.org>
1147 * tapsets.cxx (uprobe..emit_module_init): Leave dying-uprobe
1148 loop as early as possible.
1150 2008-09-02 Stan Cox <scox@redhat.com>
1152 * elaborate.cxx (add_global_var_display): Simplify token use.
1154 2008-09-02 Frank Ch. Eigler <fche@elastic.org>
1157 * tapsets.cxx (generated stap_uprobe_change): Fix major thinko that
1158 falsely triggered a slew of uprobe_unregister's for each plain
1160 (uprobe_derived_probe_group::emit_module_init): Add code to generate
1161 printk's for uprobe activities, if -DDEBUG_UPROBES.
1163 2008-09-02 Frank Ch. Eigler <fche@elastic.org>
1166 * tapsets.cxx: Add prototype user-space probing support. Collateral
1167 damage breaks symbol-table-only (dwarfless) probing, PR6864.
1168 (setup_user, setup_kernel): Split & reorganized.
1169 (class uprobe_derived_probe): Nearly all new code.
1170 (base_query): Add "has_module" and "has_process" flags.
1171 (dwarf_builder): Add "user_dw" map.
1172 (dwarf_query::add_probe_point): Use ".dynamic" pseudo-reloc-base for
1173 ET_DYN modules; ".absolute" for ET_EXEC.
1174 (register_patterns): Register process(...) uprobe-based probes.
1175 (task_finder_derived_probe_group::create_session_group): Let runtime
1176 code assert CONFIG_UTRACE.
1177 (base_query ctor, dwarf_builder::build, itrace_builder,
1178 utrace_derived_probe): Use find_executable() to resolve FOO path in
1180 (utrace_derived_probe ctor): Reverse-engineer probe point.
1181 * main.cxx (main): Don't override $PATH etc.
1182 * util.cxx (find_executable): Reorganize, simplify, canonicalize.
1183 * util.h, hash.cxx: Corresponding changes.
1185 2008-09-02 Wenji Huang <wenji.huang@oracle.com>
1187 * tapsets.cxx (query_func_info): Disable prologue searching in
1190 2008-09-01 Stan Cox <scox@redhat.com>
1192 * elaborate.cxx (add_global_var_display): Also handle statistics.
1194 2008-08-29 Dave Brolley <brolley@redhat.com>
1196 * stap-server.8.in: New man page.
1197 * NEWS: Announce the availability of the client/server.
1198 * Makefile.am (man_MANS): Add stap-server.8.
1199 * configure.ac (AC_CONFIG_FILE): Add stap-server.8.
1200 * Makefile.in: Regenerated.
1201 * configure: Regenerated.
1203 2008-08-29 Stan Cox <scox@redhat.com>
1205 * elaborate.cxx (add_global_var_display): Repopulate symbol/type info.
1207 2008-08-29 David Smith <dsmith@redhat.com>
1209 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
1210 Pushed quiesce logic down into the task_finder layer.
1211 (utrace_derived_probe_group::emit_module_decls): Removed quiesce
1212 handler routines. Syscall probe handler detaches if systemtap
1213 state isn't correct.
1215 2008-08-29 Wenji Huang <wenji.huang@oracle.com>
1217 * main.cxx (printscript): Print variable name and type for listing mode.
1219 2008-08-28 Frank Ch. Eigler <fche@elastic.org>
1221 * elaborate.cxx (add_global_var_display): Render array indexes
1222 in [key,key,key] vs. [key][key][key] form.
1224 2008-08-27 Stan Cox <scox@redhat.com>
1226 * elaborate.cxx (add_global_var_display): New.
1227 (semantic_pass): Call it.
1228 (dead_assignment_remover::visit_assignment): Don't remove written
1229 but unread global variables.
1230 * NEWS, stap.1.in: Document
1232 2008-08-26 David Smith <dsmith@redhat.com>
1234 * buildrun.cxx (compile_pass): Added autoconf-dpath-path.c.
1236 * Makefile.am: Simplified "rpm" target a bit.
1237 * Makefile.in: Regenerated.
1239 * Makefile.am: Moved tar archive creation step from "rpm" target
1240 into "dist-gzip" target.
1241 * Makefile.in: Regenerated.
1243 2008-08-25 Frank Ch. Eigler <fche@elastic.org>
1245 * Makefile.am (AUTOMAKE_OPTIONS): Add "no-dist". Remove all
1246 "make dist"-oriented targets and macros.
1247 (rpm): Rewrite. Allow parametrization with RPMBUILDFLAGS=.
1248 * Makefile.in: Regenerated.
1249 * systemtap.spec: Make configuration macros at top overridable.
1251 2008-08-25 David Smith <dsmith@redhat.com>
1253 * tapsets.cxx (utrace_derived_probe_group::emit_module_init): Make
1254 sure we count the number of utrace probes correctly.
1255 (utrace_derived_probe_group::emit_module_exit): Ditto.
1257 2008-08-25 Dave Brolley <brolley@redhat.com>
1259 * Makefile.am (installcheck): Remove $(EXTRA_SYSTEMTAP_PATH) from
1260 invocation of $(MAKE).
1261 * Makefile.in: Regenerated.
1262 * aclocal.m4: Regenerated.
1263 * stap-client (parse_options): Don't quote an argument if it is already
1265 (send_request): Timeout after 10 seconds.
1266 (receive_response): Timeout after 5 minutes.
1267 (choose_server): Add missing $ to variable reference.
1268 (connect_to_server): Timeout after 10 seconds.
1269 * stap-server (receive_request): Don't check for a "request:"
1270 message. Timeout after 10 seconds.
1271 (send_response): Timeout after 10 seconds.
1272 * stap-serverd (initialization): Remove tmpdir_prefix_serverd and
1273 port2. No need for a temp directory.
1274 (listen): Fifo no longer necessary. Call nc and pipe the output to
1275 process_request in the background.
1276 (process_request): New function.
1277 (fatal): Kill stap-server followed by nc. No tmpdir to remove.
1279 2008-08-24 Frank Ch. Eigler <fche@elastic.org>
1281 * tapsets.cxx (query_statement): Leave empty string for unknown file
1283 (dwarf_derived_probe ctor): Don't synthesize "@filename:lineno"
1284 probe point pieces for unknown files/lines.
1286 2008-08-21 David Smith <dsmith@redhat.com>
1288 * tapsets.cxx (itrace_derived_probe_group::emit_module_decls):
1289 Updated task finder callback function signature.
1290 (utrace_derived_probe_group::emit_module_decls): Ditto.
1292 2008-08-20 David Smith <dsmith@redhat.com>
1294 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
1295 Supports original and new utrace interfaces.
1296 (utrace_derived_probe_group::emit_module_decls): Ditto.
1298 2008-08-20 Dave Brolley <brolley@redhat.com>
1300 * stap-client: Ignore SIGHUP and SIGPIPE.
1301 (initialization): Set b_specified.:
1302 (parse_options): Handle the -b option. Quote $stap_arg. Use process_m.
1303 (process_m): New function.
1304 (process_o): Set stdout_redirection to simply the filename.
1305 (process_response): Obtain the exit code from stap on the server side.
1306 Copy the module to the current directory if -m was specified.
1308 (stream_output): It's back.
1309 (maybe_call_staprun): Print status messages for -v. Leave v_level
1310 unchanged. Pass -o option to staprun. Wait until the staprun job
1312 (terminate): Redirect message to stderr.
1313 (interrupt): Only kill staprun if it's still running. Call cleanup
1315 (ignore_signal): New function.
1316 * stap-server (receive_request): Quote the job specifier.
1317 (send_response): Likewise.
1318 (read_data_file): Use read to check the first line. Use cat the read
1320 * stap-serverd (listen): Quote job specifier.
1321 (terminate): Likewise.
1323 2008-08-19 David Smith <dsmith@redhat.com>
1326 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
1327 Workaround utrace bug by quiescing threads before attaching a
1328 utrace syscall engine to them.
1329 (utrace_derived_probe_group::emit_module_decls): Emit quiesce
1332 2008-08-18 David Smith <dsmith@redhat.com>
1334 * tapsets.cxx (register_standard_tapsets): Add missing
1335 'process.syscall' and 'process.syscall.return' bindings.
1337 2008-08-16 Mark Wielaard <mjw@redhat.com>
1339 * configure.ac (build_elfutils): Mention possible distro
1340 specific elfutils development sub-packages needed when not found.
1342 2008-08-15 David Smith <dsmith@redhat.com>
1344 * tapsets.cxx (utrace_builder::build): Change system-wide probes
1345 from 'process("*").begin' to 'process.begin'.
1346 (register_standard_tapsets): Add new 'process' binding.
1347 * stapprobes.5.in: Change system-wide probes
1348 from 'process("*").begin' to 'process.begin'.
1350 2008-08-15 Frank Ch. Eigler <fche@elastic.org>
1353 * tapsets.cxx (dwarf_var...visit_target_symbol): Emit
1354 "return=0xf00" instead of "$return=0xf00" for $$return,
1355 for consistency with other variables.
1356 * NEWS, stapprobes.5.in: Update.
1358 2008-08-15 Frank Ch. Eigler <fche@elastic.org>
1361 * tapsets.cxx (dwarf_var...visit_target_symbol): Show
1362 "var=?" for unlocatable variables. Support $$return.
1363 Make sure $$parms/etc. work in .return probes too.
1364 * testsuite/semok/thirtytwo.stp: New test.
1365 * NEWS, stapprobes.5.in: Document them.
1367 2008-08-15 Michael Meeks <michael.meeks@novell.com>
1369 * configure.ac: suggest (SUSE) package name for dwfl.
1371 * buildrun.cxx (compile_pass): if extremely verbose, pass through
1372 output from stap checks - helps to debug generic test compile
1375 2008-08-14 Dave Brolley <brolley@redhat.com>
1378 * stap-client (initialization): initialize staprun_running.
1379 (send_request): No server response message required.
1380 (receive_response): No server response message required. Simply
1381 receive the tar file. The tar file should contain a file called 'rc'.
1382 (connect_to_server): Use 'nc'.
1383 (disconnect_from_server): No action required.
1384 (process_response): Renamed from 'stream_output'. Obtain the exit
1385 code from the 'rc' file.
1386 (maybe_call_staprun): set 'staprun_running' while staprun is running.
1387 (check_server_error): Removed.
1388 (server_fatal): Removed.
1389 (cleanup): Redirect stderr of 'kill' to /dev/null.
1390 (interrupt): Pass SIGINT on to staprun, if it is running. Otherwise,
1392 * stap-server (initialization): Create the server temp directory here...
1393 (unpack_request): ... not here.
1394 (receive_request): Don't send a ready message.
1395 (create_response): Write the exit code of 'stap' to the 'rc' file.
1396 (send_response): Don't send a status message.
1397 (fatal,error): Redirect to $tmpdir_server/stderr.
1399 2008-08-13 Dave Brolley <brolley@redhat.com>
1401 * stap-client: Trap SIGTERM and SIGINT.
1402 (unpack_response): chown of the systemtap temp directory before
1403 we move it and only if we didn't create it.
1404 (maybe_call_staprun): Check $e_script when determining whether a
1405 script was specified. Provide the -c option to staprun. Run staprun
1406 in the background and wait for it.
1407 (terminate,interupt): New functions.
1409 2008-08-13 Frank Ch. Eigler <fche@elastic.org>
1411 * Makefile.am (stamp-elfutils): Override build-elfutils'
1412 bin_PROGRAMS to not bother build binaries we're not using.
1413 * Makefile.in: Regenerated.
1415 2008-08-12 Frank Ch. Eigler <fche@elastic.org>
1417 * buildrun.cxx (compile_pass): Add ugly kbuild hack for hand-built
1418 x86 kernels that are made with O= (separate object/module-building
1421 2008-08-12 David Smith <dsmith@redhat.com>
1424 * tapsets.cxx (utrace_builder::build): Validates pid and allows
1425 probing of "*" to mean all threads.
1426 * stapprobes.5.in: Added note about a process path of "*" means to
1429 2008-08-11 Wenji Huang <wenji.huang@oracle.com>
1431 * tapsets.cxx : Fixed compilation warning on gcc 3.x.
1433 2008-08-11 Frank Ch. Eigler <fche@elastic.org>
1435 * tapsets.cxx (translate_final_fetch_or_store): Reject some
1436 unhandleable types such as floats.
1437 (dwarf_var...visit_target_symbol): Tweak logic of $$var expansion
1438 to quietly skip over any $context variables that cause exceptions.
1440 2008-08-11 Frank Ch. Eigler <fche@elastic.org>
1442 * tapsets.cxx (translate_final_fetch_or_store): Reject some
1443 unhandleable types such as floats.
1444 (dwarf_var...visit_target_symbol): Tweak logic of $$var expansion
1445 to quietly skip over any $context variables that cause exceptions.
1447 2008-08-11 Frank Ch. Eigler <fche@elastic.org>
1449 * tapsets.cxx (dwarf_var_expanding...visit_target_symbol):
1450 Don't add a \n at the end of $$vars/$$parms/$$locals.
1452 2008-08-11 Frank Ch. Eigler <fche@elastic.org>
1455 * tapsets.cxx (cu_name_matches, collect_srcfiles_matching):
1456 Implicitly but optionally prefix probe source filenames with "*/".
1457 * stapprobes.5.in: Document this.
1459 2008-08-11 Dave Brolley <brolley@redhat.com>
1461 * stap-client (disconnect_from_server): Call after receive_response.
1462 * stap-server (stap_rc): Renamed from 'rc'. Don't use it as an exit
1464 * stap-serverd (listen): Set pipefail so that we get the rc of nc
1465 if it fails. Make multiple attempts to establish a server.
1466 (fatal): Call 'terminate'.
1468 2008-08-11 Frank Ch. Eigler <fche@elastic.org>
1471 * tapsets.cxx (cu_name_matches, collect_srcfiles_matching):
1472 Implicitly prefix probe source filenames with "*".
1474 2008-08-11 David Smith <dsmith@redhat.com>
1476 * tapsets.cxx (utrace_builder::build): Fixed indentation.
1478 2008-08-11 Mark Wielaard <mwielaard@redhat.com>
1480 * Makefile.am (install-data-local): Use INSTALL_PROGRAM for executable
1482 * Makefile.in: Regenerated.
1484 2008-08-09 Frank Ch. Eigler <fche@elastic.org>
1486 * Makefile.am (example index): Only warn and instruct on index
1487 regeneration. Do not actually perform it as the source tree
1488 should be considered (and can really be) read-only.
1489 * Makefile.in: Regenerated.
1491 2008-08-08 Dave Brolley <brolley@redhat.com>
1493 * stap-client: Use quotes when echoing. Exit with $rc.
1494 (initialization): Initialize 'rc'.
1495 (parse_options): Manage the command line in three pieces:
1496 pre-script name, script name, post-script name.
1497 (process_*): Likewise.
1498 (send_request): Redirect stdout of 'nc' to /dev/null.
1499 (receive_response): Handle "failed:" response. Redirect stdin of 'nc'
1501 (maybe_call_staprun): Check $rc. Check the requested phase limit
1502 before looking for the module.
1503 * stap-server: Use quotes when echoing. Exit with $rc.
1504 (initialization): Initialize 'rc'.
1505 (receive_request): Start 'nc' in the background before sending the
1506 "ready:" message. Redirect stdin of 'nc' from /dev/zero.
1507 (read_data_file): Allow for multiple lines of data.
1508 (call_stap): Quoet $cmdline. Set 'rc'.
1509 (send_response): Send "failed:" if stap is unsuccessful. Start 'nc'
1510 in the background before sending the response.
1511 (cleanup): Kill any running 'nc' job.
1512 (terminate): Exit with $rc.
1513 * stap-serverd: Start the server before advertising our presence.
1514 * stap-find-or-start-server: Echo 0 if a server is already running.
1515 Echo -1 if no server is running and one can't be started.
1516 * stap-start-server: Wait until the server starts before exiting. Exit
1517 with 1 if the server does not start.
1518 * systemtap.spec: Move client side script to the runtime sub package.
1519 The main package and the runtime sub package both depend on avahi-tools
1521 * Makefile.am: Revert previous changes. Now done in
1522 testsuite/lib/systemtap.exp.
1523 * Makefile.in: Regenerated.
1525 2008-08-08 David Smith <dsmith@redhat.com>
1527 * tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
1528 Calls stap_utrace_detach() to perform detach.
1530 2008-08-08 Mark Wielaard <mwielaard@redhat.com>
1532 * Makefile.am (EXAMPLE_BUILD_DIR): Removed. Examples indexes are
1534 (dist-hook): Always install examples from srcdir.
1535 * Makefile.in: Regenerated.
1537 2008-08-08 Mark Wielaard <mwielaard@redhat.com>
1539 * Makefile.am (rpm): Refer to srcdir spec file so make rpm works in
1541 * Makefile.in: Regenerated.
1543 2008-08-08 Mark Wielaard <mwielaard@redhat.com>
1545 * systemtap.spec: Disable chmodding of samples/kmalloc-top.
1546 It is currently not installed.
1548 2008-08-08 Mark Wielaard <mwielaard@redhat.com>
1550 * Makefile.am (all-local): Depend on example_index, which now
1551 doesn't generate anything in $srcdir anymore, only $builddir.
1552 (EXAMPLE_SOURCE_DIR): New var.
1553 (EXAMPLE_BUILD_DIR): New var.
1554 (EXAMPLE_META_FILES): New var.
1555 (EXAMPLE_INDEX_GEN): New var.
1556 (example_index): New target.
1557 ($EXAMPLE_BUILD_DIR/index.html): Likewise.
1558 (install-data-local): Install examples from $buildir.
1559 * Makefile.in: Regenerated.
1560 * aclocal.m4: Likewise.
1562 2008-08-07 Frank Ch. Eigler <fche@elastic.org>
1564 * Makefile.am (all-local): Don't run indexing code, since $srcdir
1566 (install-data): Simplify sample script installation; limit sources
1567 to systemtap.examples directory only.
1568 * Makefile.in: Regenerated.
1570 2008-08-07 Mark Wielaard <mwielaard@redhat.com>
1572 * Makefile.am (all-local): Add example_index.
1573 (dist-hook): Likewise.
1574 (EXAMPLE_SRC): Add index and support files.
1575 (EXAMPLE_INDEXES): New file list.
1576 (example_index): New target.
1577 (clean-local): Remove generated indexes.
1578 * Makefile.in: Regenerated.
1580 2008-08-07 Mark Wielaard <mwielaard@redhat.com>
1582 * systemtap.spec: Add comment about versioned vs unversioned docs.
1584 2008-08-06 Frank Ch. Eigler <fche@elastic.org>
1586 * stap-find-servers (match_server, client_sysinfo):
1587 Use "sysinfo=...." keyword in mdns TXT record.
1588 * stap-serverd (advertise_presence): Ditto.
1589 (initialization): Locate random usable server port if needed.
1590 (listen): Complain if port turns out to be unusable after all.
1592 2008-08-06 Josh Stone <joshua.i.stone@intel.com>
1595 From Eugeniy Meshcheryakov eugen@debian.org:
1596 * staprun.8.in: fix minor formatting problems
1598 2008-08-05 Stan Cox <scox@redhat.com>
1600 * NEWS: Updated $$vars, $$parms, $$locals.
1601 * tapsets.cxx (visit_target_symbol): Missing break typo.
1603 2008-08-04 Stan Cox <scox@redhat.com>
1605 * tapsets.cxx (dwarf_var_expanding_copy_visitor::visit_target_symbol):
1606 Add support for $$vars, $$parms, and $$locals.
1607 * stapprobes.5.in: Likewise.
1608 * doc/langref.tex: Likewise.
1610 2008-08-02 Frank Ch. Eigler <fche@elastic.org>
1612 * translate.h (translator_output::assert_0_indent): New function.
1613 * translate.cxx (emit_*): Add a couple of calls to confirm
1614 newline(1)/(-1) nest matching.
1616 2008-07-30 Dave Brolley <brolley@redhat.com>
1618 * stap-client (create_request): No need for random suffix for
1619 cmdline and sysinfo files.
1620 * stap-server (read_data_file): File name is exactly as specified.
1621 Check that it exists.
1623 2008-07-29 Dave Brolley <brolley@redhat.com>
1625 * Makefile.am (bin_SCRIPTS): add stap-find-servers, stap-start-server,
1626 stap-find-or-start-server, stap-stop-server.
1627 (EXTRA_DIST): Likewise.
1628 (check): Ensure that a compatible systemtap server is running before
1629 running the tests, if requested. If we start a sterver, stop it after
1631 (installcheck): Likewise.
1632 * stap-client (parse_options): Specify stdin as 'scripts/-' on the
1633 generated command line.
1634 (create_request): Use $script_file instead of '-'.
1635 (unpack_response): Existence of the systemtap temp directory is
1637 (find_and_connect_to_server): Use stap-find-servers and choose_server.
1638 (choose_server): Rewritten from match_server. Examine multiple
1640 (connect_to_server): New function.
1641 (maybe_call_staprun): Check for existence of a module.
1643 (staprun_PATH): New function.
1644 (fatal): Call disconnect_from_server.
1645 (server_fatal): Likewise.
1646 * stap-server: Catch SIGTERM and SIGINT.
1647 (create_response): Check for the existence of $tmpdir_stap.
1648 (terminate): New function.
1649 * stap-serverd: Catch SIGTERM and SIGINT.
1650 (listen): Run 'nc | stap-server' in the background and wait for them
1652 (terminate): Renamed from handle_sigint. Kill avahi-publish-service
1654 * systemtap.spec: Add stap-find-servers, stap-start-server,
1655 stap-find-or-start-server, stap-stop-server.
1656 * Makefile.in: Regenerated.
1658 2008-07-28 Dave Nomura <dcnltc@us.ibm.com>
1660 * session.h (struct systemtap_session): Added itrace_derived_probe
1662 * elaborate.cxx (systemtap_session::systemtap_session): Added
1663 initialization of itrace_derived_probes.
1664 * tapsets.cxx (struct itrace_derived_probe): Add derived_probe
1665 struct for holding info needed by itrace probes.
1666 (struct itrace_derived_probe_group): New derived_probe_group
1667 to handle itrace probes.
1668 (itrace_derived_probe::itrace_derived_probe): Needed for use with
1670 (itrace_derived_probe_group::join_group): Ditto.
1671 (itrace_derived_probe_group::enroll): Ditto.
1672 (itrace_derived_probe_group::emit_probe_decl): Ditto.
1673 (itrace_derived_probe_group::emit_module_decls): Ditto.
1674 (itrace_derived_probe_group::emit_module_init): Ditto.
1675 (itrace_derived_probe_group::emit_module_exit): Ditto.
1676 * stapprobes.5.in : Added documentation of itrace probe.
1678 2008-07-24 Josh Stone <joshua.i.stone@intel.com>
1680 * buildrun.cxx (compile_pass): Remove STAPCONF_MODULE_NSECTIONS,
1681 and add STAPCONF_ONEACHCPU_RETRY
1683 2008-07-23 Frank Ch. Eigler <fche@elastic.org>
1685 From James Bottomley <James.Bottomley@HansenPartnership.com>:
1686 * tapsets.cxx (query_dwarf_func): Silently skip inlined function
1687 instances that have no entrypc.
1689 2008-07-18 Masami Hiramatsu <mhiramat@redhat.com>
1692 * tapsets.cxx (emit_module_decls): Add dummy kprobe on ia64.
1693 (emit_module_init): register dummy kprobes for fixing bsp offset on
1695 (emit_module_exit): unregister dummy kprobes on ia64.
1697 2008-07-18 Frank Ch. Eigler <fche@elastic.org>
1699 BZ 442528, From Masami Hiramatsu <mhiramat@redhat.com>
1700 * elaborate.h (emit_probe_local_init): New derived_probe member.
1701 * tapsets.cxx (dwarf_derived_probe): Implement it, for ia64 register
1704 2008-07-17 Stan Cox <scox@redhat.com>
1706 * tapsets.cxx (iterate_over_srcfile_lines): Avoid statement wildcard
1707 lines without a unique address.
1709 2008-07-17 <anithra@linux.vnet.ibm.com>
1711 * main.cxx (handle_interrupt): Forward received signal to process
1714 2008-07-17 Masami Hiramatsu <mhiramat@redhat.com>
1716 * systemtap.spec (%files): Add stap-server and stap-serverd.
1717 (%files runtime): Add stap-client.
1719 2008-07-17 David Smith <dsmith@redhat.com>
1721 * systemtap.spec: Moved comment that was on the same line as
1722 "Version", which rpmbuild didn't like.
1724 2008-07-17 Frank Ch. Eigler <fche@elastic.org>
1726 * translate.cxx (dump_unwindsyms): Produce symbol tables and section
1727 lists for all text-like sections, useful for -ffunction-sections type
1729 (emit_symbol_data): Tolerate missing unwind/symbol data during
1730 elf processing. Subsequently warn about anything missing.
1732 2008-07-16 Frank Ch. Eigler <fche@elastic.org>
1734 * configure.ac: Bumped version to 0.7.1.
1735 * systemtap.spec: Renamed from systemtap.spec.in; don't autoconf it
1736 just on account of @VERSION@.
1737 * Makefile.am (EXTRA_DIST): Distribute it.
1738 * Makefile.in, configure, testsuite/configure: Regenerated.
1740 2008-07-16 Dave Brolley <brolley@redhat.com>
1742 * Makefile.am (EXTRA_DIST): Add stap-client, stap-server, stap-serverd.
1743 * Makefile.in: Regenerated.
1745 2008-07-14 David Smith <dsmith@redhat.com>
1748 (utrace_var_expanding_copy_visitor::visit_target_symbol):
1749 Synthesize a function to get the value of $syscall.
1751 2008-07-14 Dave Brolley <brolley@redhat.com>
1753 * Makefile.am (bin_SCRIPTS): Add stap-client, stap-server, stap-serverd.
1754 * Makefile.in: Regenerated.
1755 * aclocal.m4: Regenerated.
1757 2008-07-12 Frank Ch. Eigler <fche@elastic.org>
1760 * buildrun.cxx (compile_pass): Add autoconf-uaccess.c.
1761 * translate.cxx (translate_pass): #include <linux/vermagic.h> for
1762 maximum version compatibility for UTS_RELEASE.
1764 2008-07-12 Frank Ch. Eigler <fche@elastic.org>
1766 By Andy Fitzsimon <afitzsim@redhat.com>:
1767 * smileytap.svg: New file.
1769 2008-07-11 Frank Ch. Eigler <fche@elastic.org>
1772 * tapsets.cxx (global_alias_cache): Make this a per-module/cu cache,
1773 just like the function cache.
1774 (update_alias_cache): Removed. Instead ...
1775 (declaration_resolve): Compute the lookup table for this module/cu,
1778 2008-07-11 Frank Ch. Eigler <fche@elastic.org>
1780 * translate.cxx (dump_unwindsyms): Start tolerating user-space programs,
1781 which may be unrelocatable.
1783 2008-07-11 Frank Ch. Eigler <fche@elastic.org>
1785 * hash.cxx (find_hash): Mix in -d MODULE names.
1787 2008-07-10 Frank Ch. Eigler <fche@elastic.org>
1789 * main.cxx (main): If "-k" (save temp directory) was supplied,
1792 2008-07-10 Frank Ch. Eigler <fche@elastic.org>
1795 * tapsets.cxx (mark_dwarf_redundancies): Tweak hashtable/iterator
1796 syntax for gcc 4.1 compatibility.
1798 2008-07-10 Frank Ch. Eigler <fche@elastic.org>
1801 * main.cxx (main,usage): Support new "-d MODULE" option to
1802 populate comp-unwindsyms module list.
1803 * stap.1.in: Document it.
1804 * tapsets.cxx (dwarf_query::add_probe_point): Add probed module
1805 to comp-unwindsyms set.
1806 (utrace_builder::build): Ditto for probed user-space program.
1807 * translate.cxx (emit_symbol_data): Emit _stp_module[] entry
1808 for each comp-unwindsyms member, including relocation bases
1809 and symbols, but not yet unwind data.
1810 * NEWS: Remove mention of temporarily disabled unwinder.
1811 * session.h: Corresponding changes.
1813 2008-07-09 Mark Wielaard <mwielaard@redhat.com>
1816 * buildrun.cxx (compile_pass): Define STAPCONF_REAL_PARENT by
1817 calling autoconf-real-parent.c
1819 2008-07-09 Frank Ch. Eigler <fche@elastic.org>
1821 From James Bottomley <James.Bottomley@HansenPartnership.com>
1822 * tapsets.cxx: (dwflpp::global_alias_cache): New member.
1823 (declaration_resolve): Search it, called from translate_components.
1824 (update_alias_cache): Populate it, called from query_cu.
1826 2008-07-09 <wenji.huang@oracle.com>
1828 * translate.cxx (visit_comparison): Remove unnecessary comparison.
1829 * translate.cxx (emit_symbol_data): Remove unused local variable.
1831 2008-07-08 Dave Brolley <brolley@redhat.com>
1833 * stap-client (client_sysinfo): Use `uname -rvm`.
1834 (receive_response): Wait for "done:" from the server. Clear server_ip
1835 when the server is incompatible.
1836 * stap-server (check_request): Quote "`server_sysinfo`".
1837 (server_sysinfo): Use `uname -rvm`.
1838 (send_response): Send "done:".
1839 * stap-serverd (advertise_presence): Use `uname -rvm`. Quote "$txt".
1841 2008-07-07 Mark Wielaard <mwielaard@redhat.com>
1843 * stapex.5.in: Add section on installed examples, samples and demos
1844 and how they are documented.
1846 2008-07-07 Mark Wielaard <mwielaard@redhat.com>
1848 * Makefile.am (install-data-hook): Install examples, demos and
1850 (uninstall-local): Remove examples, demos and samples.
1851 * Makefile.in: Regenerated.
1852 * aclocal.m4: Likewise.
1853 * systemtap.spec.in (%install): Move examples.
1854 Don't copy over examples to src.
1855 (testsuite): Don't include src/examples.
1857 2008-07-07 Mark Wielaard <mwielaard@redhat.com>
1859 * systemtap.spec.in (%install): Move installed pdf files.
1860 (%files): Mark moved installed pdf as %doc files.
1862 2008-07-03 Frank Ch. Eigler <fche@elastic.org>
1864 * translate.cxx (translate_pass): Don't #include <linux/compile.h>.
1866 2008-07-03 Dave Brolley <brolley@redhat.com>
1868 * stap-serverd: New script.
1869 * stap-client (client_sysinfo): Client sysinfo is stripped down to
1870 the output of `uname -r` for now.
1871 (package_request): Don't create temporary server tar file here.
1872 (send_request): Communication protocol simplified. Use nc to send
1874 (receive_response): Communication protocol eliminated. Simply wait
1875 for the file from the server using nc.
1876 (unpack_response): Create temporary server tar file here. Verify the
1877 contents of the server's response.
1878 (find_and_connect_to_server): Obtain server address and port from
1880 (server_fatal): New function.
1881 (check_server_error): Call server_fatal.
1882 * stap-server (configuration): port is now provided as an argument.
1883 Default to port 65001.
1884 (initialization): Don't create temp work directory here.
1885 (receive_request): Communication protocol simplified. Receive the
1886 request file using nc.
1887 (unpack_request): Make temp work directory here. Verify the contents
1889 (server_sysinfo): New function.
1890 (check_compatibility): Exact match required.
1891 (package_response): Don't use -p on tar command.
1892 (send_response): Communication protocol eliminated. Simply send the
1894 (main line): Pass "$@" to configuration.
1896 2008-07-01 Frank Ch. Eigler <fche@elastic.org>
1898 * main.cxx (main): In -vv mode, also dump out session arch/release
1899 values right at the top.
1901 2008-06-29 Tim Moore <timoore@redhat.com>
1903 * Makefile.am (EXTRA_DIST): Add auto_free.h.
1904 * Makefile.in: Regenerated.
1905 * auto_free.h (auto_free_ref): New class to free references to
1906 pointers allocated with malloc / realloc.
1907 * tapsets.cxx (iterate_over_srcfile_lines): Use auto_free_ref at
1908 top level of function to free srcsp.
1910 2008-06-27 David Smith <dsmith@redhat.com>
1912 * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): Fix
1913 bug in handling process(PID) probes.
1915 2008-06-24 K.Prasad <prasad@linux.vnet.ibm.com>
1917 * tapset/vfs.stp: Deprecate probe points on old functions, namely
1918 generic_file_readv(), generic_file_writev(),
1919 generic_file_read() and generic_file_write().
1920 * tapset/vfs.stp: Enhance the tapset by
1921 providing more pure C functions, probes for newer VFS related functions
1922 * testsuite/buildok/vfs_testcase.stp: Created a testsuite for the
1923 new enhanced VFS Tapset which does a compile test i.e. with flags -up4
1925 2008-06-25 Stan Cox <scox@redhat.com>
1927 * tapsets.cxx (iterate_over_srcfile_lines): Only probe a line once.
1929 2008-06-24 Tim Moore <timoore@redhat.com>
1931 * auto_free.h: New file.
1932 * tapsets.cxx (iterate_over_srcfile_lines, read_symbols): Use
1933 auto_free instead of explicit calls to ::free().
1934 (Compare): Class for comparing func_info objects and their
1936 (get_index_for_address): Remove.
1937 (symbol_table::sort): new function.
1938 (query_module_symtab): Iterate over list_by_addr using iterator
1940 (~symbol_table): Don't bother clearing list_by_addr and
1942 (add_symbol): Don't keep list_by_addr in order.
1943 (read_symbols, get_from_elf): Sort symbols after all are read.
1944 (get_func_containing_address): Use std::upper_bound.
1945 (purge_syscall_stubs): Don't iterate over whole list_by_addr
1946 vector; use std::equal_range to look for possible stub addresses.
1948 2008-06-23 Frank Ch. Eigler <fche@elastic.org>
1950 * session.h (module_cache): Add field here.
1951 * tapsets.cxx (dwflpp): Remove static field from here.
1952 (pathname_caching_callback): Use hacky micro-static to get to it.
1953 (*): Update other users of module_cache.
1954 * elaborate.cxx (systemtap_session ctor): Corresponding changes.
1956 2008-06-23 David Smith <dsmith@redhat.com>
1958 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
1959 Handles UDPF_NONE value.
1960 (utrace_derived_probe_group::emit_vm_callback_probe_decl): New
1962 (utrace_derived_probe_group::emit_module_decls): Calls
1963 emit_vm_callback_probe_decl() to set up vm_callbacks.
1965 2008-06-23 Stan Cox <scox@redhat.com>
1967 * NEWS: Updated .statement line number wildcard and line number range.
1968 * stapprobes.5.in: Likewise.
1969 * doc/langref.tex: Likewise.
1970 * tapsets.cxx (enum line_t): Add RANGE and WILDCARD.
1971 (iterate_over_srcfile_lines): Change lineno parm to lines[].
1972 Support RANGE and WILDCARD.
1973 (dwarf_query): Change line to line[]
1974 (dwarf_query::parse_function_spec): Parse RANGE and WILDCARD.
1976 2008-06-20 wcohen <wcohen@redhat.com>
1978 * stapfuncs.5.in: Add documentation for tapset/dev.stp functions.
1980 2008-06-18 Josh Stone <joshua.i.stone@intel.com>
1983 * elaborate.cxx (dead_stmtexpr_remover::visit_block): Flatten nested
1984 block statements into a single block.
1985 (dead_stmtexpr_remover::visit_if_statement): Remove the possibility
1986 of if_statements with a null thenblock. When an if lacks both then
1987 and else, either remove it completely or reduce it to a simple
1988 statment evaluating the condition. With an else and no then, invert
1989 the condition and else becomes then.
1990 (void_statement_reducer): New optimization visitor that breaks
1991 statements in void context into smaller pieces, to expose more
1992 optimization opportunities.
1993 (semantic_pass_opt5, semantic_pass_opt6): Bump opt5 to opt6, and
1994 create a new opt5 that runs through void_statement_reducer.
1996 2008-06-16 Frank Ch. Eigler <fche@elastic.org>
1998 * tapsets.cxx (print_locals): Produce nothing instead of
1999 "(alternatives: (none found))" if no alternatives were found.
2001 2008-06-16 Frank Ch. Eigler <fche@elastic.org>
2003 * elaborate.cxx (session::print_warning): Change to take optional
2005 (*): Adjust callers of print_warning() to pass a token.
2006 (print_token): New function, eliminate recent file name duplication.
2007 (print_error): Use it too.
2008 (semantic_pass_opt2): Tweak way read-only vars' alternatives are
2009 printed. Eliminate relaxation-loop duplicates by printing warnings
2010 only on first iteration. Print alternatives for globals too.
2011 * session.h: Corresponding changes.
2013 2008-06-16 Stan Cox <scox@redhat.com>
2015 * elaborate.cxx (semantic_pass_opt2): Only create function
2016 alternatives if needed. Overload compare.
2018 2008-06-13 Stan Cox <scox@redhat.com>
2020 * elaborate.cxx (print_warning): Add optional_str parameter.
2021 (semantic_pass_opt2): List variable alternatives for probes and
2023 * session.h (print_warning): Add optional_str parameter.
2025 2008-06-13 Josh Stone <joshua.i.stone@intel.com>
2027 * translate.cxx: Jump out directly after setting last_error, rather
2028 than passively checking last_error everywhere.
2029 * translate.cxx: Only make actionremaining checks at control points,
2030 i.e. roughly at the end of basic blocks, or after executing a few
2031 statements in a row.
2033 2008-06-13 Frank Ch. Eigler <fche@elastic.org>
2035 * main.cxx (main): Print generated module name for "-m FOO"
2036 runs also. Stop warning about this implying uncached operation.
2038 2008-06-12 Stan Cox <scox@redhat.com>
2040 * elaborate.cxx (print_warning): Make parameter a const.
2042 2008-06-11 Frank Ch. Eigler <fche@elastic.org>
2044 * Makefile.am (EXTRA_DIST): Add dwarf_wrappers.h.
2046 2008-06-11 Mark Wielaard <mwielaard@redhat.com>
2048 * elaborate.cxx (print_warning): Only output WARNING, don't put it
2049 in the message_str and seen_warnings.
2050 * session.h (print_warning): Reindent.
2052 2008-06-11 Frank Ch. Eigler <fche@elastic.org>
2054 * elaborate.cxx (print_warning): Use session.seen_warnings[].
2056 2008-06-10 Stan Cox <scox@redhat.com>
2058 * elaborate.cxx (print_warning): New.
2059 * elaborate.cxx (semantic_pass_opt1): Use it.
2061 2008-06-11 Tim Moore <timoore@redhat.com>
2063 * dwarf_wrappers.h (dwfl_assert): Add overload with boolean value
2065 * dwarf_wrappers.cxx (dwfl_assert): Write boolean condition
2067 * tapsets.cxx (emit_address): Fix up dwfl_asserts that got negated
2068 in changes to dwfl_assert.
2071 * dwarf_wrappers.h, dwarf_wrappers.cxx: New files.
2072 * Makefile.in: Regenerated.
2073 * tapsets.cxx (dwarf_assert, dwfl_assert): Move to
2075 (iterate_over_srcfile_lines, has_single_line_record,
2076 query_srcfile_line): Use dwarf_line_t wrapper.
2077 (die_has_pc): Take a reference to a Dwarf_Die instead of a
2078 pointer. Clean up use of dwfl_assert.
2079 (query_cu): Check that statement raw address matches the beginning
2080 of a statement record.
2081 * elaborate.h: Include iosfwd instead of iostream.
2082 (literal_map_t, resolve_prologue_endings,): New typedef.
2085 2008-06-10 Jim Keniston <jkenisto@us.ibm.com>
2087 * testsuite/systemtap.context/num_args.tcl: Run twice --
2088 once with dwarf (default) and once with --kelf --ignore-dwarf.
2089 * testsuite/systemtap.context/context.exp: Add num_args to
2092 2008-06-10 David Smith <dsmith@redhat.com>
2094 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
2095 Initializes .vm_callback.
2097 2008-06-10 Frank Ch. Eigler <fche@elastic.org>
2100 * NEWS: Note argv[] tapset.
2101 * parse.cxx (scan_pp): Better handle premature EOF.
2102 * stapvars.5.in: New file.
2103 * stap.1.in: Mention it.
2104 * Makefile.am (dist_man_MANS): Add stapvars.5.
2105 * configure.ac (AC_CONFIG_FILES): Add stapvars.5.in.
2106 * Makefile.in, configure: Regenerated.
2108 2008-06-10 Frank Ch. Eigler <fche@elastic.org>
2111 * parse.cxx (scan_pp): Eliminate expand_args argument to control
2112 nested preprocess evaluation. Rewrite to use a combination of
2113 exceptions and non-recursion.
2114 (lexer::scan): Ditto. Interpret "$#" as the argc value in all
2116 * parse.h: Corresponding decl changes.
2118 2008-06-10 Frank Ch. Eigler <fche@elastic.org>
2121 * parse.cxx (eval_comparison): New template function.
2122 (eval_pp_conditional): Call it separately for string/string and
2124 (lexer::scan): Provide better error message for invalid $NNN.
2126 2008-06-09 Jim Keniston <jkenisto@us.ibm.com>
2129 * tapsets.cxx: For powerpc, reject symbols in .opd
2130 (function descriptor) section.
2132 2008-06-09 Stan Cox <scox@redhat.com>
2134 * NEWS: Updated kernel.statement relative line number.
2135 * stapprobes.5.in: Likewise.
2137 2008-06-09 David Smith <dsmith@redhat.com>
2140 (utrace_var_expanding_copy_visitor::visit_target_symbol): Calls
2141 'syscall_nr' to get the value of '$syscall'.
2143 * tapsets.cxx (utrace_derived_probe::join_group): Removed
2144 generated inclusion of tracehook.h.
2145 (utrace_var_expanding_copy_visitor::visit_target_symbol): Uses
2146 '_stp_arg(0)' to get value of '$syscall'.
2148 2008-06-06 Stan Cox <scox@redhat.com>
2150 * tapsets.cxx (dwflpp::iterate_over_srcfile_lines):
2151 Add parameter line_type_relative.
2153 (dwarf_query::line_type): New.
2154 (dwarf_query::parse_function_spec): Set line_type.
2156 2008-06-06 David Smith <dsmith@redhat.com>
2158 * NEWS: Updated utrace probes descriptions.
2159 * stapprobes.5.in: Ditto.
2161 * tapsets.cxx (enum utrace_derived_probe_flags): Redefined in
2162 terms of probe types instead of utrace events.
2163 (utrace_var_expanding_copy_visitor::visit_target_symbol): Uses new
2164 utrace_derived_probes_flags values.
2165 (utrace_builder::build): Handles new probe types and new
2166 utrace_derived_probes_flags values.
2167 (utrace_derived_probe_group::emit_probe_decl): Updated to handle
2168 new utrace_derived_probe_flags values.
2169 (utrace_derived_probe_group::emit_module_decls): Ditto. Also
2170 correctly handles 'begin' events correctly by installing a quiesce
2171 handler (instead of running the probe directly).
2172 (register_standard_tapsets): Registers updated utrace probe
2175 2008-06-05 Srinivasa DS <srinivasa@in.ibm.com>
2176 *configure,configure.ac: -fpie option puts limit on GOT size
2177 and hence systemtap build fails on s390. So use -fPIE which
2178 doesn't put limit on GOT size.
2180 2008-06-04 Jim Keniston <jkenisto@us.ibm.com>
2182 * testsuite/systemtap.context/num_args.{stp,tcl}: Added.
2183 Same as args.{stp,tcl}, but refs args using *_arg().
2185 2008-06-04 Jim Keniston <jkenisto@us.ibm.com>
2188 * tapset/syscalls.stp: Remove return aliases for exit and exit_group.
2189 * testsuite/semok/syscalls_return.stp: Regression test
2191 2008-06-03 David Smith <dsmith@redhat.com>
2193 * tapsets.cxx: Added several string tokens that are used instead
2194 of hard-coded strings.
2195 (register_standard_tapsets): Uses new string tokens.
2197 2008-06-03 Frank Ch. Eigler <fche@elastic.org>
2200 * Makefile.am: Don't link stapio with -ldw.
2201 * Makefile.in: Regenerated.
2203 2008-05-29 Mark Wielaard <mwielaard@redhat.com>
2205 * Makefile.am (installcheck): Check that make install was run.
2206 * Makefile.in: Regenerated.
2208 2008-06-02 Frank Ch. Eigler <fche@elastic.org>
2211 * translate.cxx (c_unparser::emit_module_init): Use UTS_RELEASE
2212 instead of uts_sem/utsname() as kernel version-checking hack.
2214 2008-06-02 Dave Brolley <brolley@redhat.com>
2216 * stap-client (initialization): port is no longer hard coded.
2217 Initialize avahi_service_tag to _stap._tcp.
2218 (find_and_connect_to_server): Handle server/port returned by
2220 (match_server): Obtain server ip address and port from output
2221 of the -r option to avahi-browse. Echo a server/port pair.
2223 2008-06-02 Zhaolei <zhaolei@cn.fujitsu.com>
2225 * main.cxx (main): Fix the problem that kernel module compile
2226 failure when runtime directory is set to relative path(stap -R).
2228 2008-05-30 Dave Brolley <brolley@redhat.com>
2230 * stap-client, stap-server: New compile server and client scripts.
2232 2008-05-30 Srinivasa DS <srinivasa@in.ibm.com>
2234 * tapsets.cxx, translate.cxx: modified one argument for
2235 dwfl_linux_kernel_report_offline().
2236 * testsuite/systemtap.base/debugpath.exp: Modified testsuite for new
2237 SYSTEMTAP_DEBUGINFO_PATH behaviour.
2238 * stap.1.in: Modified manpage for new SYSTEMTAP_DEBUGINFO_PATH behaviour.
2240 2008-05-29 Jim Keniston <jkenisto@us.ibm.com>
2243 * tapset/context.stp: Added registers_valid().
2244 * stapfuncs.5.in: Ditto.
2245 * tapset/x86_64/registers.stp: Added registers_valid() check.
2246 * tapset/ppc64/registers.stp: Ditto.
2247 * tapset/i686/registers.stp: Ditto. Also fixed warnings due to
2248 sp_offset and ss_offset not being global.
2250 2008-05-29 Ananth N Mavinakayanahalli <ananth@in.ibm.com>
2253 * tapset/ppc64/registers.stp: Fix powerpc dwarfless argument access
2255 2008-05-28 Josh Stone <joshua.i.stone@intel.com>
2258 * translate.cxx (c_unparser::visit_return_statement): Make sure we
2259 notice errors from evaluating return values.
2261 2008-05-28 David Smith <dsmith@redhat.com>
2263 * tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
2264 Removed debug print.
2266 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
2267 Instead of adding clone handlers, just call the probes directly.
2268 (utrace_derived_probe_group::emit_module_decls): For syscall
2269 probes, on exec detach the parent's utrace engine from the child.
2271 2008-05-27 Josh Stone <joshua.i.stone@intel.com>
2274 * buildrun.cxx (compile_pass): Add the autoconf test for probe_kernel_*
2275 functions, but leave it #if-0'ed for now.
2277 2008-05-23 Jim Keniston <jkenisto@us.ibm.com>
2279 PR 4311, cont. Address powerpc dwarfless test failures.
2280 * tapsets.cxx: Convert .funcname to funcname when adding it
2281 to our symbol table. Accept all weak symbols except those
2282 that map to sys_ni_syscall.
2284 2008-05-23 Srinivasa DS <srinivasa@in.ibm.com>
2285 PR 6429: Inerim fix to avoid compilation error of systemtap module
2286 * runtime/transport/symbols.c: added definitions of struct
2287 module_sect_attr, struct module_sect_attrs for 2.6.25 above kernels.
2289 2008-05-22 Wenji Huang <wenji.huang@oracle.com>
2291 * tapsets.cxx (iterate_over_functions): Fix .statement(NUM) regression.
2293 2008-05-22 Ananth N Mavinakayanahalli <ananth@in.ibm.com>
2295 * tapset/ppc64/registers.stp: Support powerpc register + arg lookup
2296 * stapfuncs.5.in: Add powerpc bits; indicate scope of uarg_* access
2298 2008-05-21 David Smith <dsmith@redhat.com>
2300 * tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
2301 Added new 'event_flag' parameter to task_finder callback. Only
2302 calls probe handlers if we received the correct event.
2304 2008-05-20 Frank Ch. Eigler <fche@elastic.org>
2307 * elaborate.cxx (semantic_pass_opt2): Warn about read-only locals and
2309 (visit_foreach_loop): Belatedly recognize index symbols as lvalues.
2311 2008-05-21 Stan Cox <scox@redhat.com>
2313 * elaborate.cxx (dead_assignment_remover::visit_binary_expression): New.
2314 (dead_assignment_remover::visit_assignment): Allow rhs simplification.
2316 2008-05-20 Tim Moore <timoore@redhat.com>
2318 * configure.ac: Check for tr1/unordered_map header.
2319 * tapsets.cxx: Use tr1::unordered_map if available.
2320 * configure, config.in: Regenerated.
2322 2008-05-19 Stan Cox <scox@redhat.com>
2324 * elaborate.cxx (dead_assignment_remover::visit_arrayindex): New method.
2325 (dead_assignment_remover::visit_functioncall): New method.
2326 (dead_assignment_remover::visit_if_statement): New method.
2327 (dead_assignment_remover::visit_for_loop): New method.
2329 2008-05-19 William Cohen <wcohen@redhat.com>
2331 * main.cxx (setup_signals): Remove sa_restorer initialization.
2333 2008-05-17 Frank Ch. Eigler <fche@elastic.org>
2335 * elaborate.cxx (semantic_pass): Error on #probes=0, but not in
2337 (semantic_pass_optimize[12]): Remove inappropriate check from here.
2339 2008-05-17 Frank Ch. Eigler <fche@elastic.org>
2341 * tapsets.cxx (cu_function_cache_t): Switch to <ext/hash_map>s,
2342 since these tables tend to get pretty big.
2344 2008-05-16 Frank Ch. Eigler <fche@elastic.org>
2347 * tapsets.cxx (cu_function_cache_t): Reorganize into
2348 mod:cu->function->DIE lookup table. Consider merging into symtab
2350 (mark_dwarf_redudancies): Adapt.
2351 (iterate_over_functions): Rewrite.
2352 (dwarf_builder::build): Cache kprobes etc. symbol addresses.
2353 * elaborate.cxx (systemtap_session ctor): Clear additional POD fields.
2355 2008-05-15 David Smith <dsmith@redhat.com>
2357 * main.cxx (setup_signals): New function.
2358 (main): Calls setup_signals() to setup signal handling. When
2359 removing the temporary directory, ignore signals.
2361 2008-05-13 Ananth N Mavinakayanahalli <ananth@in.ibm.com>
2363 * parse.cxx (parser::parse_global): accept ";" terminated globals
2364 * NEWS - update documentation
2365 * testsuite/systemtap.base/global_vars.(stp/exp) - supporting tests
2366 * testsuite/parseko/twenty(four/five).stp - supporting tests
2368 2008-05-12 Jim Keniston <jkenisto@us.ibm.com>
2370 PR 4311 - Function boundary tracing without debuginfo: Phase II
2371 Merged dwarfless branch into mainline. But first...
2372 * runtime/regs.c: Removed register name:value lookup facility.
2373 Moved basically all register-lookup code to the i686 and x86_64
2374 registers.stp tapsets. Args stuff shared between i386 and
2375 x86_64 remains in regs.c.
2376 * tapset/{i686,x86_64}/registers.stp: Moved register-lookup
2377 code from runtime/regs.c to here.
2379 2008-05-12 Jim Keniston <jkenisto@us.ibm.com>
2381 (2008-05-06 in dwarfless branch)
2382 PR 4311 - Function boundary tracing without debuginfo: Phase II
2383 * stapfuncs.5.in: Added sections on CPU REGISTERS and
2384 NUMBERED FUNCTION ARGUMENTS.
2386 2008-05-12 Jim Keniston <jkenisto@us.ibm.com>
2388 (2008-05-05 in dwarfless branch)
2389 PR 4311 - Function boundary tracing without debuginfo: Phase II
2390 * runtime/regs.c: Added register name:value lookup facility.
2391 Added support for register and arg lookup for i386 and x86_64.
2392 * tapset/{i686,x86_64}/registers.stp: New: support for register
2394 * tapsets.cxx, translate.cxx: Added regparm field to struct
2396 * tapset/nd_syscall.stp: syscall.stp migrating toward numbered
2397 args rather than named args.
2399 2008-05-12 Jim Keniston <jkenisto@us.ibm.com>
2401 (2008-04-18 in dwarfless branch)
2402 PR 4311 - Function boundary tracing without debuginfo: Phase I
2403 * tapsets.cxx: Major rework of dwflpp, dwarf_query, and related
2404 code to make do with elf info if dwarf info is absent, or
2405 (in the case of vmlinux) make do with a System.map-style
2406 symbol table if even the elf file is absent.
2407 * main.cxx: Use getopt_long instead of getopt. Added --kelf,
2408 --kmap, --ignore-vmlinux, and --ignore-dwarf.
2409 * hash.cxx, session.h, stap.1.in: Added --kelf, --kmap,
2410 --ignore-vmlinux, and --ignore-dwarf.
2411 * testsuite/{semok,semko}/nodwf*.stp
2413 2008-05-07 Frank Ch. Eigler <fche@elastic.org>
2416 * main.cxx (main): let -l imply -w.
2418 2008-05-05 Frank Ch. Eigler <fche@elastic.org>
2420 PR 444886. From <crquan@gmail.com>:
2421 * tapsets.cxx, translate.cxx: Add .../build/... to default debuginfo
2422 path, to ease search for hand-built kernels.
2424 2008-05-01 Frank Ch. Eigler <fche@elastic.org>
2427 * configure.ac (--enable-pie): Add default option.
2428 * Makefile.am (stap* binaries): Use -fpie/-z relro/-z now as
2430 * configure, aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated.
2432 2008-04-30 Masami Hiramatsu <mhiramat@redhat.com>
2435 * main.cxx (main): Increase the limitation of buffer size to 4095MB.
2436 * staprun.8.in: Ditto.
2438 2008-04-29 Frank Ch. Eigler <fche@elastic.org>
2442 (dead_stmtexpr_remover): Expand scope to kill far more
2443 side-effect-free statemnets, including if/for/foreach.
2444 (semantic_pass_opt4): Warn on elided function/probe bodies.
2445 (typeresolution_info::visit_target_symbol): Dump parse tree of
2446 resolution-challenged functions/probes.
2447 (*): Adapt to probe->body being a statement*
2448 rather than a block*.
2449 * tapsets.cxx (*): Ditto.
2450 * staptree.cxx (block::block ctor): New cons constructor.
2451 * staptree.h: Corresponding changes.
2453 2008-04-29 David Smith <dsmith@redhat.com>
2455 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Added
2456 death event handlers to ensure that for every utrace_attach there
2457 is a corresponding utrace_detach.
2458 (utrace_derived_probe_group::emit_module_decls): Ditto.
2460 2008-04-28 Frank Ch. Eigler <fche@elastic.org>
2462 * translate.cxx (translate_pass): Don't #define TEST_MODE.
2464 2008-04-26 Frank Ch. Eigler <fche@elastic.org>
2466 * tapsets.cxx (common_probe_entryfn_prologue): Undo
2467 clear of overload-related context vars; add explanation why.
2469 2008-04-25 Frank Ch. Eigler <fche@elastic.org>
2471 * systemtap.spec.in: Simplify configuration defaults.
2473 2008-04-25 David Smith <dsmith@redhat.com>
2476 * tapsets.cxx (mark_builder::build): Handles markers with no
2479 2008-04-24 Frank Ch. Eigler <fche@elastic.org>
2482 * main.cxx (printscript): Avoid string truncation heuristics, and
2483 also avoid plain probe::printsig. Hold nose and dig down into
2484 raw location lists instead.
2486 2008-04-24 Will Cohen <wcohen@redhat.com>
2488 * aclocal.m4: Regenerated.
2489 * Makefile.am (example/*): Moved to testsuite/systemtap.examples.
2490 * Makefile.in: Regenerated.
2492 2008-04-23 Frank Ch. Eigler <fche@elastic.org>
2494 From: Srinivasa DS <srinivasa@in.ibm.com>
2495 * tapsets.cxx (blacklisted_p): Blacklist more init/exit sections.
2497 2008-04-23 Frank Ch. Eigler <fche@elastic.org>
2499 * tapsets.cxx (common_probe_entryfn_prologue): Clear
2500 overload-related context vars.
2502 2008-04-22 hunt <hunt@redhat.com>
2504 * staprun.8.in: Add documentation for -d option.
2506 2008-04-22 David Smith <dsmith@redhat.com>
2508 * tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
2509 Removed debug statements.
2511 2008-04-18 David Smith <dsmith@redhat.com>
2513 * tapsets.cxx (struct utrace_builder): Added exec probes.
2514 (utrace_derived_probe_group::emit_probe_decl): Ditto.
2515 (utrace_derived_probe_group::emit_module_decls): Ditto.
2516 (register_standard_tapsets): Ditto.
2517 * stapprobes.5.in: Added information about exec probes.
2518 * NEWS: Added information about utrace probes.
2520 * stapprobes.5.in: Added information about utrace probes.
2522 2008-04-17 Josh Stone <joshua.i.stone@intel.com>
2524 * tapsets.cxx (build_blacklist): Fix regexps for atomics.
2525 * vim/syntax/stap.vim: Recognize the 'limit' keyword and script arguments,
2526 allow '$' in variable names, and highlight $target variables.
2528 2008-04-17 David Smith <dsmith@redhat.com>
2530 * tapsets.cxx (utrace_builder::build): Make sure that the PATH of
2531 'process("PATH")' probes is an absolute path.
2532 (utrace_derived_probe_group::emit_module_decls): Made calls to
2533 utrace probe handler functions conditional on which types of
2534 utrace probes are going to be output.
2536 2008-04-16 Frank Ch. Eigler <fche@elastic.org>
2538 * tapsets.cxx (task_finder_derived_probe): Add dummy constructor
2539 for old (RHEL4) gcc compatibility.
2541 2008-04-16 Frank Ch. Eigler <fche@elastic.org>
2543 PR 6417: From Srinivasa DS <srinivasa@in.ibm.com>:
2544 * tapsets.cxx (build_blacklist): Extend.
2546 2008-04-15 David Smith <dsmith@redhat.com>
2548 * session.h (struct systemtap_session): Added utrace_derived_probe
2549 group and task_finder_derived_probe_group members.
2550 * elaborate.cxx (systemtap_session::systemtap_session): Added
2551 initialization of utrace_derived_probes and
2552 task_finder_derived_probes.
2553 * tapsets.cxx (struct task_finder_derived_probe_group): New
2554 derived_probe_group to handle task_finder framework.
2555 (struct utrace_derived_probe_group): New derived_probe_group to
2556 handle utrace probes.
2558 2008-04-15 Frank Ch. Eigler <fche@elastic.org>
2561 * Makefile.am (AM_CFLAGS): Remove -Wshadow, as it triggers for
2562 new stapio (modname global vs. dwfl headers).
2564 2008-04-15 Frank Ch. Eigler <fche@elastic.org>
2567 * buildrun.cxx (compile_pass): Add STAPCONF_MODULE_NSECTIONS.
2569 2008-04-14 David Smith <dsmith@redhat.com>
2571 * elaborate.h (struct derived_probe_group): Removed
2572 emit_module_header virtual function.
2573 * translate.cxx (c_unparser::emit_common_header): Removed calls to
2574 emit_module_header function.
2575 * tapsets.cxx (be_derived_probe>): Removed emit_module_header function.
2576 (struct timer_derived_probe_group): Ditto.
2577 (struct profile_derived_probe_group): Ditto.
2578 (struct procfs_derived_probe_group): Ditto.
2579 (struct hrtimer_derived_probe_group): Ditto.
2580 (struct perfmon_derived_probe_group): Ditto.
2581 (dwarf_derived_probe_group::emit_module_decls): Moved kernel check
2582 back from deleted emit_module_header function.
2583 (uprobe_derived_probe_group::emit_module_decls): Ditto.
2584 (mark_derived_probe_group::join_group): Moved marker
2585 kernel check (to a new embedded code section) from deleted
2586 emit_module_header function.
2588 2008-04-14 Frank Ch. Eigler <fche@elastic.org>
2590 * Makefile.am (stapio_*): Become able to link/compile against
2592 * Makefile.in: Regenerated.
2594 2008-04-09 Martin Hunt <hunt@dragon>
2596 * buildrun.cxx (run_pass): Remove unused "-d" option
2599 * translate.cxx (emit_symbol_data): When available,
2600 grab symbols from debuginfo instead of /proc/kallsyms.
2602 2008-04-11 David Smith <dsmith@redhat.com>
2604 * elaborate.h (struct derived_probe_group): Added
2605 emit_module_header virtual function.
2606 * translate.cxx (c_unparser::emit_common_header): Calls each probe
2607 group's emit_module_header function.
2608 (translate_pass): Moved inclusion of linux/marker.h to
2609 mark_derived_probe_group::emit_module_header().
2610 * tapsets.cxx (struct be_derived_probe_group): Added empty
2611 emit_module_header function.
2612 (struct timer_derived_probe_group): Ditto.
2613 (struct profile_derived_probe_group): Ditto.
2614 (struct procfs_derived_probe_group): Ditto.
2615 (struct hrtimer_derived_probe_group): Ditto.
2616 (struct perfmon_derived_probe_group): Ditto.
2617 (dwarf_derived_probe_group::emit_module_header): Moved kprobes
2618 kernel check from emit_module_decls() to here.
2619 (uprobe_derived_probe_group::emit_module_header): Moved uprobe
2620 kernel check from emit_module_decls() to here.
2621 (uprobe_derived_probe_group::emit_module_decls): Moved uprobe
2622 kernel check to emit_module_header().
2623 (mark_derived_probe_group::emit_module_header): Moved marker
2624 kernel check from emit_module_decls and translate_pass() to here.
2625 (uprobe_derived_probe_group::emit_module_decls): Moved marker
2626 kernel check to emit_module_header().
2628 2008-04-10 Frank Ch. Eigler <fche@elastic.org>
2631 * session.h (listing_mode): New field.
2632 * main.cxx (main): Test it. Enjoy it.
2633 (printscript): Do it.
2634 (usage): Document it.
2635 * stap.1.in, stapex.5.in: Ditto.
2636 * elaborate.cxx (print_error): Disable error messages in listing mode.
2638 2008-04-10 Frank Ch. Eigler <fche@elastic.org>
2641 * Makefile.am: Also copy RadeonHD.am fragment to force
2642 git_version.h regeneration at every make, and also special
2643 tagging for "make dist". Thanks <ndim>.
2645 2008-04-10 Frank Ch. Eigler <fche@elastic.org>
2648 * git_version.sh: New file, copied from radeonhd.
2649 * configure.ac: No longer generate $builddir/SNAPSHOT.
2650 * Makefile.am: Generate $builddir/git_version.h.
2651 (EXTRA_DIST): Add git_version.h and git_version.sh.
2652 * main.cxx (version): Print generated GIT_MESSAGE therefrom.
2653 * Makefile.in, configure: Regenerated.
2655 2008-04-09 David Smith <dsmith@redhat.com>
2657 * .gitignore: Added more files to ignore.
2659 2008-04-04 Masami Hiramatsu <mhiramat@redhat.com>
2662 * translate.cxx (c_unparser::emit_common_header): Add unwaddr for
2663 caching unwound address.
2664 * tapsets.cxx (common_probe_entryfn_prologue): Clear unwaddr.
2666 2008-04-01 Frank Ch. Eigler <fche@elastic.org>
2668 * safety/*: Removed subdirectory containing abandoned experiment.
2670 2008-03-31 Frank Ch. Eigler <fche@elastic.org>
2672 * configure.ac: Bump version to 0.7.
2673 * configure: Regenerated.
2675 2008-03-27 Frank Ch. Eigler <fche@elastic.org>
2677 * tapsets.cxx (common_probe_entryfn_prologue): Clear last_stmt.
2679 2008-03-26 Frank Ch. Eigler <fche@elastic.org>
2681 * translate.cxx (emit_function): Set context last_stmt, in case
2682 an error occurs during the function.
2684 2008-03-25 Frank Ch. Eigler <fche@elastic.org>
2686 * stap.1.in: Clarify utility of epilogue type probe aliases.
2688 2008-03-21 Eugene Teo <eugeneteo@kernel.sg>
2691 * tapset/conversions.stp (user_string_n, user_string_n2,
2692 user_string_n_warn, user_string_n_quoted, user_short, user_short_warn,
2693 user_int, user_int_warn, user_long, user_long_warn, user_char,
2694 user_char_warn): New user_* functions.
2695 * stapfuncs.5.in: Documented the new functions.
2696 * testsuite/systemtap.stress/conversions.stp: Test new functions.
2697 * testsuite/buildok/conversions.stp: Test new functions.
2698 * testsuite/buildok/conversions-embedded.stp: Test new functions.
2700 2008-03-20 Frank Ch. Eigler <fche@elastic.org>
2703 * tapsets.cxx (*): Added a few (void) expressions for asserts that
2704 may be compiled out.
2706 2008-03-14 Masami Hiramatsu <mhiramat@redhat.com>
2709 * buildrun.cxx (compile_pass): Add an autoconf to check the kernel
2710 supports batch unregistration.
2711 * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Add an
2712 array of probe pointers for batch unregistration.
2713 * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): Use
2714 unregister_k(ret)probes if it is supported.
2716 2008-03-13 Frank Ch. Eigler <fche@elastic.org>
2719 * buildrun.cxx (compile_pass): Use EXTRA_CFLAGS for autoconf'd values
2720 instead of CFLAGS_<module>.o.
2722 2008-03-12 Frank Ch. Eigler <fche@elastic.org>
2724 * configure.ac, systemtap.spec.in: Bumped version to 0.6.2.
2725 * configure: Regenerated.
2727 2008-03-12 Dave Brolley <brolley@redhat.com>
2730 * staptree.cxx (probe::printsig): If this probe was derived from an alias,
2731 call the printsig method of the alias.
2733 2008-03-10 Dave Brolley <brolley@redhat.com>
2736 * translate.cxx (probe_or_function_needs_deref_fault_handler): New member of
2738 (c_unparser::emit_function): Initialize probe_or_function_needs_deref_fault_handler.
2739 Check it after the body is visited and generate a deref fault handler if necessary.
2740 (c_unparser::emit_probe): Likewise.
2741 (c_unparser::visit_print_format): Correct the compoenent type for an overridden string
2742 literal. Generate code to check that pointer arguments to %m can be dereferenced.
2743 Generate casts for printf arguments as necessary.
2744 * elaborate.cxx (typeresolution_info::visit_print_format): Desired type for conv_memory
2747 2008-03-06 Frank Ch. Eigler <fche@elastic.org>
2749 * Makefile.am (AM_CXXFLAGS, AM_CFLAGS): Remove -Werror.
2750 * Makefile.in, doc/Makefile.in: Regenerated.
2752 2008-03-03 Frank Ch. Eigler <fche@elastic.org>
2755 * elaborate.cxx (symbol_fetcher, dead_assignment_remover):
2756 Support unresolved $target lvalues. Propagate pretty error
2758 * staptree.cxx (varuse_collecting_visitor target_symbol): Ditto.
2759 * staptree.h: Corresponding decl.
2761 * loc2c.c: c_translate_pointer_store: New function.
2762 * loc2c.h: Corresponding decl.
2763 * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Call it
2764 for $target pointer assignments.
2766 2008-02-29 Will Cohen <wcohen@redhat.com>
2768 * main.cxx (handle_interrupts): Make compatible with GCC 4.3.
2770 2008-02-28 Frank Ch. Eigler <fche@elastic.org>
2773 * session.h (pending_interrupts): New global.
2774 * main.cxx (handle_interrupts): New fn to handle SIGINT* etc.
2775 * elaborate.cxx, translate.cxx, tapsets.cxx, main.cxx (*): Insert
2776 pending_interrupts escape hatches inside potentially timetaking loops.
2777 * buildrun.cxx: Don't deal with signals.
2779 2008-02-27 Frank Ch. Eigler <fche@elastic.org>
2782 * configure.ac (enable-docs): Implement.
2783 * systemtap.spec.in: Add optional docs build/install/prereqs.
2784 * Makefile.am (SUBDIRS): Add doc.
2785 * Makefile.in, configure: Regenerated.
2787 2008-02-27 Dave Brolley <brolley@redhat.com>
2790 * staptree.h (print_format::conv_memory): New enumerator.
2791 (print_format::width_type): New enumeration.
2792 (print_format::precision_type): New enumeration.
2793 (format_component::widthtype): New member.
2794 (format_component::prectype): New member.
2795 (format_component::is_empty): Test widthtype and prectype.
2796 (format_component::clear): Clear widthtype and prectype.
2797 * staptree.cxx (print_format::components_to_string): Handle dynamic width and precision.
2799 (print_format::string_to_components): Parse dynamic width and precision specifiers.
2800 Set widthtype and prectype. Parse %m format specifier.
2801 * elaborate.h (typeresolution_info::check_arg_type): New method.
2802 * elaborate.cxx (typeresolution_info::visit_print_format): Account for dynamic width
2803 and precision when computing the expected number of arguments. Check the types of
2804 arguments for dynamic width and precision. Use check_arg_type to check the types of
2805 all arguments. Handle print_format::conv_memory.
2806 (typeresolution_info::check_arg_type): New method.
2807 * NEWS: Describe the enhancements above.
2809 2008-02-27 David Smith <dsmith@redhat.com>
2812 * systemtap.spec.in: Adds examples to the testsuite rpm so that
2813 systemtap.samples/examples.exp works correctly.
2815 2008-02-26 Dave Brolley <brolley@redhat.com>
2818 * staprun.8.in: Escape dashes ('-') as appropriate.
2820 2008-02-26 Srinivasa DS <srinivasa@in.ibm.com>
2822 * tapset/syscall2.stp: Modify wait4,waitid argument list
2823 for kernel > 2.6.24.
2825 2008-02-25 Frank Ch. Eigler <fche@elastic.org>
2828 * parse.cxx (eval_pp_conditional): Support wildcards in
2829 %( kernel_v/kernel_vr/arch ==/!= "*foo?" %) operands.
2830 * NEWS, stap.1.in: Document this.
2832 2008-02-22 Frank Ch. Eigler <fche@elastic.org>
2834 PR5787, PR2608, .statement()
2835 * tapsets.cxx (query_dwarf_func): Process .statement(NUM) probes too.
2837 (query_func_info): Bypass prologue searching for .statement() probes.
2840 (build_blacklist): Remove unsightly empty first alternative in
2841 "^(|foo)$" regexps. Show them for -vvv.
2843 * buildrun.cxx (compile_pass): Don't turn on "gcc -Q" on until -vvvv.
2845 2008-02-20 David Smith <dsmith@redhat.com>
2847 * tapsets.cxx (struct mark_derived_probe): Renamed 'probe_sig' to
2849 (mark_derived_probe::mark_derived_probe): Added new "format" probe
2851 (mark_derived_probe::parse_probe_format): Renamed from
2852 'mark_derived_probe::parse_probe_sig'.
2853 (struct mark_builder): Added typedefs. Converted mark_cache from
2854 a map to a multimap to handle markers with the same name but
2856 (mark_builder::build): Added new 'format' probe parameter.
2857 (register_standard_tapsets): Added new 'format' marker probe
2859 * stapprobes.5.in (parts): Documented new "format" probe
2862 2008-02-19 Roland McGrath <roland@redhat.com>
2864 * tapsets.cxx (query_module): Use dwfl_module_getdwarf rather
2865 than dwfl_module_getelf for e_machine check.
2866 (dwarf_query::get_blacklist_section): Likewise for section search.
2867 Ignore non-SHF_ALLOC sections.
2869 2008-02-19 Frank Ch. Eigler <fche@elastic.org>
2871 * tapsets.cxx (query_module): Tweak elf-machine checking to
2872 better represent elfutils idioms.
2874 2008-02-19 Frank Ch. Eigler <fche@elastic.org>
2877 * tapsets.cxx (build_blacklist): Switch (back) to regexp-based
2878 blacklist construction ...
2879 (blacklist_p): ... and querying.
2881 2008-02-19 David Smith <dsmith@redhat.com>
2884 * tapsets.cxx (mark_derived_probe): Call probe_point copy ctor to
2885 shallow-copy incoming base probe location before
2886 recomputing/overwriting it.
2888 2008-02-18 Frank Ch. Eigler <fche@elastic.org>
2890 * NEWS, stapprobes.5.in: Document basic (non-symbolic prototype)
2891 user-space probe points.
2893 2008-02-15 Frank Ch. Eigler <fche@elastic.org>
2895 * tapsets.cxx (function_name_last_match): New function.
2896 (query_dwarf_func): Call it to stop unnecessary further iteration.
2898 2008-02-13 Frank Ch. Eigler <fche@elastic.org>
2901 * tapsets.cxx (build_blacklist): Add some CONFIG_PREEMPT-related
2904 2008-02-13 Dave Brolley <brolley@redhat.com>
2907 * staptree.h (probe::collect_derivation_chain): Now takes vector<probe*>.
2908 (probe::get_alias): New virtual method.
2909 * elaborate.h (derived_probe::collect_derivation_chain): Now takes vector<probe*>.
2910 * staptree.cxx (probe::collect_derivation_chain): Now takes vector<probe*>. Don't
2911 cast 'this' to (derived_probe*).
2912 * elaborate.cxx (derived_probe::collect_derivation_chain): Now takes vector<probe*>.
2913 (alias_derived_probe::get_alias): New virtual method.
2914 (alias_derived_probe::alias): New member.
2915 (alias_expansion_builder::build): Call checkForRecursiveExpansion and emit a
2916 diagnostic if recursion is detected. Pass alias to constructor of
2917 alias_derived_probe.
2918 (alias_expansion_builder::checkForRecursiveExpansion): New method.
2919 * coveragedb.cxx: Pass vector<probe*> on all calls to collect_derivation_chain.
2921 2008-02-12 Frank Ch. Eigler <fche@elastic.org>
2924 * tapsets.cxx (emit_address): Support relocatable kernels.
2925 (dwarf_derived_probe ctor): Hack around for missing USHRT_MAX.
2926 * elaborate.cxx (semantic_pass): Increment rc if exception caught.
2928 2008-02-12 Martin Hunt <hunt@redhat.com>
2930 * tapsets.cxx, translate.cxx: Cleanup indentation a bit.
2932 2008-02-11 Jim Keniston <jkenisto@us.ibm.com>
2935 * runtime/uprobes/uprobes.c: Intercept handler-destined
2936 signals received while we're single-stepping, and re-queue
2938 * runtime/uprobes/uprobes.h: Ditto
2940 2008-02-09 Frank Ch. Eigler <fche@elastic.org>
2943 From Eugeniy Meshcheryakov eugen@debian.org:
2944 * configure.ac (HAVE_LIBSQLITE3): Complete AC_DEFINE.
2946 * configure, INSTALL, missing, compile, depcomp, install-sh:
2949 2008-02-09 Frank Ch. Eigler <fche@elastic.org>
2952 * configure.ac: Add -Werror to trial compilation with
2953 -fstack-protector-all, for hosts that don't quite support it.
2954 * configure: Regenerated.
2956 2008-02-08 David Smith <dsmith@redhat.com>
2959 * systemtap.spec.in: Further simplification.
2961 2008-02-07 Frank Ch. Eigler <fche@elastic.org>
2963 * buildrun.cxx (run_make_cmd, compile_pass): Tweak kbuild
2964 parametrization to produce useful compile logs at -vv.
2966 2008-02-04 David Smith <dsmith@redhat.com>
2970 (mark_var_expanding_copy_visitor::visit_target_symbol_arg): New
2972 (mark_var_expanding_copy_visitor::visit_target_symbol_format): New
2974 (mark_var_expanding_copy_visitor::visit_target_symbol): Handles
2975 "$arg" or "$format".
2976 (mark_derived_probe_group::emit_module_decls): Sets up "$format"
2980 * systemtap.spec.in: Moved %pre section to the systemtap-runtime
2983 2008-01-30 David Smith <dsmith@redhat.com>
2986 * systemtap.spec.in: Simplified and explicitly specifies configure
2989 2008-01-30 Dave Brolley <brolley@redhat.com>
2991 * coveragedb.cxx (print_coverage_info): Fix typo: s.probes -> s.unused_probes
2993 (sql_update_unused_probes): Likewise.
2995 2008-01-29 Frank Ch. Eigler <fche@elastic.org>
2998 * configure.ac (--enable-ssp): Make default on compilers that
3000 * configure: Regenerated.
3002 2008-01-28 David Smith <dsmith@redhat.com>
3004 * configure.ac: Fixed a bug when "--disable-permon" was used.
3005 Added "--enable-crash" option.
3006 * configure: Regenerated.
3007 * Makefile.am: Improved staplog.so compile command.
3008 * Makefile.in: Regenerated.
3010 * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls):
3011 Added 'const' to several members of stap_dwarf_probes.
3013 PR 5685. From Eugeniy Meshcheryakov <eugen@debian.org>
3014 * configure.ac: If "--enable-sqlite" is specified, define
3016 * configure: Regenerated.
3018 2008-01-26 Frank Ch. Eigler <fche@elastic.org>
3021 * tapsets.cxx (dwarf_derived_probe_group): Split stap_dwarf_probes[]
3022 into bss-carried kprobes structs. Tune embedded strings for
3023 minimizing relocation-vs-fixed-buffer wastage.
3024 * tapsets.cxx (dwarf_derived_probe): Impose .maxactive() limits.
3026 2008-01-25 Jim Keniston <jkenisto@us.ibm.com>
3028 * runtime/uprobes/uprobes.c: Within a probed process, serialize
3029 calls to access_process_vm() when populating instructions
3030 slots. Fixes an SMP bug on multithreaded apps with many
3032 * runtime/uprobes/uprobes.h: Ditto
3034 2008-01-25 Frank Ch. Eigler <fche@elastic.org>
3037 * staptree.cxx (probe_point copy ctor): New function.
3038 * staptree.h: Declare it.
3039 * tapsets.cxx (dwarf_derived_probe ctor): Call it to shallow-copy
3040 incoming base probe location before recomputing/overwriting it.
3042 2008-01-25 David Smith <dsmith@redhat.com>
3044 * configure.ac: Compressed the two perfmon options into one.
3045 Made other small fixes and whitespace changes.
3046 * configure: Regenerated.
3048 2008-01-24 Frank Ch. Eigler <fche@elastic.org>
3050 * Makefile.am: Make another $(MKDIR) call visible.
3051 * Makefile.in: Regenerated.
3053 2008-01-24 David Smith <dsmith@redhat.com>
3056 * configure.ac: Removed elfutils version number check.
3057 * configure: Regenerated.
3058 * acsite.m4: Removed.
3059 * systemtap.spec.in: Minimum elfutils version number is no longer
3060 filled in by configure.
3063 * configure.ac: Handles sqlite optional functionality correctly.
3064 If enabled/disabled by the user, do the right thing. If not
3065 specified by the user, use it if present.
3066 * configure: Regenerated.
3067 * systemtap.spec.in: Always specify to configure whether to use
3070 2008-01-24 Dave Brolley <brolley@redhat.com>
3073 * staptree.cxx (<cstring>): #include it.
3074 (required <indexable *>): Remove 'static' from instantiation and
3075 move instantiation to here from...
3076 * staptree.h: ...here.
3078 2008-01-23 David Smith <dsmith@redhat.com>
3081 * configure.ac: Checks elfutils version number.
3082 * acsite.m4: New file containing macro to return elfutils version
3084 * configure: Regenerated.
3085 * systemtap.spec.in: Minimum elfutils version number is now filled
3088 2008-01-23 Dave Brolley <brolley@redhat.com>
3091 * translate.cxx (var::fini): New method.
3092 (c_unparser::emit_module_init): Call var::fini when deregistering
3093 variables without indices.
3094 (c_unparser::emit_module_exit): Likewise.
3096 2008-01-23 Frank Ch. Eigler <fche@elastic.org>
3099 * tapsets.cxx (dwflpp::setup): Parametrize debuginfo_path.
3100 * stap.1.in: Document this.
3102 2008-01-22 Jim Keniston <jkenisto@us.ibm.com>
3104 * runtime/uprobes/uprobes.c: Fix from Srinivasa: Recast
3105 rcu_dereferences of engine->data to resync with kernel.org
3108 2008-01-18 Srinivasa DS <srinivasa@in.ibm.com>
3111 * buildrun.cxx : Verify whether kernel has register rename patch
3112 through autoconf files.
3113 * runtime/(loc2c-runtime.h, procfs.c, regs.c, regs.h,
3114 stack-i386.c, autoconf-x86-uniregs.c, autoconf-nameidata.c) : Use
3115 appropriate register name at runtime, based on whether kernel has
3116 register rename patch or not.
3118 2008-01-18 Jim Keniston <jkenisto@us.ibm.com>
3120 * runtime/uprobes/uprobes.c: Added static copy of
3121 access_process_vm(), for kernels that don't export it.
3123 2008-01-18 Frank Ch. Eigler <fche@elastic.org>
3125 * configure.ac, systemtap.spec.in: Update version to 0.6.1
3126 * configure: Regenerated.
3128 2008-01-17 Srinivasa DS <srinivasa@in.ibm.com>
3131 * tapsets.cxx : Possible fix for making systemtap compatible with
3134 2008-01-17 Frank Ch. Eigler <fche@elastic.org>
3137 Reorganize probe condition implementation.
3138 * elaborate.cxx (add_condition): New function.
3139 (derived_probe): Remove condition member.
3140 (derived_probe ctors): Assert non-null incoming probe/location ptrs.
3141 (insert_condition_statement): Remove; turn into ...
3142 (semantic_pass_conditions): New pass-2 subpass.
3143 (semantic_pass_symbols, visit_symbol, visit_functioncall, find_var):
3144 Detect some condition-related error cases.
3145 (match_key): Change type to exp_type from tok_type. Update callers.
3146 (alias_expansion_builder): Propagate probe conditions.
3147 * staptree.cxx (probe): Remove condition field and related functions.
3148 * tapsets.cxx (dwarf_derived_probe ctor): Compute replacement
3149 wildcard-expanded probe_point preserving more of the original
3151 (mark_derived_probe ctor): Make similar to others - take location
3152 rather than condition parameters.
3153 * translate.cxx (emit_common_header): Tweak ordering of tmpcounter
3154 traversal and hashkey expression generation.
3155 * elaborate.h: Corresponding changes.
3157 2008-01-17 David Smith <dsmith@redhat.com>
3160 (procfs_var_expanding_copy_visitor::visit_target_symbol): Print an
3161 error when trying to use the procfs target variable '$value' as an
3163 (perfmon_var_expanding_copy_visitor::visit_target_symbol): Print an
3164 error when trying to use the perfmon target variable '$counter as
3165 an array or structure.
3167 2008-01-17 Srinivasa DS <srinivasa@in.ibm.com>
3170 * tapsets.cxx (emit_address): Tolerate dummy relocation entry
3171 added for kernel by recent elfutils.
3173 2008-01-16 David Smith <dsmith@redhat.com>
3177 (mark_var_expanding_copy_visitor::visit_target_symbol): Print an
3178 error when trying to use a marker argument as an array or
3181 2008-01-16 Eugene Teo <eteo@redhat.com>
3183 * stapfuncs.5.in: Document signal.stp tapset functions.
3185 2008-01-14 Martin Hunt <hunt@redhat.com>
3186 * translate.cxx (emit_module_init): Call _stp_print_kernel_info()
3187 to print out version information and internal memory usage stats.
3189 2008-01-14 Martin Hunt <hunt@redhat.com>
3190 * translate.cxx (emit_module_exit): When using timing, delete timing
3191 stats when finished.
3193 2008-01-12 Frank Ch. Eigler <fche@elastic.org>
3195 * configure.ac: Generate a build tree SNAPSHOT file from git-rev-list,
3196 if we suspect the source tree came from git.
3197 * configure: Regenerated.
3199 2008-01-12 Frank Ch. Eigler <fche@elastic.org>
3202 * configure.ac: Add "--enable-ssp" to select -fstack-protector-all
3203 and similar runtime checking directives.
3204 * configure: Regenerated.
3206 2008-01-09 David Smith <dsmith@redhat.com>
3208 * systemtap.spec.in: Since "make check" was removed
3209 from the rpm build step, we no longer need to require dejagnu at
3212 2008-01-09 Frank Ch. Eigler <fche@elastic.org>
3214 * tapsets.cxx (dwflpp::setup): Improve missing kernel-debuginfo
3217 2008-01-02 Frank Ch. Eigler <fche@elastic.org>
3219 From Mark McLoughlin <markmc@redhat.com>:
3220 * main.cxx (main): Set/restore umask around mkdtemp().
3222 2007-12-27 Jim Keniston <jkenisto@us.ibm.com>
3224 * runtime/uprobes/uprobes_x86_64.c: Fix handling of indirect
3225 jmps and calls that use rip-relative addressing. Allow probing
3228 2007-12-13 Masami Hiramatsu <mhiramat@redhat.com>
3230 * stap.1.in: Document about relay buffer sharing.
3231 * NEWS: Document about relay buffer sharing and staplog crash extension.
3233 2007-12-12 Wenji Huang <wenji.huang@oracle.com>
3236 * parse.cxx (parser::parse_probe_point): Add checking pointer t.
3238 2007-12-11 Frank Ch. Eigler <fche@elastic.org>
3240 * staptree.cxx, staptree.h: More GCC 4.3 build fixes from
3241 Eugeniy Meshcheryakov <eugen@debian.org>.
3243 2007-12-05 William Cohen <wcohen@redhat.com>
3245 * systemtap.spec.in: Correct Source to point to location contain code.
3247 2007-12-05 Masami Hiramatsu <mhiramat@redhat.com>
3250 * tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Allow user
3251 to access kernel variables in the condition of probe points.
3252 * stapprobes.5.in : Document the conditional probe point.
3255 2007-12-03 Masami Hiramatsu <mhiramat@redhat.com>
3258 * parse.cxx (lexer::scan): Treat '*' as an alphabet if the wildcard
3260 (parser::parse_probe_point): Call parser::next() with wildcard = true.
3261 (parser::scan_pp): Add wildcard flag and pass it to lexer::scan.
3262 (parser::next): Ditto.
3263 (parser::peek): Ditto.
3266 2007-12-01 Frank Ch. Eigler <fche@elastic.org>
3268 * gen-stapmark.h, stapmark.h: Retire.
3270 2007-11-29 David Smith <dsmith@redhat.com>
3272 * tapsets.cxx (mark_derived_probe::initialize_probe_context_vars):
3273 Handles the case where one marker has more than one string
3276 2007-11-27 David Smith <dsmith@redhat.com>
3279 * elaborate.cxx (match_node::find_and_build): Handle wildcards in
3280 probe points correctly.
3282 2007-11-26 Frank Ch. Eigler <fche@elastic.org>
3284 * elaborate.cxx (derived_probe ctor): Don't duplicate condition
3285 if it doesn't exist.
3286 * staptree.cxx (probe_point, probe ctors): Initialize to 0.
3288 2007-11-20 Masami Hiramatsu <mhiramat@redhat.com>
3291 * parse.cxx (parser::parse_probe_point): Parse "if" condition
3292 following probe point.
3293 * staptree.h (probe_point): Add "condition" field.
3294 (probe): Add "condition" field and "add_condition" method.
3295 (deep_copy_visitor): Add "deep_copy" method for the expression.
3296 * staptree.cxx (probe_point::probe_point): Initalize it.
3297 (probe::add_condition): Implement it.
3298 (probe::print): Output "condition" field.
3299 (probe::str): Ditto.
3300 (deep_copy_visitor::deep_copy): Implement it.
3301 * elaborate.h (derived_probe): Add "insert_condition_statement"
3303 * elaborate.cxx (derived_probe::derived_probe): Initialize "condition"
3304 field, and insert a condition check routine on the top of body.
3305 (derived_probe::insert_condition_statement): Implement it.
3306 (alias_expansion_builder::build): Pass the condition from the alias
3307 referer to new alias.
3308 * tapsets.cxx (be_derived_probe): Remove unused constructor.
3309 (dwarf_derived_probe::dwarf_derived_probe): Insert a condition check
3310 routine on the top of body.
3311 (mark_derived_probe::mark_derived_probe): Ditto.
3312 (mark_builder::build): Pass the base location to mark_derived_probe.
3315 2007-11-19 Frank Ch. Eigler <fche@elastic.org>
3318 * staptree.h (probe_point): Add "sufficient" field.
3319 * staptree.cxx: Initialize it, print it.
3320 * parse.cxx (parse_probe_point): Parse it.
3321 * elaborate.cxx (derive_probes): Implement it.
3322 * stapprobes.5.in: Document it.
3323 * NEWS: Gloat about it.
3325 2007-11-15 David Smith <dsmith@redhat.com>
3327 * tapsets.cxx (mark_derived_probe::initialize_probe_context_vars):
3328 Updated to work with latest LTTNG patch
3329 patch-2.6.24-rc2-lttng-0.10-pre23.tar.bz2.
3330 (mark_derived_probe_group::emit_module_decls): Ditto.
3331 (mark_derived_probe_group::emit_module_init): Ditto.
3332 (mark_derived_probe_group::emit_module_exit): Ditto.
3334 * translate.cxx (c_unparser::emit_common_header): Ditto.
3336 2007-11-15 Mike Mason <mmlnx@us.ibm.com>
3338 * systemtap.spec.in: Removed "make check" from rpm build steps
3340 2007-11-15 David Smith <dsmith@redhat.com>
3342 * tapsets.cxx: Removed mark_query structure.
3343 (mark_derived_probe::mark_derived_probe): Just looks for "kernel"
3345 (mark_builder::build_no_more): No longer kern_dw, instead clears
3347 (mark_builder::build): Now parses Module.markers file to find
3348 marker list and stores them in a cache.
3349 (register_standard_tapsets): Removed 'module("foo").mark("bar")'.
3350 All markers now go through 'kernel.mark("bar")'.
3352 * stapprobes.5.in (parts): Updated marker text.
3354 2007-11-14 Jim Keniston <jkenisto@us.ibm.com>
3357 * main.cxx: Restored initialization of need_uprobes flag,
3358 mistakenly backed out in PR 5270 fix.
3360 2007-11-14 Zhaolei <zhaolei@cn.fujitsu.com>
3362 * stapfuncs.5.in (tokenize): Change NULL to blank to avoid
3365 2007-11-13 Jim Keniston <jkenisto@us.ibm.com>
3368 * main.cxx: Restored pre-10-08 version: moved uprobes build to
3370 * buildrun.cxx: Reworked uprobes build so that the resulting
3371 Module.symvers can be used in building the stap-generated
3372 module. If user isn't root, call verify_uprobes_uptodate()
3373 rather than trying (and failing) to rebuild uprobes.ko.
3374 * buildrun.h: uprobes_enabled() and make_uprobes() are no
3376 * runtime/uprobes/Makefile: Added uprobes.ko target for use
3377 by verify_uprobes_uptodate().
3379 2007-11-12 Martin Hunt <hunt@redhat.com>
3381 * stap.1.in: Replaced references to the log() function.
3382 * stapex.5.in: Ditto.
3383 * stapfuncs.5.in: Ditto. ALso remove print and printf. They are
3384 documented in stap.1.in.
3386 2007-11-12 Martin Hunt <hunt@redhat.com>
3388 * translate.cxx (visit_print_format): Strings without a format or
3389 formatted with "%s" or "%s\n" should be printed with calls to _stp_print().
3390 Call _stp_print_char() if printing a char.
3392 * staptree.cxx (parse_print): Check for "print_char".
3394 * staptree.h (struct print_format): Add print_char.
3395 (parse_print): Update prototype.
3397 * parse.cxx (parse_symbol): Set print_char bool in print_format.
3399 2007-11-12 Martin Hunt <hunt@redhat.com>
3401 * tapsets.cxx (build_blacklist): Add __raw_spin_is_locked.
3403 2007-10-25 Josh Stone <joshua.i.stone@intel.com>
3406 * stap.1.in: Add a note about string literal limitations in printf
3409 2007-10-22 Jim Keniston <jkenisto@us.ibm.com>
3411 * runtime/uprobes/uprobes_x86_64.[ch]: Added x86_64 uprobes support
3413 2007-10-19 Jim Keniston <jkenisto@us.ibm.com>
3415 * runtime/uprobes/uprobes_ppc64.h,uprobes_s390.c: Fixed 10/16
3416 update to arch_validate_probed_insn() decl.
3418 2007-10-19 Masami Hiramatsu <mhiramat@redhat.com>
3420 * staplog.c: Cleanup code and remove end-of-line spaces.
3421 (create_output_filename): Use snprintf instead of sprintf and remove
3423 (print_rchan_info): Merge into output_cpu_logs().
3424 (open_output_file): Use GETBUF() instead of malloc().
3425 (output_cpu_logs): Simplify logic and remove unused code.
3426 (do_staplog): Merge into cmd_staplog().
3427 (help_staplog): Fix typos.
3428 * Makefile.am (STAPLOG): Add -Wall option.
3429 * Makefile.in: Regenerated.
3431 2007-10-19 Masami Hiramatsu <mhiramat@redhat.com>
3433 From Satoru Moriya <satoru.moriya.br@hitachi.com>:
3434 * staplog.c (create_output_dir): New function for creating output
3436 (create_output_filename): New function for making output filename.
3437 (print_rchan_info): New function for displaying relay channel status.
3438 (open_output_file): New function for opening output file.
3439 (output_cpu_logs): Cleanup code and fix bugs to retrieve buffer
3440 data even when the last buffer is full and even if the systemtap
3441 uses old(non-utt) format. Add a routine for '-a' option.
3442 (cmd_staplog): Add '-a' option.
3443 (help_staplog): Ditto.
3445 2007-10-18 Mike Mason <mmlnx@us.ibm.com>
3447 * stapprobes.5.in: Removed C label reference.
3448 Clarified source path requirements for probe
3449 definitions. Fixed some vertical spacing
3452 2007-10-18 Mike Mason <mmlnx@us.ibm.com>
3454 * stapfuncs.5.in: Corrected tokenize description.
3455 Added task_* functions.
3457 2007-10-16 Jim Keniston <jkenisto@us.ibm.com>
3459 * runtime/uprobes/uprobes.[ch], uprobes_i386.[ch],
3460 uprobes_ppc64.h, uprobes_s390.h: Adjusted SLOT_IP and
3461 arch_validate_probed_insn to accept task pointer (needed by
3462 x86_64); added uprobe_probept_arch_info and uprobe_task_arch_info
3464 * runtime/uprobes/uprobes_i386.c: Fixed a couple of glitches
3465 discovered when porting to x86_64
3467 2007-10-15 Roland McGrath <roland@redhat.com>
3470 * loc2c.c (struct location): Replace regno union member with struct
3471 member reg, fields regno and offset.
3472 (translate): Update uses.
3473 (emit_base_fetch, emit_base_store, emit_loc_register): Likewise.
3474 Fail if reg.offset is not zero.
3475 (location_relative): Handle DW_OP_plus_uconst relative to loc_register.
3476 (c_translate_array): Handle array index into loc_register.
3478 2007-10-15 David Smith <dsmith@redhat.com>
3480 * tapsets.cxx (mark_query::handle_query_module): Checks for marker
3481 to be in the proper section.
3482 (mark_derived_probe_group::emit_module_decls): Updated emitted
3483 marker C code for 10/2/2007 markers patch. Fixes PR 5178.
3485 From David Wilder <dwilder@us.ibm.com>
3486 * tapsets.cxx (mark_query::handle_query_module): Updated to handle
3487 64-bit platforms correctly.
3489 2007-10-15 Zhaolei <zhaolei@cn.fujitsu.com>
3491 From Cai Fei <caifei@cn.fujitsu.com>
3492 * conversions.stp: Add a function kernel_string_n for copy
3493 non-0-terminated string with fixed length from kernel space at
3495 * stapfuncs.5.in: Add kernel_string_n.
3496 * nfsd.stp: Using kernel_string_n to copy non-0-terminated string
3497 with fixed length from kernel space at given address.
3498 * nfs_proc.stp: Ditto.
3500 2007-10-12 David Smith <dsmith@redhat.com>
3502 * tapsets.cxx (dwflpp::setup): Added 'debuginfo_needed' parameter
3503 to not error if no debuginfo present.
3504 (hex_dump): New function.
3505 (mark_query::handle_query_module): Updated for
3506 10/2/2007 markers patch. Currently only handles markers in the
3507 kernel image itself - not in modules.
3509 2007-10-12 Martin Hunt <hunt@redhat.com>
3511 * Makefile.am (staprun_LDADD): Add -lpthread.
3512 * Makefile.in: Rebuilt.
3514 2007-10-11 Frank Ch. Eigler <fche@elastic.org>
3516 * systemtap.spec.in: Make -testsuite subrpm require dejagnu.
3518 2007-10-10 Jim Keniston <jkenisto@us.ibm.com>
3520 * runtime/uprobes/uprobes_ppc64.[ch]: Added
3521 * runtime/uprobes/uprobes_s390.[ch]: Added
3523 2007-10-09 Jim Keniston <jkenisto@us.ibm.com>
3526 * runtime/uprobes/uprobes.c: Adjust module ref-count
3527 when creating or removing uprobe_process, so "rmmod
3528 --wait uprobes" waits as needed until uretprobed
3531 2007-10-08 Jim Keniston <jkenisto@us.ibm.com>
3534 * main.cxx: Add pass 4.5: make uprobes.ko in runtime/uprobes
3535 * buildrun.cxx: Add uprobes_enabled() and make_uprobes().
3536 Factor run_make_cmd() out of compile_pass().
3537 * buildrun.h: Add uprobes_enabled and make_uprobes decls.
3538 * tapsets.cxx: Do correct #include for modprobed uprobes.ko;
3539 set need_uprobes in pass 2.
3540 * session.h: Add need_uprobes
3542 * runtime/staprun/common.c: Add -u option -> need_uprobes
3543 * runtime/staprun/staprun_funcs.c: Generalize insert_module()
3544 to support inserting uprobes.ko.
3545 * runtime/staprun/staprun.c: Add enable_uprobes(). insert_module
3546 call becomes insert_stap_module().
3547 * runtime/staprun/staprun.h: Reflect insert_module() and
3548 need_uprobes changes
3550 * runtime/uprobes/*.[c,h]: uprobes is built as a module,
3551 rather than included into the source of the stap-generated
3553 * runtime/uprobes/Makefile: Added
3555 2007-10-05 Frank Ch. Eigler <fche@elastic.org>
3558 * elaborate.cxx (semantic_pass_opt[12]): Warn on elided
3559 variables/functions in user script.
3560 * session.h (suppress_warnings): New field. Change
3561 "timing" to plain old bool.
3562 * main.cxx (main): Configure warnings on by default.
3563 * stap.1.in: Document this.
3565 2007-10-05 Frank Ch. Eigler <fche@elastic.org>
3568 * systemtap.spec.in: Create new systemtap-testsuite sub-rpm.
3569 Install crash(8)'s staplog.so into -runtime sub-rpm if built.
3570 * Makefile.am (rpm): New target.
3571 * Makefile.in: Regenerated.
3573 2007-10-04 Frank Ch. Eigler <fche@elastic.org>
3575 * stapfuncs.5.in: Document inet.stp tapset functions.
3577 2007-10-04 David Smith <dsmith@redhat.com>
3579 * buildrun.cxx (compile_pass): Tweaked build system for the
3580 2.6.23-rc8-mm2 kernel.
3582 2007-10-03 Frank Ch. Eigler <fche@elastic.org>
3585 * translate.cxx (visit_statement): Add new parameter regarding whether
3586 c->last_stmt needs to be updated. Update callers, mostly passing
3588 (visit_EXPRESSIONTYPE): Generally omit setting c->last_stmt, unless
3589 the construct can set c->last_error.
3591 2007-10-03 Frank Ch. Eigler <fche@elastic.org>
3594 * translate.cxx (emit_function): Put nesting limit/control logic into
3596 (visit_functioncall): ... and not into each call site.
3598 2007-10-02 Frank Ch. Eigler <fche@redhat.com>
3601 * translate.cxx (emit_global): Wrap all globals and locks into one
3602 top-level struct. Update references to former "global_VAR" prefix.
3603 * translate.h (emit_global_init): New function.
3605 2007-10-02 Frank Ch. Eigler <fche@redhat.com>
3608 * tapsets.cxx (be_derived_probe): Rework to add error probe support.
3609 Emit probe description array in C for traversal by generated code.
3610 * register_standard_tapsets: Add error probes.
3611 * stapprobes.5.in: Document.
3612 * translate.cxx (emit_module_init): Handle errors that may occur
3613 during begin probes.
3614 (emit_module_exit): Use schedule() rather than cpu_relax() during
3615 shutdown synchronization wait loop.
3616 * staptree.cxx (probe::printsig): Put multiple probe points on same
3619 2007-09-28 Frank Ch. Eigler <fche@elastic.org>
3621 * Makefile.in: Regenerated from Jim Keniston's uprobes Makefile.am
3624 2007-09-25 Josh Stone <joshua.i.stone@intel.com>
3626 * tapsets.cxx (translator_output::~translator_output): Fix mismatched
3629 2007-09-25 David Smith <dsmith@redhat.com>
3631 * tapsets.cxx (mark_query::handle_query_module): Updated for
3632 9/18/2007 markers patch.
3633 (mark_derived_probe::parse_probe_sig): Ditto.
3634 (mark_derived_probe_group::emit_module_decls): Ditto.
3635 (mark_derived_probe_group::emit_module_init): Ditto.
3636 (mark_derived_probe_group::emit_module_exit): Ditto.
3638 2007-09-24 Masami Hiramatsu <mhiramat@redhat.com>
3641 * buildrun.cxx (compile_pass): Add new autoconf options for checking
3644 2007-09-21 Frank Ch. Eigler <fche@elastic.org>
3647 * elaborate.cxx (dead_stmtexpr_remover): Add visit_if_statement,
3648 visit_foreach_loop, visit_for_loop): Support elision for unbraced
3650 (visit_expr_statement): Assert absence of unexpected nesting.
3652 2007-09-17 David Smith <dsmith@redhat.com>
3655 * stapprobes.5.in: Documented procfs probes.
3657 * tapsets.cxx (procfs_builder::build): Validate procfs path.
3659 2007-09-14 David Smith <dsmith@redhat.com>
3663 (procfs_var_expanding_copy_visitor::visit_target_symbol):
3664 Disallows reading from $value in a procfs read probe.
3666 2007-09-14 David Smith <dsmith@redhat.com>
3669 * tapsets.cxx (procfs_derived_probe_group::emit_module_init):
3670 Fixed problem where if only one type (read/write) of procfs probe
3671 was defined, the generated code wouldn't compile.
3673 2007-09-13 David Smith <dsmith@redhat.com>
3676 * tapsets.cxx (procfs_derived_probe::procfs_derived_probe):
3677 Removed debug print.
3678 (procfs_derived_probe_group::emit_module_decls): Improved error
3679 handling and added support for procfs.write probes.
3680 (procfs_var_expanding_copy_visitor::visit_target_symbol): Removed
3683 2007-09-12 Frank Ch. Eigler <fche@elastic.org>
3685 * parse.cxx (parse_symbol): Accept println(@hist*()).
3687 2007-09-12 Frank Ch. Eigler <fche@elastic.org>
3690 * translate.cxx (c_unparser::visit_literal_number): Support LLONG_MIN.
3691 (visit_unary_expression): Likewise.
3693 2007-09-12 Martin Hunt <hunt@redhat.com>
3696 * elaborate.cxx (visit_hist_op): Remove log histogram param.
3697 * translate.cxx (assert_hist_compatible): Ditto.
3698 * staptree.cxx (hist_op::print): Ditto.
3699 * session.h (statistic_decl): Ditto.
3701 * parse.cxx (expect_number): Allow negative numbers.
3702 Also validate that input is really numeric. This is used
3703 by histograms to get the parameters.
3704 (parse_hist_op_or_bare_name): Remove code to get parameter
3707 2007-09-12 David Smith <dsmith@redhat.com>
3709 * translate.cxx (c_unparser::emit_common_header): Added 'data'
3710 variable to context structure to support procfs probes.
3711 * tapsets.cxx: Improved procfs probe handling.
3713 2007-09-10 David Smith <dsmith@redhat.com>
3715 * tapsets.cxx (procfs_derived_probe_group::emit_module_init):
3716 Improved procfs probe handling (still non-working).
3717 (procfs_builder::build): Ditto.
3718 (register_standard_tapsets): Ditto.
3719 (all_session_groups): Ditto.
3721 2007-09-10 Martin Hunt <hunt@redhat.com>
3723 * tapsets.cxx, session.h, elaborate.cxx: Start of procfs
3724 interaction support. PR 1154.
3726 2007-09-06 Masami Hiramatsu <mhiramat@redhat.com>
3729 * tapsets.cxx (dwarf_query::build_blacklist): add __switch_to to
3730 blacklisted_return_probes on i686
3732 2007-08-30 David Smith <dsmith@redhat.com>
3735 * translate.cxx (c_tmpcounter::visit_print_format): Don't declare
3736 temporaries for number and string constants.
3737 (c_unparser::visit_print_format): Use numeric and string constants
3738 directly instead of copying them into temporaries.
3740 2007-08-27 Frank Ch. Eigler <fche@redhat.com>
3743 * NEWS: Mention retirement of LKET.
3744 * configure.ac: Remove mysql dependency.
3745 * systemtap.spec.in: Remove glib2 dependency.
3746 * configure, config.in: Regenerated.
3748 2007-08-24 Frank Ch. Eigler <fche@elastic.org>
3750 * configure.ac: Check for proper $PROCFLAGS-dependent -lcap.
3751 * Makefile.am (staprun_LDADD): Use autoconf variable rather than
3753 * configure, aclocal.m4, Makefile.in, config.in: Regenerated.
3755 2007-08-24 Frank Ch. Eigler <fche@redhat.com>
3758 * tapsets.cxx (dwflpp::has_single_line_record): Extended,
3759 abstraction violated.
3760 (iterate_over_srcfile_lines): Remove exactly line number match
3761 logic. Improve error message to offered better-checked alternative
3763 (query_srcfile_line): Whoops, pass scope_die down for statement("...")
3764 probes, to enable $target var processing.
3766 2007-08-21 David Smith <dsmith@redhat.com>
3769 * translate.cxx (c_unparser::visit_foreach_loop): When the user
3770 requested sorting an array of aggregates by value, sort by
3773 2007-08-20 Martin Hunt <hunt@redhat.com>
3776 From Lai Jiangshan <laijs@cn.fujitsu.com:
3777 * util.cxx (cmdstr_quoted): New. Properly quote
3779 * buildrun.cxx (run_pass): Call cmdstr_quoted().
3781 2007-08-20 Frank Ch. Eigler <fche@elastic.org>
3783 From Satoru MORIYA <satoru.moriya.br@hitachi.com>
3784 * staplog.c: Updated.
3786 2007-08-20 David Smith <dsmith@redhat.com>
3788 From Lai Jiangshan <laijs@cn.fujitsu.com>
3789 * main.cxx (main): Make sure the '-c' and '-x' options can't be
3792 2007-08-17 Frank Ch. Eigler <fche@elastic.org>
3794 As suggested by "Zhaolei" <zhaolei@cn.fujitsu.com>:
3795 * elaborate.cxx (semantic_pass_optimize[12],
3796 unresolved, invalid, mismatch): Use stringstream and
3797 print_error(semantic_error) instead of ad-hoc cerr.
3799 2007-08-16 Frank Ch. Eigler <fche@elastic.org>
3802 * stapfuncs.5.in: Document new target_set tapset.
3804 2007-08-16 Frank Ch. Eigler <fche@elastic.org>
3806 * Makefile.am (install-exec-hook): Only make staprun setuid if
3807 "make install" is being run as root.
3808 * Makefile.in: Regenerated.
3810 2007-08-16 Josh Stone <joshua.i.stone@intel.com>
3813 * parse.cxx (parser::parse_symbol): Tweak 'print' matching to allow
3814 all the new variants with printd and println.
3815 * staptree.h (struct print_format): Add fields for the new print
3816 variants, and parse_print() to help matching.
3817 * staptree.cxx (print_format::parse_print): New static method to
3818 match the print variants and determine their properties.
3819 (print_format::print): Handle the new print types.
3820 (deep_copy_visitor::visit_print_format): Copy the new fields.
3821 * translate.cxx (c_unparser::visit_print_format): Insert delims and
3822 newlines where appropriate for new print functions.
3823 * stap1.in: Document the new print functions.
3825 2007-08-15 David Smith <dsmith@redhat.com>
3827 * systemtap.spec.in: Updated %pre to latest Fedora group creation
3830 * stap.1.in: Changed '/usr' to '@prefix@' so the values will be
3832 * stapfunc.5.in: Ditto.
3834 * README.security: Typo fix.
3836 2007-08-15 Martin Hunt <hunt@redhat.com>
3838 * Makefile.am: Removed stap_merge.
3839 * Makefile.in: Rebuilt.
3841 2007-08-14 David Smith <dsmith@redhat.com>
3843 Merge from setuid-branch. Changes also by Martin Hunt
3846 * Makefile.am: Added staprun_funcs.c and cap.c to
3847 staprun_SOURCES. Added -lcap to staprun_LDADD. Removed
3848 stp_check reference. Added stapio program. Staprun is now
3850 * Makefile.in: Rebuilt.
3852 * configure.ac: Version increase to 0.6 and checks for libcap
3853 availability. Removed stp_check reference.
3854 * configure: Regenerated.
3855 * stp_check.in: Removed.
3857 * systemtap.spec.in: Version increase to 0.6-1 and added
3858 BuildReq for libcap-devl (and removed sudo requirement).
3859 Added %pre script to create new groups. Staprun is now
3862 * NEWS: Added info on new security model.
3863 * INTERNALS: Removed sudo reference.
3865 * README.security: New file.
3867 * main.cxx (main): Make sure module name isn't too long.
3868 * hash.cxx: Moved MODULE_NAME_LEN define to hash.h.
3869 * hash.h: Moved MODULE_NAME_LEN define here from hash.cxx.
3871 * buildrun.cxx (run_pass): No longer runs staprun with "sudo".
3873 * stap.1.in: Removed sudo references and added information about
3874 the stapdev/stapusr groups.
3875 * staprun.8.in: Added information about module detaching and
3876 attaching. Removed sudo references and added information
3877 about the stapdev/stapusr groups. Removed reference to
3878 staprun needing to be run as root. Removed reference to
3879 removed '-u USERNAME' option.
3881 * .cvsignore: Removed stp_check and added stapio and stap_merge.
3883 2007-08-10 Josh Stone <joshua.i.stone@intel.com>
3886 * translate.cxx (c_unparser::emit_common_header): Add an
3887 error_buffer to the context to allow dynamic error messages.
3888 * tapsets.cxx (dwflpp::express_as_string): Let deref / store_deref
3889 fill in last_error with a detailed message.
3891 2007-08-09 Frank Ch. Eigler <fche@elastic.org>
3893 From Lai Jiangshan <laijs@cn.fujitsu.com>:
3894 * translate.cxx (emit_module_exit): Use stp_warn for warning.
3896 2007-08-07 Frank Ch. Eigler <fche@redhat.com>
3899 * parse.cxx (input_put): New function, sort of like stdio ungetc.
3900 (input_get): Skip cursor position changing for input_put strings.
3901 (scan): Rework $.../@... substitution into character pasting.
3902 * parse.h: Corresponding changes.
3903 * util.h (lex_cast_qstring): Octal-quote unprintable characters.
3904 * stap.1.in, NEWS: Document new behaviour.
3906 2007-07-26 David Smith <dsmith@redhat.com>
3909 * main.cxx (main): If '-m MODNAME' is used, the generated module
3910 is saved in the current directory.
3911 * stap.1.in: Updated '-m' description.
3913 2007-07-11 William Cohen <wcohen@redhat.com>
3915 * systemtap.spec.in: Make sqlite support selectable.
3917 2007-07-11 Frank Ch. Eigler <fche@elastic.org>
3919 * configure.ac: Don't AC_MSG_ERROR if don't HAVE_LIBSQLITE3.
3920 * coveragedb.cxx: Compile to nothing unless HAVE_LIBSQLITE3.
3921 * main.cxx: Print no error message on -q if HAVE_LIBSQLITE3.
3922 * configure: Regenerated, looks rosier with HAVE_LIBSQLITE3.
3924 2007-07-08 William Cohen <wcohen@redhat.com>
3927 * coveragedb.cxx (update_coverage_db): Make index "unique" to optimize.
3929 2007-07-08 William Cohen <wcohen@redhat.com>
3932 * coveragedb.h (db_type): New enum for type column in coverage_element.
3933 (coverage_element): Remove removed column, change type to int.
3934 * coveragedb.cxx (has_table, has_index): New.
3935 (update_coverage_db): Use has_table, has_index.
3936 (enter_element): Change for new table format.
3937 (increment_element): Ditto.
3938 (sql_update_used_probes): Ditto.
3939 (sql_update_unused_probes): Ditto.
3940 (sql_update_used_functions): Ditto.
3941 (sql_update_unused_functions): Ditto.
3942 (sql_update_used_globals): Ditto.
3943 (sql_update_unused_globals): Ditto.
3944 (update_coverage_db): Ditto.
3945 (print_coverage_info(systemtap_session): Relocate vector.
3946 (sql_update_used_probes): Ditto.
3947 (sql_update_unused_probes): Ditto.
3949 2007-07-03 Frank Ch. Eigler <fche@elastic.org>
3951 * configure.ac: Bumped version to 0.5.15 for development.
3952 * configure: Regenerated.
3954 2007-07-03 Roland McGrath <roland@frob.com>
3956 * Makefile.am (install-exec-local, install-elfutils): Use $(DESTDIR).
3957 (SRCDIR): Variable removed.
3958 (check): Use sh code in commands instead.
3959 * Makefile.in: Regenerated.
3961 2007-07-02 William Cohen <wcohen@redhat.com>
3964 From Eugeniy Meshcheryakov <eugen@debian.org>
3965 * staptree.cxx: Add #include <cstdlib> for gcc 4.3.
3967 2007-07-02 Frank Ch. Eigler <fche@rechat.com>
3969 * staplog.c: New file from Satoru MORIYA
3970 <satoru.moriya.br@hitachi.com>, prototype crash(8) extension module.
3971 * configure.ac: Look for crash/defs.h.
3972 * Makefile.am: Build/install staplog.so shared library if found.
3973 * configure, Makefile, config.in, runtime/lket/b2a/Makefile.in:
3976 2007-07-02 William Cohen <wcohen@redhat.com>
3979 * staptree.cxx (probe_point::print): Remove stray output.
3981 2007-06-29 William Cohen <wcohen@redhat.com>
3985 * Makefile.am: Limit where sqlite3 linked in.
3987 * Makefile.in: Regenerate.
3989 2007-06-29 William Cohen <wcohen@redhat.com>
3993 * Makefile.am: Limit where sqlite3 linked in.
3995 * Makefile.in: Regenerate.
3997 * coveragedb.cxx (update_coverage_db): Remove unneeded print.
3998 * coveragedb.cxx (increment_element): Correct formatting.
4000 2007-06-26 William Cohen <wcohen@redhat.com>
4002 * staptree.cxx (probe_point::print): Remove stray "\n".
4004 2007-06-26 William Cohen <wcohen@redhat.com>
4007 * coveragedb.cxx: New.
4008 * coveragedb.h: New.
4009 * Makefile.am: Add coveragedb.cxx and sqlite3 to build.
4010 * Makefile.in: Regenerated.
4011 * configure.ac: Add test for sqlite3
4012 * configure: Regenerated.
4013 * systemtap.spec.in: Add dependencies for sqlite3/sqlite3-devel.
4014 * elaborate.h, elaborate.cxx
4015 (derived_probe::collect_derivation_chain): New.
4016 (alias_expansion_builder::build): Correct token location.
4017 (semantic_pass_opt[12): Track used and unused variables/functions.
4018 * session.h (tapset_compile_coverage, unused_globals,
4019 unused_probes, unused_functions): New fields.
4020 * staptree.h (unused_locals, probe_point::str): New member.
4021 * staptree.cxx: Ditto.
4022 * main.cxx: Add "-q" tapset coverage option and SYSTEMTAP_COVERAGE env.
4024 2007-06-21 David Smith <dsmith@redhat.com>
4026 * Makefile.in: Regenerated with automake 1.10.
4027 * aclocal.m4: Regenerated with aclocal 1.10.
4028 * configure: Regenerated.
4030 2007-06-20 Martin Hunt <hunt@redhat.com>
4032 * Makefile.am (noinst_PROGRAMS): Add stap_merge.
4033 * Makefile.in: Rebuilt:
4034 * config.in: Rebuilt
4036 2007-06-20 Frank Ch. Eigler <fche@elastic.org>
4038 * configure.ac: Added AM_PROG_CC_C_O for compatibility with
4040 * configure, aclocal.m4: Regenerated.
4042 2007-06-20 David Smith <dsmith@redhat.com>
4044 * buildrun.cxx (compile_pass): Unset environment variables that
4045 could interfere with building the kernel module. Fixes PR 4664.
4046 * main.cxx (main): Unsets a few standard environment variables for
4049 2007-06-18 David Smith <dsmith@redhat.com>
4051 * staprun.8.in: Fixed a couple of typos.
4053 2007-06-15 Frank Ch. Eigler <fche@elastic.org>
4056 * loc2c.c (base_encoding): Tolerate absenece of DW_AT_encoding.
4057 (c_translate_pointer): Don't even try to find signedness, assume
4060 2007-06-14 Frank Ch. Eigler <fche@elastic.org>
4062 * translate.cxx (emit_module_init): Emit translator/elfutils
4063 version numbers together.
4064 * main.cxx (version): Ditto.
4065 (main): Skip printing tapset directories where no sources were found.
4067 2007-06-14 Frank Ch. Eigler <fche@elastic.org>
4070 * loc2c.c (emit_base_fetch): Emit size/signedness cast
4071 slightly differently for every low-level fetch.
4072 (translate_base_fetch, c_translate_fetch, c_translate_store,
4073 c_translate_pointer): Fetch & pass the $target signedness.
4074 (base_encoding): Follow typedefs etc.
4076 2007-06-09 Frank Ch. Eigler <fche@elastic.org>
4079 From Eugeniy Meshcheryakov <eugen@debian.org>
4080 * staptree.cxx: Add #include <algorithm> for gcc 4.3.
4082 2007-06-08 David Smith <dsmith@redhat.com>
4085 * configure.ac: For x86 systems with gcc versions less than 4,
4086 automatically default to enabling prologue searching.
4087 * configure: Regenerated.
4089 2007-06-05 Frank Ch. Eigler <fche@redhat.com>
4092 * loc2c.c (emit_base_fetch): Emit size/signedness cast
4093 for every low-level fetch.
4094 (translate_base_fetch, c_translate_fetch, c_translate_store,
4095 c_translate_pointer): Fetch & pass the $target signedness.
4097 2007-05-31 Frank Ch. Eigler <fche@elastic.org>
4100 From Eugeniy Meshcheryakov <eugen@debian.org>
4101 * cache.cxx, parse.cxx: Add #include <cstring> for gcc 4.3.
4103 2007-05-30 Frank Ch. Eigler <fche@redhat.com>
4106 * staptree.cxx (varuse_collecting_visitor): Add side-effect
4107 result query functions.
4108 * elaborate.cxx (dead_stmtexpr_remover::visit_expr_statement):
4110 (dead_assignment_remover::visit_assignment): Skip elision of
4111 lvalues with side-effects in index exprs.
4112 * staptree.h: Corresponding changes.
4114 2007-05-25 Frank Ch. Eigler <fche@redhat.com>
4117 * elaborate.cxx (has_null_param): New function.
4118 * elaborate.h: Declare it.
4119 * session.h: Include uprobe_derived_probes group.
4120 * tapsets.cxx (uprobe_*): New classes.
4121 (all_session_groups): List uprobes in list.
4122 (register_standard_tapset): Interpret
4123 process(#).statement(#).absolute and
4124 process(#).statement(#).absolute.return probe points.
4126 2007-05-25 Martin Hunt <hunt@redhat.com>
4128 Patch from Quentin Barnes.
4129 * tapsets.cxx (query_module): Add support for arm.
4131 2007-05-21 David Smith <dsmith@redhat.com>
4134 * elaborate.h (derived_probe::initialize_probe_context_vars): New
4135 virtual function that will allow added context vars to be
4137 * translate.cxx (c_unparser::emit_common_header): Added
4139 (c_unparser::emit_probe): Calls new function
4140 initialize_probe_context_vars.
4141 (translate_pass): Includes linux/marker.h if CONFIG_MARKERS is
4143 * tapsets.cxx (struct dwarf_query): Split into base_query (which
4144 contains most of the original code) and a much smaller
4146 (struct base_query): New class.
4147 (dwarf_query::handle_query_module): New function.
4148 (query_module): Moved code into dwarf_query::handle_query_module().
4149 (mark_derived_probe): Adjusted for new kernel markers.
4150 (mark_derived_probe_group): Ditto.
4151 (mark_var_expanding_copy_visitor): Ditto.
4152 (mark_var_expanding_copy_visitor::visit_target_symbol): Generates
4153 code for new kernel markers.
4154 (struct mark_query): New class.
4155 (mark_query::handle_query_module): New function.
4156 (mark_derived_probe::mark_derived_probe): Adjusted for new kernel
4158 (mark_derived_probe::join_group): Ditto.
4159 (mark_derived_probe::emit_probe_context_vars): Ditto.
4160 (mark_derived_probe::parse_probe_sig): New function.
4161 (mark_derived_probe::initialize_probe_context_vars): New function.
4162 (mark_derived_probe::emit_module_decls): Adjust for new kernel markers.
4163 (mark_derived_probe::emit_module_init): Ditto.
4164 (mark_derived_probe::emit_module_exit): Ditto.
4165 (struct mark_builder): Ditto.
4166 (mark_builder::build): Ditto.
4168 2007-05-08 Martin Hunt <hunt@redhat.com>
4170 * buildrun.cxx (run_pass): Send proper verbosity
4173 2007-05-06 Frank Ch. Eigler <fche@elastic.org>
4176 * tapsets.cxx (iterate_over_srcfile_lines): Exclude approximate
4177 file:lineno matches optimistically returned by dwarf_getsrc_file.
4178 (query_srcfile_line): Use Dwarf_Line line number for constructing
4179 derived_probe location string.
4181 2007-05-02 David Smith <dsmith@redhat.com>
4183 * translate.cxx (c_tmpcounter::visit_functioncall): Updated
4185 (c_unparser::visit_functioncall): No longer copies numeric and
4186 string constants to temporary variables.
4188 2007-05-01 David Smith <dsmith@redhat.com>
4190 * translate.cxx (c_tmpcounter::visit_binary_expression): Updated
4192 (c_unparser::visit_binary_expression): Improved handing of numeric
4193 constants when handling '%' and '/' operators.
4194 (c_tmpcounter::visit_print_format): Updated temporary handling.
4195 (c_unparser::visit_print_format): Removed the need for a result
4196 temporary when printing to a stream.
4198 2007-04-30 David Smith <dsmith@redhat.com>
4201 * translate.cxx (c_unparser_assignment::c_assignop): Improved
4202 handling of numeric constants in the rest of the assignment
4204 (c_tmpcounter_assignment::c_assignop): Updated temporary
4207 2007-04-29 Frank Ch. Eigler <fche@elastic.org>
4209 * configure.ac: Mention testsuite/configure.ac for version matching.
4211 2007-04-27 Frank Ch. Eigler <fche@elastic.org>
4214 * buildrun.cxx (compile_pass): Tweak autoconf CFLAGS handling to
4215 avoid macro recursion but still get the needed -I directives.
4216 Add the inode-private autoconf test.
4218 2007-04-26 Frank Ch. Eigler <fche@elastic.org>
4221 * buildrun.cxx (compile_pass): Add $(mflags-y) to stap_check_build.
4223 2007-04-26 Frank Ch. Eigler <fche@elastic.org>
4225 * buildrun.cxx (compile_pass): Correct placement of commented-out
4226 "set -x" make-macro-debugging snippet.
4228 2007-04-25 David Smith <dsmith@redhat.com>
4231 * translate.cxx: Renamed "qname" to "value" throughout, since
4232 there are times now when qname would refer to a constant value.
4233 (tmpvar::override): Added function to allow for overriding a
4234 temporary variable name with a string.
4235 (tmpvar::value): New function that returns either the overridden
4236 string or the temporary variable name.
4237 (c_unparser::c_expression): New function.
4238 (c_unparser_assignment::c_assignop): Speed up assignment when
4239 numeric or string constants are used.
4240 (c_tmpcounter::visit_block): Avoid empty structs inside the union
4241 of temporary variables.
4242 (c_tmpcounter_assignment::prepare_rvalue): New function.
4243 (c_tmpcounter_assignment::c_assignop): New function.
4244 (c_tmpcounter_assignment::visit_symbol): Update temporary
4246 (c_unparser_assignment::prepare_rvalue): Speed up use of rvalues
4247 by using numeric and string constants directly instead of copying
4248 them to temporaries first.
4249 (c_tmpcounter::load_map_indices): New function.
4250 (c_unparser::load_map_indices): Speed up use of numeric and string
4251 constants as map indices.
4252 (c_tmpcounter::visit_arrayindex): Updated temporary declarations.
4253 (c_tmpcounter_assignment::visit_arrayindex): Updated temporary
4255 * translate.h (class translator_output): Added tellp() and seekp()
4258 2007-04-24 Mike Mason <mmlnx@us.ibm.com>
4260 * man/stapprobes.socket.5.in: Removed do_write and do_read probes,
4261 added aio_write, aio_read, writev and readv probes.
4263 2007-04-24 David Smith <dsmith@redhat.com>
4265 * tapsets.cxx (common_probe_entryfn_epilogue): Increment
4266 error_count when overload processing kicks in.
4268 2007-04-24 Martin Hunt <hunt@redhat.com>
4270 * stp_check.in: More tweaking of mount statement.
4272 2007-04-23 Frank Ch. Eigler <fche@redhat.com>
4274 * tapsets.cxx (die_entrypc): Expand search algorithm to
4275 check for "aranges", as sometimes occurs for inlined functions.
4277 2007-04-20 Roland McGrath <roland@redhat.com>
4279 * systemtap.spec.in (elfutils_version): Bump to 0.127.
4281 2007-04-18 Frank Ch. Eigler <fche@elastic.org>
4283 * Makefile.am (install-elfutils): Use $INSTALL_PROGRAM to
4284 copy elfutils shared libraries, as suggested by Perry Cheng
4285 <perryche@us.ibm.com>.
4287 2007-04-18 Frank Ch. Eigler <fche@elastic.org>
4289 * parse.cxx (scan_pp): Correct warnings from if/if/else nesting.
4291 2007-04-10 Martin Hunt <hunt@redhat.com>
4293 * stp_check.in: Fixes to make sure debugfs or relayfs are mounted
4294 exactly where we expect and other mounts are ignored.
4296 2007-04-03 Pierre Peiffer <pierre.peiffer@bull.net>
4298 * parse.cxx, parse.h (lexer::scan): Add $# and @# identifiers.
4299 (eval_pp_conditional, scan_pp): Allow the use of $x and @x identifiers.
4300 Produce more accurate error messages.
4301 * stap.1.in: Document $# and @# identifiers.
4303 2007-04-04 Frank Ch. Eigler <fche@elastic.org>
4305 GCC 4.3 compatibility patches from Debian.
4306 * buildrun.cxx, hash.cxx, tapsets.cxx, translate.cxx: #include a few
4309 2007-04-03 Frank Ch. Eigler <fche@elastic.org>
4311 Improve error messages for underprivileged scripts.
4312 * parse.h (parse_error): Add skip_some member, true default.
4313 * parse.cxx (parse_embedded_code): Send false on missing -g.
4314 * parse.cxx (parser::parse): Respect flag during parse error
4317 2007-04-02 Frank Ch. Eigler <fche@redhat.com>
4320 * tapsets.cxx (query_module): Reject elfutils module "kernel"
4321 unless kernel.* probe point used.
4323 2007-04-02 Frank Ch. Eigler <fche@elastic.org>
4325 * tapsets.cxx (query_dwarf_func): Skip non-inlined functions
4326 for .function().inline case.
4328 2007-03-30 Frank Ch. Eigler <fche@redhat.com>
4331 * NEWS: Document probe handler language change re. inline functions.
4332 * stapprobes.5.in: Likewise.
4333 * tapsets.cxx: Many changes to simplify caches and implement new
4334 handling of inline functions, removed of stubs for future probes.
4335 * elaborate.cxx (derived_probe printsig_nested): New function.
4336 * elaborate.h: Declare it.
4337 * main.cxx (usage): Clarify "-r" meaning.
4338 (main): Tweak related "-p 4" message.
4340 2007-03-30 David Smith <dsmith@redhat.com>
4343 * translate.cxx (c_unparser::emit_locks): No longer emits a read
4344 lock for global variables that are only written to in begin/end
4346 (c_unparser::emit_unlocks): Ditto.
4347 (translate_pass): Runs a varuse_collecting_visitor over probes
4348 that need global variable locks for use in
4349 emit_locks()/emit_unlocks().
4351 * stap.1.in: Corrected probe overload processing text.
4353 2007-03-29 David Smith <dsmith@redhat.com>
4356 * stap.1.in: Documented probe overload processing.
4358 2007-03-29 Frank Ch. Eigler <fche@redhat.com>
4360 * tapsets.cxx (dwarf_derived_probe emit_module_init): Correct handling
4361 of kprobe registration errors in the middle of a sequence.
4363 2007-03-29 David Smith <dsmith@redhat.com>
4366 * main.cxx (main): Validates '-m NAME' option. Chops off '.ko' if
4367 present. Makes sure name isn't empty. Makes sure name is only
4368 composed of characters [_a-zA-Z0-9].
4370 2007-03-28 David Smith <dsmith@redhat.com>
4372 PR 2341 (partial fix)
4373 * elaborate.h (struct derived_probe): Added needs_global_locks()
4374 member function. Unless overridden, will return true indicating
4375 that this probe needs locks around global variable references.
4376 * tapsets.cxx (struct be_derived_probe): Added override of default
4377 needs_global_locks() returning false. begin/end probes don't
4378 need locks around global variables, since they aren't run
4379 concurrently with any other probes.
4380 * translate.cxx (c_unparser::emit_common_header): Updated
4381 probe_contents logic to match the logic in emit_probe.
4382 (c_unparser::emit_probe): Added whether the probe needs global
4383 variable locks to the probe string (that helps eliminate duplicate
4384 probes). The generated C changes based on whether or not global
4385 variable locks are needed, but the pass 2 output doesn't differ
4386 between a probe that needs global variable locks and one that
4387 doesn't. If the probe doesn't need global variable locks, doesn't
4390 2007-03-26 Frank Ch. Eigler <fche@elastic.org>
4392 * configure.ac: Bumped version to 0.5.14.
4393 * configure: Regenerated.
4395 2007-03-26 David Smith <dsmith@redhat.com>
4397 * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Improved
4398 error messages for invalid types.
4400 * elaborate.cxx (typeresolution_info::invalid): Improved the error
4401 message for invalid operators.
4403 2007-03-22 Frank Ch. Eigler <fche@elastic.org>
4406 * staptree.h (probe): Add privileged field.
4407 * elaborate.cxx, parse.cxx: Pass privileged flag to probes.
4408 * tapsets.cxx (dwarf_query): Add has_absolute field.
4409 (dwarf_derived_probe ctor): Tolerate it.
4410 (register_patterns): Expose it.
4411 (dwarf_builder::build): Implement it with no dwfl whatsoever.
4412 * NEWS: Document kernel.statement().absolute.
4413 * stapprobes.5.in: Ditto.
4415 2007-03-21 Will Cohen <wcohen@redhat.com>
4418 * Makefile.in: Correct SAMPLE_SRC.
4420 2007-03-21 David Smith <dsmith@redhat.com>
4423 * tapsets.cxx (common_probe_entryfn_prologue): Added
4424 'interruptible' parameter. If a probe is interruptible,
4425 interrupts are not disabled while the probe executes. Preemption
4426 is disabled however. Interruptible parameter defaults to false.
4427 (common_probe_entryfn_epilogue): Ditto.
4428 (be_derived_probe_group::emit_module_decl): Uses new
4429 'interruptible' parameter to mark begin/end probes as
4431 (probe_derived_probe_group::emit_module): Initialize
4432 'actionremaining' with MAXACTION instead of initializing
4433 'actioncount' with 0.
4434 * translate.cxx (emit_common_header): Renamed 'actioncount' to
4435 'actionremaining'. Turned logic around to initialize
4436 actionremaining to MAXACTION or MAXACTION_INTERRUPTIBLE then
4437 decrement it as actions occur.
4438 (translate_pass): Added MAXACTION_INTERRUPTIBLE initialization.
4439 * translate.h: Removed outdated comment portion.
4440 * stap.1.in: Documented MAXACTION_INTERRUPTIBLE.
4441 * NEWS: Added note about begin/end probes being run with
4444 2007-03-20 Frank Ch. Eigler <fche@elastic.org>
4447 * tapsets.cxx (add_probe_point): Make kernel implicitly relocated
4448 relative to the _stext symbol.
4449 (dwarf_derived_probe ctor, emit_module_decls): Cooperate.
4450 (lookup_symbol_address): New function.
4451 (dwarf_builder::build): Call it thrice.
4452 (in_kprobes_function): Simplify.
4453 * session.h (systemtap_session): Rename cached symbol addresses.
4454 * translate.cxx, elaborate.cxx: Corresponding tweaks.
4456 2007-03-19 David Smith <dsmith@redhat.com>
4458 PR 4146 (partial fix)
4459 * tapsets.cxx (all_session_groups): Added note about stating that
4460 begin probes should be registered (actually run) first and end
4461 probes should be unregistered (run) last.
4462 * translate.cxx (c_unparser::emit_module_exit): Process probe
4463 group vector in reverse order so that probe groups will get
4464 unregistered in the reverse order that they were registered.
4466 2007-03-19 Frank Ch. Eigler <fche@elastic.org>
4468 * buildrun.cxx (compile_pass): Emit kbuild-time autoconf widgets
4469 to customize runtime or translator C code to actual kernel rather
4470 than kernel version string. Thanks to FC 2.6."20" for the nudge.
4471 * tapsets.cxx (hrtimer*emit_module): First client: HRTIMER_{MODE_}REL.
4473 2007-03-17 Frank Ch. Eigler <fche@elastic.org>
4475 * configure.ac: Tweak missing elfutils error message.
4476 * configure: Regenerated.
4478 2007-03-16 David Smith <dsmith@redhat.com>
4481 * tapsets.cxx (common_probe_entryfn_prologue): Added
4482 'overload_processing' parameter, which defaults to true. If
4483 overload_processing is set to false, doesn't output the
4485 (common_probe_entryfn_epilogue): Ditto.
4486 (be_derived_probe_group::emit_module_decl): Set
4487 overload_processing to false in calls to
4488 common_probe_entryfn_prologue and common_probe_entryfn_epilogue
4489 since begin/end probes shouldn't overload the system.
4490 * translate.cxx (c_unparser::emit_common_header): Emit
4491 STP_OVERLOAD global variables.
4492 (translate_pass): Emit STP_OVERLOAD defines.
4494 2007-03-14 Martin Hunt <hunt@redhat.com>
4495 * main.cxx (usage): Remove "-M" and edit description
4497 * stap.1.in: Remove "-M" option and edit description of "-b".
4498 Edit description of "-o".
4500 2007-03-14 Martin Hunt <hunt@redhat.com>
4501 * Makefile.am: Don't install old relayfs sources.
4502 * makefile.in: Rebuilt.
4504 2007-03-14 Martin Hunt <hunt@redhat.com>
4506 * Makefile.am (staprun_SOURCES): Sources now live in
4508 * makefile.in: Rebuilt.
4510 * staprun.8.in: Updated.
4512 * buildrun.cxx (run_pass): Use "-v" instead of not "-q" to
4513 be compatible with latest staprun.
4514 * translate.cxx (emit_module_exit): Print warning using
4515 _stp_printf so it shows up at the end of all output.
4516 (translate_pass): Replace STP_RELAYFS with STP_BULKMODE.
4517 Eliminate STP_RELAYFS_MERGE.
4519 2007-03-13 Frank Ch. Eigler <fche@redhat.com>
4522 * Makefile.am (check, installcheck): Pass build-tree pointers
4523 in environment variables.
4524 * configure.ac: Run separate configury for testsuite/.
4525 * configure, Makefile.in: Regenerated.
4527 2007-03-07 Frank Ch. Eigler <fche@elastic.org>
4530 * tapsets.cxx (translate_components): Throw an exception rather
4531 then suffer an assertion failure for $ptr[index] expressions.
4533 2007-03-05 David Smith <dsmith@redhat.com>
4535 * systemtap.spec.in: Made example perl script non-executable so
4536 that the systemtap rpm won't require perl.
4538 2007-03-04 Frank Ch. Eigler <fche@redhat.com>
4540 * stap.1.in, stapex.5.in, staprun.8.in: Tweak text to remove
4541 authors credits, update examples and pointers.
4543 2007-02-28 David Smith <dsmith@redhat.com>
4545 * systemtap.spec.in: Fixed %{_libexecdir}/systemtap path in
4546 systemtap-runtime %files section.
4548 2007-02-27 Frank Ch. Eigler <fche@elastic.org>
4550 * systemtap.spec.in (/var/cache/systemtap): Forget it.
4551 (stp_check): Pack this in with systemtap-runtime.
4552 * stp_check.in: Add LANG=C for speed.
4554 2007-02-27 David Smith <dsmith@redhat.com>
4556 * staprun.8.in: Added a basic staprun man page.
4557 * Makefile.am: Added staprun.8.
4558 * Makefile.in: Regenerated.
4559 * configure.ac: Added staprun.8.
4560 * configure: Regenerated.
4561 * systemtap.spec.in: Added staprun.8 and other document files to
4563 * .cvsignore: Ignores staprun.8.
4565 2007-02-27 Frank Ch. Eigler <fche@elastic.org>
4567 * tapsets.cxx (dwflpp setup): Print "missing kernel debuginfo"
4568 message consistently for, er, missing kernel debuginfo.
4569 (dwarf_builder::build): Don't try to help.
4570 (query_kernel_exists): Zapped.
4572 2007-02-27 David Smith <dsmith@redhat.com>
4574 * systemtap.spec.in: Fedora Packaging Guidelines updates. Updated
4575 BuildRoot macro value to Fedora Extras standard value. No longer
4576 uses %makeinstall macro. The rpm now owns the
4577 /usr/libexec/systemtap directory.
4579 2007-02-26 David Smith <dsmith@redhat.com>
4581 * Makefile.am: Removed 'update-examples' target. Moved
4582 functionality to systemtap.spec.in.
4583 * Makefile.in: Regenerated from Makefile.am.
4584 * systemtap.spec.in: Fixes paths in the example scripts directly.
4586 * Makefile.am: Added 'update-examples' target that fixes paths in
4587 the example code we ship in the rpm.
4588 * Makefile.in: Regenerated from Makefile.am.
4589 * systemtap.spec.in: Calls "make update-examples" target to fix
4590 the path to systemtap in the example scripts.
4592 2007-02-25 Frank Ch. Eigler <fche@redhat.com>
4594 * elaborate.h (match_node, derived_probe_builder): Add
4595 build_no_more member function.
4596 * elaborate.cxx (semantic_pass_symbols): Call it.
4597 * tapsets.cxx (dwarf_builder): Implement it by releasing dwflpp
4598 instance after pass 2, freeing mucho memory.
4600 2007-02-23 Josh Stone <joshua.i.stone@intel.com>
4603 * tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls):
4604 Adapt the function signature for changes in 2.6.21.
4605 (hrtimer_derived_probe_group::emit_module_init): Fix the enum name
4608 2007-02-19 Frank Ch. Eigler <fche@elastic.org>
4610 PR 4078 and more, including patch from
4611 Eugeniy Meshcheryakov <eugen@debian.org>:
4612 * Makefile.am (AM_CXXFLAGS, AM_CFLAGS): Add -Wextra -Wall -Werror
4614 * Makefile.in: Regenerated.
4615 (*): Many minor warning fixes.
4617 2007-02-17 Frank Ch. Eigler <fche@elastic.org>
4620 * translate.cxx (var::init): Check stat scalar initialization,
4621 just like is done for arrays.
4622 (emit_module_exit): Check unlikely but possible null timing stat.
4624 2007-02-15 David Smith <dsmith@redhat.com>
4627 * tapsets.cxx (dwflpp::print_locals): New function to print all
4628 the variables/parameters of a function.
4629 (dwflpp::find_variable_and_frame_base): Calls print_locals() when
4630 target variable can't be found.
4631 (dwflpp::print_members): New function to print all the members of
4633 (dwflpp::translate_components) Calls print_members() when
4634 union/structure member target variable reference can't be found.
4636 2007-02-14 Frank Ch. Eigler <fche@elastic.org>
4638 * tapsets.cxx (emit_module_decls): Assert CONFIG_KPROBES,
4639 as suggested by Andreas Kostyrka <andreas@kostyrka.org>.
4641 2007-02-12 Frank Ch. Eigler <fche@elastic.org>
4643 * tapsets.cxx (query_statement): Tolerate null file name string.
4645 2007-02-09 Frank Ch. Eigler <fche@elastic.org>
4648 * configure.ac: Add --enable-prologue option.
4649 * configure, config.in: Regenerated.
4650 * session.h (prologue_searching): New field.
4651 * main.cxx (main): Parse new "-P" option. Initialize based on
4653 * stap.1.in, NEWS: Document it.
4654 * hash.cxx (find_hash): Include it in computation.
4655 * tapsets.cxx (query_func_info, query_cu): Respect it.
4657 2007-02-06 Frank Ch. Eigler <fche@elastic.org>
4659 * stapfuncs.5.in: Add docs for kernel_{long,int,short,char} and
4660 some user_string* variants.
4662 2007-01-31 Martin Hunt <hunt@redhat.com>
4664 * translate.cxx (translate_pass): Remove old string impedance
4665 mismatch stuff. Modify included files.
4667 2007-01-29 Frank Ch. Eigler <fche@elastic.org>
4669 * configure.ac, configure: Bumped version to 0.5.13 for development.
4671 2007-01-29 Frank Ch. Eigler <fche@elastic.org>
4673 * translate.cxx (emit_module_init): Add some more type casts to printk
4676 2007-01-29 Martin Hunt <hunt@redhat.com>
4678 * translate.cxx (emit_module_init): BZ3888. Add memory usage for the
4679 runtime to the printk.
4681 2007-01-29 Frank Ch. Eigler <fche@elastic.org>
4683 * main.cxx (main): For successful last_pass=4, print compiled module
4685 * cache.cxx (get_from_cache): Ditto.
4687 2007-01-23 Mike Mason <mmlnx@us.ibm.com>
4689 * Makefile.am, configure.ac: Add support for
4690 stapprobes.socket man page.
4691 * configure, Makefile.in: Regenerate.
4692 * man/stapprobes.socket.5.in: Socket tapset man page.
4693 * stapprobes.5.in: Add stapprobes.socket(5) to "See Also" section.
4694 * stapfuncs.5.in: Add new string and sockets functions.
4696 2007-01-23 Frank Ch. Eigler <fche@elastic.org>
4698 * tapsets.cxx (loc2c_error): Correct vasprintf ignored-rc warning.
4700 2007-01-22 Martin Hunt <hunt@redhat.com>
4702 * translate.cxx (mapvar::exists): Use new _stp_map_exists function.
4703 Testing for zero is no longer correct after changes from 2007-01-10
4706 2007-01-18 Frank Ch. Eigler <fche@elastic.org>
4708 * main.cxx (version): Add (C) 2007.
4709 * translate.cxx (emit_module_init): Add a KERN_DEBUG printk
4710 at module startup time to aid debugging and auditing.
4712 2007-01-12 David Smith <dsmith@redhat.com>
4715 (dwarf_var_expanding_copy_visitor::visit_target_symbol): Since
4716 array behavior has changed (setting to 0 no longer deletes the
4717 array element), we delete the internal counter array element when
4718 providing target variable access in return probes.
4720 2007-01-11 Roland McGrath <roland@redhat.com>
4722 * systemtap.spec.in (elfutils_version): Bump to 0.125.
4723 Older libdw's have known bugs, though the ABI has not changed.
4725 2007-01-10 Martin Hunt <hunt@redhat.com>
4727 * translate.cxx (mapvar::del): Call the new _stp_map_del
4728 function instead of setting to zero.
4730 2007-01-01 Frank Ch. Eigler <fche@redhat.com>
4732 * configure.ac: Bump version to 0.5.12 for release.
4733 * configure: Regenerated.
4734 * NEWS, AUTHORS: Populate & repopulate.
4736 2006-12-29 Frank Ch. Eigler <fche@elastic.org>
4738 * tapsets.cxx (*group:emit_module_init): flush stdout less for timing
4739 mode. Also, Set probe_point variable ...
4740 * translate.cxx (emit_module_init): ... so on registration failure, a
4741 usable error message can be generated.
4743 2006-12-29 Frank Ch. Eigler <fche@redhat.com>
4746 * tapsets.cxx (common_probe_entryfn_prologue,epilogue): Restore
4747 support for -t (benchmarking) mode.
4748 * translate.cxx (emit_common_header,emit_module_init):Ditto.
4749 (emit_module_exit,emit_probe): Ditto, with most meat here.
4751 2006-12-22 Josh Stone <joshua.i.stone@intel.com>
4753 * stap.1.in: Document how to specify the size of global arrays.
4755 2006-12-21 Josh Stone <joshua.i.stone@intel.com>
4758 * parse.cxx (parser::parse_global): Allow a maxsize on global arrays.
4759 * staptree.h (struct vardecl): Add the maxsize field.
4760 * staptree.cxx (vardecl::vardecl): Init. maxsize.
4761 (vardecl::set_arity): Don't allow arity 0 when there's a maxsize.
4762 (vardecl::compatible_arity): Ditto.
4763 (vardecl::print): Include maxsize in output.
4764 (target_symbol::print): Ditto.
4765 * translate.cxx (struct mapvar, mapvar::mapvar): Add maxsize.
4766 (mapvar::init): Init maps with the given maxsize if specified, else
4767 keep using MAXMAPENTRIES.
4768 (mapvar::set): Make the error message give the maxsize.
4769 (mapvar::add): Ditto, and check for overflow on pmap add.
4770 (c_unparser::getmap): Pass the maxsize from the vardecl to mapvar.
4772 2006-12-21 David Smith <dsmith@redhat.com>
4774 * hash.cxx (find_hash): Added two more options into the hash that
4775 change the generated C file - '-M' (merge) and '-t' (benchmark
4778 2006-12-20 David Smith <dsmith@redhat.com>
4781 * Makefile.am: Added 'examples' directory to the 'EXTRA_DIST'
4782 variable so that the examples directory will be added to the
4783 distribution directory. Added variables 'SAMPLE_DEST_DIR' and
4784 'SAMPLE_SRC' and target 'dist-add-samples' to copy some of the
4785 testsuite sample scripts to the examples directory when creating a
4786 distribution directory.
4787 * Makefile.in: Regenerated.
4788 * systemtap.spec.in: Added 'examples' directory to the %doc list
4789 so that the examples directory will be installed on a user's
4792 2006-12-19 Frank Ch. Eigler <fche@redhat.com>
4795 * tapsets.cxx (dwflpp::emit_address): Call
4796 _stp_module_relocate only once per session.
4798 Error message cleanup: duplicate elimination etc.
4799 * session.h (saved_errors): Store a set of 'em.
4800 (num_errors): Return set size. Remove old numeric field.
4802 * elaborate.cxx (systemtap_session::print_errors):
4803 Print each encountered message just once.
4804 * staptree (semantic_error): Make msg2 writeable.
4806 * tapsets.cxx (*var_expanding*:visit_target_symbol): Set saved
4807 semantic_error's chain field.
4808 * elaborate.cxx (register_library_aliases, visit_foreach_loop,
4809 visit_functioncall, derive_probes): Plop "while: ..." error
4810 message prefix/suffix right into the semantic_error message string.
4811 * parse.cxx (lexer::scan): Identify erroneous token better
4812 in error message for unresolvable $N/@M command line args.
4813 * util.h (lex_cast_hex): Use std::hex, not std::ios::hex.
4815 2006-12-18 David Smith <dsmith@redhat.com>
4817 * Makefile.am (EXTRA_DIST): Added header files - cache.h, hash.h,
4818 mdfour.h, and util.h.
4819 * Makefile.in: Regenerated.
4821 2006-12-16 Frank Ch. Eigler <fche@elastic.org>
4823 * main.cxx (main): Print version strings if verbose >=2 .
4824 * tapsets.cxx (common_probe_entryfn_prologue): Decorate an
4825 emitted local with __restrict__.
4827 2006-12-14 David Smith <dsmith@redhat.com>
4829 * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added
4830 'return_ts_map' member variable.
4831 (dwarf_var_expanding_copy_visitor::visit_target_symbol):
4832 Optimization. If we've already seen this target variable in this
4833 return probe, return the last replacement (instead of creating a
4836 2006-12-13 David Smith <dsmith@redhat.com>
4838 * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added
4839 'add_probe' member variable. Initialized it in ctor.
4840 (dwarf_var_expanding_copy_visitor::visit_target_symbol):
4841 Optimization. Instead of generating one entry probe per target
4842 variable accessed in a return probe, now just generates one entry
4843 probe for all target variables accessed in a particular return
4844 probe. It does this by creating a new probe in the new
4845 'add_probe' member variable.
4846 (dwarf_derived_probe::dwarf_derived_probe): If add_probe isn't
4847 NULL, make sure it gets derived later.
4849 2006-12-11 Josh Stone <joshua.i.stone@intel.com>
4851 * parse.cxx (parse::parse_literal): Enforce the lower bound on
4854 2006-12-11 David Smith <dsmith@redhat.com>
4856 * hash.cxx (find_hash): Fixed a caching bug. Bulk mode (relayfs)
4857 status should be figured into the hash since it changes the
4860 2006-12-08 Josh Stone <joshua.i.stone@intel.com>
4863 * staptree.h (struct vardecl): Add a literal 'init' member for the
4864 initialization value of globals.
4865 * staptree.cxx (vardecl::vardecl): Initialize 'init' to NULL.
4866 (vardecl::print): Print global init value during pass-1 output.
4867 * main.cxx (printscript): Print global init values during verbose
4869 * parse.cxx (parser::parse_global): Set the initialization literal of
4871 * translate.cxx (var::init): Don't unconditionally override the value
4872 of numeric globals when the module_param isn't used.
4873 (c_unparser::emit_global_param): Write numeric module_params directly
4874 into the global variable, as an int64_t instead of long.
4875 (c_unparser::emit_global): Add initialization to global declarations.
4876 Don't create a temp module_param long for numeric globals anymore.
4878 2006-12-07 Josh Stone <joshua.i.stone@intel.com>
4881 * tapsets.cxx (struct be_derived_probe): Add a new priority parameter
4882 for begin/end probes, and a comparison function for sorting.
4883 (be_builder::build): Parse the priority & pass it to be_derived_probe.
4884 (be_derived_probe_group::emit_module_init, emit_module_exit): Sort the
4885 probe list by priority before emitting any code.
4886 (register_standard_tapsets): Add new begin/end variants.
4887 * parse.cxx (parser::parse_literal): Allow negative numeric literals,
4888 by checking for a '-' unary operator right before a number.
4889 * stapprobes.5.in: Document the new begin/end syntax.
4891 2006-12-06 Josh Stone <joshua.i.stone@intel.com>
4894 * tapsets.cxx (timer_derived_probe_group::emit_module_decls): Restart
4895 the timers if we are in STARTING or RUNNING state.
4896 (hrtimer_derived_probe_group::emit_module_decls): Ditto.
4897 (be_derived_probe_group::emit_module_init): indicate error to the rest
4898 of the initialization if any begin probes fail.
4899 * translate.cxx (c_unparser::emit_module_init): Set the global error
4900 state on an initialization error so timers know to shut down.
4902 2006-12-05 Frank Ch. Eigler <fche@redhat.com>
4905 * main.cxx (main): Tweak error message for tapset script execution.
4906 Also catch those clever rogues who use stdin.
4908 2006-11-30 Frank Ch. Eigler <fche@elastic.org>
4910 * tapsets.cxx (common_probe_entryfn_prologue): Tweak
4911 insufficient stack detection logic.
4913 2006-11-30 David Smith <dsmith@redhat.com>
4915 * main.cxx (printscript): Prints global embedded code. Not
4916 printing the global embedded code was causing bad caching
4919 2006-11-29 David Smith <dsmith@redhat.com>
4921 * tapsets.cxx (struct dwarf_var_expanding_copy_visitor): Added
4922 'add_block' member variable. Constructor sets it to NULL.
4923 (dwarf_var_expanding_copy_visitor::visit_target_symbol): Fixes the
4924 problem of accessing a cached target variable in a loop. Cached
4925 target variable is assigned to a temporary variable, which can be
4926 safely access multiple times. In addition, the cached value is
4927 deleted after being read.
4928 (dwarf_derived_probe::dwarf_derived_probe): Adds in the new block
4929 of code created in visit_target_symbol() to the beginning of the
4932 2006-11-28 David Smith <dsmith@redhat.com>
4935 (dwarf_var_expanding_copy_visitor::visit_target_symbol):
4936 Improved handling target variables in return probes by having a
4939 2006-11-26 Frank Ch. Eigler <fche@redhat.com>
4941 PRs 2685, 3596, toward 2725.
4942 * tapsets.cxx (common_probe_entryfn_prologue): Skip probe on
4944 (build_blacklist): Add a slew of lock-related calls.
4945 (query_module): Check for debuginfo architecture match.
4946 * translate.cxx (translate_pass): Add default MINSTACKSPACE.
4947 * configure.ac: Link stap with -lebl too.
4948 * configure: Regenerated.
4949 * stap.1.in: Document MINSTACKSPACE parameter.
4951 2006-11-21 Frank Ch. Eigler <fche@elastic.org>
4953 * translate.cxx (emit_module_init): Adapt to 2.6.19 utsname().
4955 2006-11-21 Frank Ch. Eigler <fche@elastic.org>
4958 * translate.cxx (emit_module_init): Emit code to check
4959 system_utsname against translate-time version/machine strings.
4961 2006-11-20 David Smith <dsmith@redhat.com>
4964 (dwarf_var_expanding_copy_visitor::visit_target_symbol): BZ
4965 1382. Target variables can be accessed in return probes. A new
4966 function entry probe is generated that saves the target variables
4967 so that they can be accesssed in the return probe.
4969 2006-11-19 Frank Ch. Eigler <fche@elastic.org>
4971 * main.cxx (main): Signal parse error if a tapset script
4972 is given as the user script.
4974 2006-11-15 Frank Ch. Eigler <fche@redhat.com>
4976 * tapsets.cxx (d_v_e_c_v::visit_target_symbol): Restore lost
4977 exception-saving functionality that improves error messages
4978 for incorrect $target expressions.
4979 (translate_components): Systematize error messages somewhat.
4980 * translate.cxx (emit_function, emit_probe): Clarify
4981 "array locals" error message.
4983 2006-11-10 David Smith <dsmith@redhat.com>
4986 (dwarf_var_expanding_copy_visitor::visit_target_symbol): Minor
4987 improvement to error handling by throwing exceptions before
4988 allocations are done.
4990 2006-11-10 Frank Ch. Eigler <fche@elastic.org>
4992 * stap.1.in: On urging of Adam Jackson, add blurbs on array syntax
4995 2006-11-09 Martin Hunt <hunt@redhat.com>
4997 * Makefile.am (staprun_LDADD): Need PROCFLAGS here too.
4999 2006-11-09 Martin Hunt <hunt@redhat.com>
5001 * Makefile.am (staprun_CFLAGS): New. Use PROCFLAGS.
5003 * configure.ac: Add PROCFLAGS. Processor-dependent
5005 * configure: Rebuilt.
5006 * Makefile.in: Rebuilt.
5008 2006-11-09 David Smith <dsmith@redhat.com>
5010 * tapsets.cxx (dwarf_query::dwarf_query): Looks for "maxactive"
5011 return probe variant.
5012 (dwarf_derived_probe::dwarf_derived_probe): Initializes
5013 has_maxactive and maxactive_val member variables.
5014 (dwarf_derived_probe::register_function_variants): Matches
5015 "maxactive" return probe variant.
5016 (dwarf_derived_probe_group::emit_module_decls): Emits code to use
5018 (dwarf_derived_probe_group::emit_module_init): Ditto.
5020 2006-11-08 David Smith <dsmith@redhat.com>
5022 * cache.cxx (get_from_cache): To preserve semantics with
5023 non-cached use, if the last pass is 3, display the cached C
5026 2006-11-08 Frank Ch. Eigler <fche@elastic.org>
5028 * staptree.cxx (print_format::components_to_string): Quote ".
5029 (c_unparser::visit_print_format): Don't use lex_cast_qstring
5030 as it overdoes \ quoting. Resemble ::visit_literal_string
5033 2006-11-08 Frank Ch. Eigler <fche@elastic.org>
5035 * util.h (lex_cast_qstring): Move def'n here. Also quote \.
5036 (stringify, lex_cast, lex_cast_hex): Move defn here.
5037 * buildrun.cxx, elaborate.cxx, main.cxx, staptree.cxx: Adapt.
5039 2006-11-07 Frank Ch. Eigler <fche@elastic.org>
5041 * tapsets.cxx (profile_derived_probe_group::emit_module_decls):
5042 Pass along incoming pt_regs to context of timer.profile handlers.
5044 2006-11-06 Martin Hunt <hunt@redhat.com>
5046 * translate.cxx (var::init): Check for errors when
5047 allocating arrays of stats, as well as other arrays.
5049 2006-11-06 David Smith <dsmith@redhat.com>
5051 Added "limit EXP" support to foreach statements.
5052 * translate.cxx (c_tmpcounter::visit_foreach_loop): Handles
5053 "limit" member variable.
5054 (c_unparser::visit_foreach_loop): Ditto.
5055 * staptree.cxx (foreach_loop::print): Prints "limit EXP"
5057 (traversing_visitor::visit_foreach_loop): Handles "limit" member
5059 (deep_copy_visitor::visit_foreach_loop): Ditto.
5060 * staptree.h (struct foreach_loop): Added "limit" member
5062 * stap.1.in: Added documentation for the "limit EXP" addition to
5064 * parse.cxx (lexer::scan): Added "limit" keyword for foreach
5066 (parser::parse_foreach_loop): Parses "limit" keyword for foreach
5068 * elaborate.cxx (symresolution_info::visit_foreach_loop): Handles
5069 "limit" member variable.
5070 (typeresolution_info::visit_foreach_loop): Ditto.
5072 2006-11-03 Frank Ch. Eigler <fche@elastic.org>
5074 * tapsets.cxx (emit_address): Emit calls to _stp_module_relocate
5075 for $target-variable addresses in relocatable sections.
5077 2006-11-02 Martin Hunt <hunt@redhat.com>
5079 * session.h (struct systemtap_session): Add symtab. This controls
5080 if a symbol table is generated and compiled into the module.
5082 * main.cxx (main): Set session.symtab to false. This could later
5083 enabled by a command-line option if necessary.
5085 * translate.cxx (emit_symbol_data): Don't write a symbol table if
5086 session.symtab is false.
5088 * tapsets.cxx (emit_module_decls): Remove stap_module array and
5090 (emit_module_init): Use "_stp_module_relocate".
5092 * Makefile.am (staprun_SOURCES): Add symbols.c
5093 * Makefile.in: Rebuilt.
5095 2006-11-02 David Smith <dsmith@redhat.com>
5097 * main.cxx (main): Added '-r' check. If the user changes the
5098 kernel release to compile against, make sure pass 5 isn't
5099 performed (since the resulting module won't be installable).
5101 2006-11-02 Frank Ch. Eigler <fche@elastic.org>
5103 * Makefile.am: Install tapset/README too.
5104 * Makefile.in: Regenerated.
5106 2006-11-01 Josh Stone <joshua.i.stone@intel.com>
5108 * tapsets.cxx (timer_derived_probe_group::emit_interval): New -
5109 Fixes randomization for jiffies timers in ms mode.
5110 (timer_derived_probe_group::emit_module_decls): Use emit_interval.
5111 (timer_derived_probe_group::emit_module_init): Ditto.
5113 2006-11-01 David Smith <dsmith@redhat.com>
5115 * translate.cxx (delete_statement_operand_visitor::visit_symbol):
5116 Added referent assert.
5117 (delete_statement_operand_tmp_visitor::visit_arrayindex): Ditto.
5118 (c_tmpcounter::visit_array_in): Ditto.
5119 (c_unparser::visit_symbol): Ditto.
5120 (c_unparser_assignment::visit_symbol): Ditto.
5121 (c_unparser::load_map_indices): Ditto.
5122 (c_tmpcounter::visit_arrayindex): Ditto.
5123 (c_tmpcounter_assignment::visit_arrayindex): Ditto.
5124 (c_tmpcounter::visit_functioncall): Ditto.
5125 (c_unparser::visit_functioncall): Ditto.
5127 2006-10-31 Frank Ch. Eigler <fche@redhat.com>
5129 Probe registration rework. Offline dwarf processing for better
5130 cross-instrumentation.
5131 * elaborate.h (derived_probe): Remove registration-related code
5132 generation API. Add new function sole_location().
5133 (derived_probe_group): Reworked this and associated classes.
5134 * session.h (systemntap_session): Create individual per-category
5135 derived_probe_groups.
5136 * elaborate.cxx (derived_probe_group): Reworked.
5137 (alias_derived_probe): Switch to new derived_probe API.
5138 (semantic_pass_symbols): Ditto.
5139 * translate.cxx (mapvar init): Check for array initialization error.
5140 (emit_module_init): Handle such failures, at least in theory.
5141 (emit_module_exit): Switch to new derived_probe_group API. Call
5142 cpu_relax() during shutdown busywait.
5143 (emit_common_header): Elide context variables for elided handler fns.
5144 (c_unparser::emit_probe): Implement new, improved duplicate
5145 elimination technique for probe handlers. Leave two older ones
5146 behind as compile options for education.
5147 * tapsets.cxx (*): Reworked all probe registration code, moving
5148 it from derived_probes into derived_probe_groups. Shrunk output
5149 code. Temporarily disabled probe timing and perfmon/mark probes.
5150 (dwflpp): Use offline reporting, so that module matching and
5151 relocation is performed at run time.
5152 (dwarf_query): Remove flavour logic, now supplanted by other
5153 duplicate elimination code.
5154 (dwarf_derived_probe): Reworked construction, centralized
5155 module/section/offset computations.
5156 * tapsets.h (all_session_groups): New little helper.
5158 * main.cxx (main): For pass-2 message, print number of embeds too.
5159 * systemtap.spec.in: Add a "BuildRequires: dejagnu" for make check.
5160 * configure.ac: Bump version to 0.5.11.
5161 * configure: Regenerated.
5163 2006-10-23 Li Guanglei <guanglei@cn.ibm.com>
5165 * lket.5.in: Rearranged the sections, add more details.
5167 2006-10-30 David Smith <dsmith@redhat.com>
5169 * stap.1.in: Added notes about new caching feature.
5171 2006-10-24 David Smith <dsmith@redhat.com>
5173 * tapsets.cxx (build_blacklist): Added
5174 "atomic_notifier_call_chain" to the blacklist (Bugzilla #3379).
5176 2006-10-23 David Smith <dsmith@redhat.com>
5178 * main.cxx (printscript): New function containing code moved from
5180 (main): Added code to create cache directory, call function to
5181 generate hash, and see if we can use cached source/module. If
5182 pass 4 is actually run to produce a new module, we call
5183 add_to_cache() to cache the result.
5184 * session.h (struct systemtap_session): Added hash/cache session
5186 * cache.cxx: New file handling adding/getting files from the
5188 * cache.h: New header file for cache.cxx.
5189 * hash.cxx: New file containing C++ wrapper for routines in
5190 mdfour.c and the find_hash function which computes the hash file
5191 name for an input script.
5192 * hash.h: New header file for hash.cxx.
5193 * mdfour.c: New file containing MD4 hash code.
5194 * mdfour.h: New header file for mdfour.c.
5195 * util.cxx: New file containing several utility functions used by
5197 * util.h: New header file for util.cxx.
5198 * Makefile.am: Added new C/C++ files.
5199 * Makefile.in: Regenerated.
5201 2006-10-23 Li Guanglei <guanglei@cn.ibm.com>
5203 * configure.ac, Makefile.am: add lket-b2a.1.in
5204 * Makefile.in, configure: regenreated
5205 * ket-b2a.1.in: new man page for lket-b2a
5206 * lket.5.in: document signal trace hooks
5208 2006-10-18 Roland McGrath <roland@redhat.com>
5211 * configure.ac (elfutils build): Pass --prefix and --exec-prefix
5212 options to elfutils configure.
5213 (elfutils_abs_srcdir): New substituted variable.
5214 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
5215 * configure, config.in, Makefile.in: Regenerated.
5217 2006-10-16 Li Guanglei <guanglei@cn.ibm.com>
5219 * configure.ac: add the checking for mysql_config,
5220 mysqlclient library and header files
5221 * runtime/lket/b2a/Makefile.am: set compile flags
5222 according to the existance of mysql_config
5223 * Makefile.in, configure, testsuite/Makefile.in,
5224 runtime/lket/b2a/Makefile.in: regenerated
5226 2006-10-12 Martin Hunt <hunt@redhat.com>
5228 * translate.cxx (emit_common_header): Add a
5229 kretprobe_instance pointer to struct context.
5230 (emit_symbol_data): Include absolute symbols.
5232 * tapsets.cxx (emit_common_header): Initialize
5233 the kprobe instance pointer to 0;
5234 (emit_probe_entries): Set kretprobe instance
5235 pointer if appropriate.
5238 2006-10-11 David Smith <dsmith@redhat.com>
5240 * tapsets.cxx (in_kprobes_function): New function that looks up
5241 the values of '__kprobes_text_start' and '__kprobes_text_end' in
5242 the kernel to be able to automatically exclude functions marked as
5243 '__kprobes' (BZ# 2639).
5244 (blacklisted_p): Calls in_kprobes_function().
5245 (query_kernel_module): Utility function that finds the kernel module.
5246 * session.h (struct systemtap_session): Added kprobes_text
5247 variables - kprobes_text_initialized, kprobes_text_start, and
5249 * elaborate.cxx (systemtap_session::systemtap_session):
5250 kprobes_text variables get initialized.
5252 2006-10-10 Roland McGrath <roland@redhat.com>
5254 * systemtap.spec.in (elfutils_version): Require 0.124 now.
5256 2006-10-10 Frank Ch. Eigler <fche@elastic.org>
5258 * configure.ac: Override incomplete mysql checking for now.
5259 * configure: Regenerated.
5261 2006-10-10 Li Guanglei <guanglei@cn.ibm.com>
5263 * configure.ac: add the checking of mysql client library
5264 * Makefile.in, configure: regenerated
5266 2006-09-29 Li Guanglei <guanglei@cn.ibm.com>
5268 * man: newly created dir for stapprobes
5269 * man/stapprobes.iosched.5, man/stapprobes.netdev.5, man/stapprobes.nfs.5,
5270 man/stapprobes.nfsd.5, man/stapprobes.pagefault.5, man/stapprobes.process.5,
5271 man/stapprobes.rpc.5, man/stapprobes.scsi.5, man/stapprobes.signal.5,
5272 man/stapprobes.tcp.5, man/stapprobes.udp.5: Some of these man pages are from
5273 the old stapprobes.5.in. Some are newly created(rpc, nfs, nfsd)
5274 * man/.cvsignore: ignore the generated man page files
5276 2006-09-29 Li Guanglei <guanglei@cn.ibm.com>
5279 * Makefile.am: add -DPKGLIBDIR='"$(pkglibexecdir)"' to AM_CPPFLAGS
5281 2006-09-28 Josh Stone <joshua.i.stone@intel.com>
5284 * tapsets.cxx (hrtimer_derived_probe::emit_probe_entries): Only
5285 restart timers when the session is still active and we updated the
5288 2006-09-27 Josh Stone <joshua.i.stone@intel.com>
5290 * session.h (struct systemtap_session): Add kernel_base_release
5291 to store the kernel version without the -NNN suffix.
5292 * main.cxx (main): Generate and use kernel_base_release.
5293 * parse.cxx (eval_pp_conditional): Use kernel_base_release.
5294 * tapsets.cxx (profile_derived_probe::profile_derived_probe):
5295 Use kernel_base_release.
5297 * tapsets.cxx (timer_builder::build): Support a wide variety of
5298 timer varients -- jiffies, s/sec, ms/msec, us/usec, ns/nsec, and
5299 hz. Use hrtimers automatically on kernels that have it.
5300 (timer_builder::register_patterns): Bind all of the new timer
5301 varients in one easy place.
5302 (register_standard_tapsets): Call timer_builder::register_patterns.
5303 (struct hrtimer_builder): Removed since timer_builder is generic.
5304 * stapprobes.5.in: Document new timer.* functionality.
5306 * tapsets.cxx (hrtimer_derived_probe_group::emit_probes): Add a
5307 shared global for the actual hrtimer resolution, _stp_hrtimer_res.
5308 (hrtimer_derived_probe_group::emit_module): Init _stp_hrtimer_res.
5309 (hrtimer_derived_probe::emit_interval): Limit intervals at a
5310 minimum to the hrtimer's actual resolution.
5311 (hrtimer_derived_probe::emit_probe_entries): Forward timers
5312 based on previous expiration instead of restarting relative.
5314 2006-09-26 David Smith <dsmith@redhat.com>
5316 * .cvsignore: Changed 'stpd' reference to 'staprun'.
5318 * buildrun.cxx (run_pass): Ditto.
5321 * stapruncs.5.in: Ditto.
5322 * examples/small_demos/demo_script.txt: Ditto.
5323 * examples/small_demos/sys.stp: Ditto.
5325 * systemtap.spec.in: Created a new subpackage,
5326 "systemtap-runtime", that contains staprun.
5328 * Makefile.am: Renamed 'stpd' to 'staprun' and moved it to
5330 * Makefile.in: Regenerated from Makefile.am.
5332 * configure.ac: Incremented version number.
5333 * configure: Regenerated from configure.ac.
5335 2006-09-22 Tom Zanussi <zanussi@us.ibm.com>
5337 * stp_check.in: Add debugfs mounting.
5339 2006-09-22 Li Guanglei <guanglei@cn.ibm.com>
5341 From Gui Jian <guijian@cn.ibm.com>
5342 * lket.5.in: document RPC trace hooks
5344 2006-09-20 Josh Stone <joshua.i.stone@intel.com>
5347 * stapfuncs.5.in: Document new gettimeofday_ns.
5349 2006-09-19 Tom Zanussi <zanussi@us.ibm.com>
5351 * README: Add CONFIG_DEBUG_FS to config options.
5353 2006-09-18 Josh Stone <joshua.i.stone@intel.com>
5356 From Eugeniy Meshcheryakov <eugen@debian.org>:
5357 * stapprobes.5.in: Correct misuse of '-' -> '\-' in manpage
5359 2006-09-18 Martin Hunt <hunt@redhat.com>
5361 * buildrun.cxx (run_pass): Remove "-m" option to stpd.
5362 * translate.cxx (translate_pass): #define STP_RELAYFS_MERGE
5365 2006-09-13 Martin Hunt <hunt@redhat.com>
5367 * buildrun.cxx (run_pass): Remove "-r" option to stpd.
5369 2006-09-13 Will Cohen <wcohen@redhat.com>
5371 * tapsets.cxx (perfmon_derived_probe_group::emit_module_init):
5372 Do not throw sematic error unless probes actually used.
5374 2006-09-12 Will Cohen <wcohen@redhat.com>
5377 * configure.ac: Add perfmon support options.
5378 * configure: Regenerated.
5381 * stapprobes.5.in: Document the perfmon support.
5383 * session.h, main.cxx: Track number of perfmon probes.
5384 * translate.cxx: Gen STP_PERFMON when perfmon probes.
5387 * elaborate.cxx (derived_probe_group): Add register_probe() for
5390 * tapsets.cxx (derived_probe::emit_common_header): Gen perfmon data.
5391 (perfmon_var_expanding_copy_visitor): New struct.
5392 (struct perfmon_derived_probe):
5393 (struct perfmon_derived_probe_group):
5394 (struct perfmon_builder): New Perfmon probe handling structures.
5395 (register_standard_tapsets): Add perfmon tapset binding.
5396 (derived_probe_group_container):
5397 (~derived_probe_group_container):
5398 (derived_probe_group_container::register_probe):
5399 (derived_probe_group_container::emit_probes):
5400 (derived_probe_group_container::emit_module_init):
5401 (derived_probe_group_container::emit_module_init_call):
5402 (derived_probe_group_container::emit_module_exit): Add perfmon tapset.
5404 * tapset/perfmon.stp: New.
5405 * runtime/perf.c: New.
5406 * runtime/perf.h: New.
5407 * runtime/runtime.h: Include perf.c.
5409 * testsuite/buildok/perfmon01.stp: Test to exercise perfmon
5411 * testsuite/systemtap.pass1-4/buildok.exp:
5413 2006-09-12 Li Guanglei <guanglei@cn.ibm.com>
5415 From Li Xuepeng <xuepengl@cn.ibm.com>
5416 * lket.5.in: document nfs trace hooks
5418 2006-09-08 David Smith <dsmith@redhat.com>
5420 * elaborate.h (struct derived_probe): Replace emit_registrations()
5421 function with emit_registrations_start() and
5422 emit_registrations_end().
5423 (struct derived_probe_group): Added emit_module_init().
5424 (struct derived_probe_group_container): Added emit_module_init(),
5425 emit_module_init_call(), and emit_module_exit().
5426 * elaborate.cxx (struct alias_derived_probe): Updated
5427 emit_regitrations calls.
5428 * translate.cxx (emit_module_init): Instead of actually emitting
5429 per-probe-point registrations/unregistrations, let the session's
5430 derived_probe_group_container do it.
5431 * tapsets.cxx (emit_probe_timing): New function that handles
5433 (be_derived_probe::emit_registrations_start): Renamed from
5435 (be_derived_probe_group::emit_module_init): New function that
5436 outputs probes create and destroy functions.
5437 (dwarf_derived_probe::emit_registrations): Removed, but most code
5438 moved to emit_registrations_start().
5439 (dwarf_derived_probe::emit_registrations_start): Handles details
5440 of multiple dwarf probe registrations.
5441 (dwarf_derived_probe::emit_registrations_end): Handles cleanup
5442 details of multiple dwarf probe registrations.
5443 (dwarf_derived_probe_group::emit_module_init): New function that
5444 outputs probes create and destroy functions.
5445 (timer_derived_probe::emit_registrations_start): Renamed from
5446 emit_registrations. Added mutiple probe handling.
5447 (timer_derived_probe::emit_registrations_end): Handles cleanup
5448 details of multiple probe registrations.
5449 (timer_derived_probe_group::emit_module_init): New function that
5450 outputs probes create and destroy functions.
5451 (profile_derived_probe::emit_registrations_start): Renamed from
5452 emit_registrations. Added mutiple probe handling.
5453 (profile_derived_probe::emit_registrations_end): Handles cleanup
5454 details of multiple probe registrations.
5455 (profile_derived_probe_group::emit_module_init): New function that
5456 outputs probes create and destroy functions.
5457 (mark_derived_probe::emit_registrations_start): Renamed from
5458 emit_registrations. Added mutiple probe handling.
5459 (mark_derived_probe::emit_registrations_end): Handles cleanup
5460 details of multiple probe registrations.
5461 (mark_derived_probe_group::emit_module_init): New function that
5462 outputs probes create and destroy functions.
5463 (hrtimer_derived_probe::emit_registrations_start): Renamed from
5464 emit_registrations. Added mutiple probe handling.
5465 (hrtimer_derived_probe::emit_registrations_end): Dummy function.
5466 (hrtimer_derived_probe_group::emit_module_init): New function that
5467 outputs probes create and destroy functions.
5468 (derived_probe_group_container::emit_module_init): Added function
5469 to call all probe group's emit_module_int functions.
5470 (derived_probe_group_container::emit_module_init_call): Added
5471 function to handle probe group initialization cleanup.
5472 (derived_probe_group_container::emit_module_exit): Added
5473 function to handle probe group cleanup.
5476 2006-09-06 Frank Ch. Eigler <fche@elastic.org>
5478 Add basic support for initialized globals.
5479 * parse.cxx (parse_global): Parse initialization clause, implement
5480 by rewriting to "probe begin { var = value }".
5481 * parse.h: Corresponding changes.
5482 * stap.1.in: Document optional initialization.
5484 2006-09-04 Frank Ch. Eigler <fche@elastic.org>
5486 Improve unresolved target-symbol error messages.
5487 * staptree.h (target_symbol): Add new field saved_conversion_error.
5488 * elaborate.cxx (typeresolution_info::visit_target_symbol): Throw
5489 that if found instead of generic error.
5490 * tapsets.cxx (t_v_f_c_v::visit_target_symbol): Set it.
5492 2006-08-30 Li Guanglei <guanglei@cn.ibm.com>
5494 * stapprobes.5.in: document signal.*
5496 2006-08-28 David Smith <dsmith@redhat.com>
5498 * translate.cxx: Added inclusion of session.h.
5499 (translate_pass): Instead of asking each probe to emit itself, we
5500 ask the session's probes member variable to emit all the probes.
5501 * tapsets.cxx: Added inclusion of session.h. Added a
5502 register_probe member function to all derived_probe based
5503 classes. Added a derived_probe_group derived class for all probe
5505 (be_derived_probe_group): New class.
5506 (never_derived_probe_group): New class.
5507 (dwarf_derived_probe_group): New class.
5508 (timer_derived_probe_group): New class.
5509 (profile_derived_probe_group): New class.
5510 (mark_derived_probe_group): New class.
5511 (hrtimer_derived_probe_group): New class
5512 (derived_probe_group_container): New class.
5513 * elaborate.h: Removed inclusion of session.h since session.h now
5514 includes elaborate.h.
5515 (derived_probe): Added register_probe member function.
5516 (derived_probe_group): Added class definition. This is the base
5517 class of all of the derived probe groups - dwarf, timer, etc.
5518 (derived_probe_group_container): Added class definition. An
5519 instance of this class will be stored in the session and contain
5520 all the other probe groups.
5521 * elaborate.cxx (derived_probe_group::register_probe): Added
5522 derived_probe_group::register_probe stubs.
5523 (alias_derived_probe::register_probe): Added register_probe member
5525 (semantic_pass_symbols): After deriving a probe, the probes now
5526 register themselves with the session.
5527 * session.h: Includes elaborate.h to get
5528 derived_probe_group_container definition. systemtap_session class
5529 'probes' member variable switched from a vector of derived probes
5530 to a derived_probe_group_container.
5531 * buildrun.cxx: Added inclusion of session.h since it was removed
5533 * main.cxx: Added inclusion of session.h since it was removed
5535 * parse.h: Added forward struct declarations.
5536 * staptree.h: Removed inclusion of session.h.
5538 2006-08-23 Josh Stone <joshua.i.stone@intel.com>
5541 From Eugeniy Meshcheryakov <eugen@debian.org>:
5542 * main.cxx (main): Use setenv instead of putenv, since gcc 4.2
5543 doesn't like assigning string constants to char*. Also use
5544 const char* for result from getenv.
5545 * tapsets.cxx (dwflpp::setup): Copy string constant into a
5546 local array, to fix gcc 4.2 warning.
5548 2006-08-22 Josh Stone <joshua.i.stone@intel.com>
5551 From Eugeniy Meshcheryakov <eugen@debian.org>:
5552 * stap.1.in: In groff, '-' produces a Unicode hyphen. Use '\-'
5553 where a plain-old minus sign is desired, e.g., code examples.
5554 * lket.5.in, stapex.5.in, stapfuncs.5.in, stapprobes.5.in: ditto
5556 2006-08-15 Roland McGrath <roland@redhat.com>
5558 * systemtap.spec.in (elfutils_version): Require 0.123 now.
5560 2006-08-14 David Smith <dsmith@redhat.com>
5562 * elaborate.cxx (semantic_pass): Calls semantic_pass_optimize1()
5563 and semantic_pass_optimize2().
5564 (visit_functioncall): Removed setting relaxed_p since
5565 semantic_pass_opt5 does it.
5566 (semantic_pass_opt5): Goes ahead and removes duplicate functions
5567 since semantic_pass_opt1() won't be run again.
5568 (semantic_pass_optimize1): Renamed from semantic_pass_optimize().
5569 Moved semantic_pass_opt5() to semantic_pass_optimize2().
5570 (semantic_pass_optimize2): New function that contains optimization
5571 passes that need to be done after type inference.
5573 2006-08-12 Frank Ch. Eigler <fche@elastic.org>
5575 * Makefile.am (dist-hook): Make "make dist" dist.
5576 * Makefile.in: Regenerated.
5578 2006-08-12 Frank Ch. Eigler <fche@elastic.org>
5580 * configure.ac, Makefile.am: Descend into testsuite/
5581 directory. Remove local test logic.
5582 * configure, Makefile.in: Regenerated.
5583 * runtest.sh: Not yet removed.
5584 * HACKING: Update for new testsuite layout.
5586 2006-08-10 David Smith <dsmith@redhat.com>
5588 * elaborate.cxx (duplicate_function_remover): Added class.
5589 (get_functionsig): Added function.
5590 (semantic_pass_opt5): New function merges duplicate identical
5591 functions into one function.
5592 (semantic_pass_optimize): Calls semantic_pass_opt5.
5594 * translate.cxx (c_unparser::emit_probe): Changed to merge
5595 duplicate probes bodies by making the duplicate probe just call
5596 the original probe (BZ# 2421).
5598 2006-08-08 Li Guanglei <guanglei@cn.ibm.com>
5600 * stapprobes.5.in: document process.*, tcp.*, udp.*
5602 2006-08-09 Thang Nguyen <thang.p.nguyen@intel.com>
5604 * testsuite/buildok/iolock_test.stp: Updated for new ioblock.stp
5606 2006-08-09 Josh Stone <joshua.i.stone@intel.com>
5608 * examples/small_demos/proc_snoop.stp,
5609 testsuite/buildok/process_test.stp: Rename process.signal_* to
5610 new signal.* tapset.
5611 * stapprobes.5.in, testsuite/buildok/memory.stp: move pagefault
5614 2006-08-08 Eugene Teo <eteo@redhat.com>
5616 * tapset/context.stp (probemod): New function.
5617 * stapfuncs.5.in: Document it.
5618 * testsuite/buildok/probemod.stp: Test it.
5620 2006-08-08 Li Guanglei <guanglei@cn.ibm.com>
5622 * stapprobes.5.in: document scsi.*, ioscheduler.*, netdev.* and
5625 2006-08-01 Li Guanglei <guanglei@cn.ibm.com>
5628 * tapsets.cxx: calling get_module_dwarf(false) to give a
5629 warning to those modules without debuginfo and skip them
5631 2006-07-19 Roland McGrath <roland@redhat.com>
5633 * configure.ac, systemtap.spec.in: Bump version to 0.5.9.
5634 * configure: Regenerated.
5636 * systemtap.spec.in: Fix syntax in last change.
5638 2006-07-19 David Smith <dsmith@redhat.com>
5640 * testsuite/buildok/scsi.stp: Only run the scsi test if the scsi
5641 kernel subsystem is running.
5643 2006-07-17 David Smith <dsmith@redhat.com>
5645 * stapfuncs.5.in: Removed retval function description, since it
5648 2006-07-17 Roland McGrath <roland@redhat.com>
5650 * configure.ac, systemtap.spec.in: Require elfutils-0.122.
5651 * configure: Regenerated.
5653 * systemtap.spec.in (Release): Use %{?dist}.
5655 2006-07-17 Li Guanglei <guanglei@cn.ibm.com>
5657 * main.cxx: add LKET's tapsets into stap's default tapsets
5660 2006-07-13 Frank Ch. Eigler <fche@elastic.org>
5662 * systemtap.spec.in: Add formerly missing admonitional verb.
5664 2006-07-13 David Smith <dsmith@redhat.com>
5666 * parse.cxx (parser::expect_unknown2): New function that looks for
5667 2 possible token types.
5668 * parse.cxx (parser::expect_ident_or_keyword): New function that
5669 calls parser::expect_unknown2.
5670 * parse.cxx (parser::parse_symbol): Calls
5671 parser::expect_ident_or_keyword to allow keywords to appear when
5672 expanding target symbols (Bugzilla #2913).
5673 * parse.h: Added prototypes for parser::expect_unknown2 and
5674 parser::expect_ident_or_keyword.
5675 * testsuite/parseok/seventeen.stp: New test to check for allowing
5676 keywords when expanding target symbols.
5678 2006-06-30 Josh Stone <joshua.i.stone@intel.com>
5680 * tapsets.cxx (hrtimer_builder::build): Enable hrtimers on >=2.6.17.
5681 * tapsets.cxx (hrtimer_derived_probe::emit_probe_entries): Correct
5682 compilation errors, fix return value.
5684 2006-06-30 David Smith <dsmith@redhat.com>
5686 * tapsets.cxx (dwflpp::dwfl_assert): Added optional extra_msg
5687 parameter to be able to print out extra error message.
5688 (dwflpp::setup): Uses new 'extra_msg' parameter to dwfl_assert()
5689 to ask user to install kernel-debuginfo when
5690 dwfl_linux_kernel_report_kernel() or
5691 dwfl_linux_kernel_report_modules() fails (Bugzilla #2669).
5693 * buildrun.cxx (compile_pass): Checks to make sure module build
5694 directory exists before trying to run make there (Bugzilla #2669).
5696 2006-06-27 Roland McGrath <roland@redhat.com>
5698 * runtest.sh: Don't use eval, use proper quoting.
5700 * tapsets.cxx (dwflpp::emit_address): New instance method. Get
5701 relocation details from Dwfl to emit in comment after address constant.
5702 (dwflpp::loc2c_emit_address): Just call that.
5704 2006-06-26 Li Guanglei <guanglei@cn.ibm.com>
5706 * lket.in.5: update to AIO event hooks
5708 2006-06-23 Thang P Nguyen <thang.p.nguyen@intel.com>
5710 * testsuite/buildok/tcp_test.stp: updated inet calls
5711 * testsuite/buildok/udp_test.stp: test udp tapset
5713 2006-06-22 Thang P Nguyen <thang.p.nguyen@intel.com>
5715 * testsuite/buildok/tcp_test.stp: test tcp tapset
5717 2006-06-16 Roland McGrath <roland@redhat.com>
5719 * configure.ac, systemtap.spec.in: Bump version to 0.5.8.
5720 * configure: Regenerated.
5722 * systemtap.spec.in: Fix bundled_elfutils setting so builds can
5723 possibly work. Add comment admonishing losers not to touch it.
5725 * aclocal.m4, Makefile.in: Regenerated with automake-1.9.6-2.
5727 2006-06-16 Li Guanglei <guanglei@cn.ibm.com>
5729 * lket.in.5: update to reflect the latest changes
5732 2006-06-15 Roland McGrath <roland@redhat.com>
5734 * systemtap.spec.in: Require elfutils-0.121.
5736 2006-06-14 Frank Ch. Eigler <fche@elastic.org>
5738 * README: Add kernel.org blurb based on text from
5739 Chuck Ebbert <76306.1226@compuserve.com>.
5741 2006-06-09 Li Guanglei <guanglei@cn.ibm.com>
5743 * parse.cxx, staptree.cxx, staptree.h, translate.cxx:
5744 delete lket_trace_extra
5745 * lket.5.in: delete the description of backtrace in
5748 2006-06-08 Thang P Nguyen <thang.p.nguyen@intel.com>
5750 * testsuite/buildok/ioblock_test.stp: test ioblock
5752 2006-06-05 David Smith <dsmith@redhat.com>
5754 * tapsets.cxx (dwflpp::express_as_string): New function.
5755 Extracted from dwflpp::literal_stmt_for_local() so that
5756 dwflpp::literal_stmt_for_return() could also call it.
5757 (dwflpp::literal_stmt_for_local): Portion extracted to create
5758 dwflpp::express_as_string().
5759 (dwflpp::literal_stmt_for_return): New function. Adds support for
5760 new symbolic access ("$return") to return value in .return
5761 probes. Fixes PR 1132.
5762 (target_variable_flavour_calculating_visitor::visit_target_symbol):
5763 Calls dwflpp::literal_stmt_for_return() when in a return probe and
5764 the variable name is "$return".
5765 (dwarf_var_expanding_copy_visitor::visit_target_symbol): Ditto.
5766 * stapfuncs.5.in: Noted that the retval() function is deprecated.
5767 * stapprobes.5.in: Corrected the name of the return value
5769 * tapset/return.stp: Marked the retval() function as deprecated.
5770 * testsuite/semko/return01.stp: Added new test.
5771 * testsuite/semko/return02.stp: Ditto.
5773 2006-06-05 Frank Ch. Eigler <fche@elastic.org>
5776 * elaborate.cxx (derive_probes): Pass down optional flag
5777 from alias reference to expansion.
5778 * testsuite/semok/twentytwo.stp: Test passing-down.
5779 * stapprobes.5.in: Specify passing-down property of optional flag.
5781 2006-06-02 Frank Ch. Eigler <fche@elastic.org>
5784 * elaborate.cxx (find_and_build): Support optional wildcards too.
5785 (derive_probes): Change last argument to indicate optionalness of
5786 parent probe point (alias reference).
5787 (alias_expansion_builder): Shrink epilogue-mode alias body copying.
5788 Pass along alias reference optionality.
5789 * elaborate.h: Corresponding changes.
5790 * testsuite/semko/thirtyfive.stp, semok/twentytwo.stp: New tests.
5792 2006-06-02 Josh Stone <joshua.i.stone@intel.com>
5794 * testsuite/buildok/process_test.stp: add signal_handle test
5795 * examples/small_demos/proc_snoop.stp: log signal_handle
5797 2006-06-02 Frank Ch. Eigler <fche@elastic.org>
5800 * stapprobes.5.in: Document "?" probe point suffix.
5801 * parse.cxx (parse_probe_point): Recognize "?" optional suffix.
5802 * elaborate.cxx (derive_probes): Observe probe_point->optional.
5803 * staptree.h, staptree.cxx: Corresponding changes.
5804 * tapsets.cxx (never_derived_probe, never_builder): New classes.
5805 (register_standard_tapsets): Support "never" probe point.
5806 * testsuite/buildok/six.stp, parseok/five.stp: Modifed tests.
5808 * translate.cxx (emit_module_init): Format "-t" (benchmarking)
5809 cycle-time reports similarly to "-v" (verbose) times.
5811 2006-06-02 David Smith <dsmith@redhat.com>
5813 * .cvsignore: Added more files to ignore.
5815 * main.cxx (usage): Added exitcode parameter.
5816 (main): Improved a few error messages. Also, when an error is
5817 given, stap now always exits with a status of 1.
5819 * testsuite/buildok/cmdline01.stp: New test.
5820 * testsuite/parseko/cmdline01.stp: Ditto.
5821 * testsuite/parseko/cmdline02.stp: Ditto.
5822 * testsuite/parseko/cmdline03.stp: Ditto.
5823 * testsuite/parseko/cmdline04.stp: Ditto.
5824 * testsuite/parseko/cmdline05.stp: Ditto.
5825 * testsuite/parseko/cmdline06.stp: Ditto.
5826 * testsuite/parseok/cmdline01.stp: Ditto.
5827 * testsuite/parseok/cmdline02.stp: Ditto.
5829 2006-06-01 Josh Stone <joshua.i.stone@intel.com>
5831 * tapsets.cxx (hrtimer_derived_probe::emit_interval): update
5832 API usage of hrtimers in preparation of getting exports from
5834 (hrtimer_derived_probe::emit_probe_entries): ditto
5836 2006-06-01 Li Guanglei <guanglei@cn.ibm.com>
5838 * parse.cxx, staptree.cxx, staptree.h, translate.cxx:
5839 add new function lket_trace_extra at script level
5840 * lket.5.in: Modified the description of backtrace in
5843 2006-05-29 Li Guanglei <guanglei@cn.ibm.com>
5845 * systemtap.spec.in: include lket-b2a in the rpm package
5847 2006-05-27 Li Guanglei <guanglei@cn.ibm.com>
5849 * configure.ac: add conditional build of lket-b2a
5850 if glib2-devel is not found, just skips and gives
5852 * Makefile.am: add conditional build of lket-b2a
5853 * Makefile.in, configure: regenerated
5854 * runtime/lket/b2a/Makefile: deleted. Should be
5855 generated by configure
5857 2006-05-26 Josh Stone <joshua.i.stone@intel.com>
5859 * tapsets.cxx (build_blacklist): build the sets of blacklisted
5860 functions and function returns. Manually added many __kprobes
5861 functions that should not be probed.
5862 (dwarf_query::dwarf_query): Call build_blacklist.
5863 (dwarf_query::blacklisted_p): Use blacklist sets.
5865 2006-05-25 Josh Stone <joshua.i.stone@intel.com>
5867 * parse.cxx (parser::scan_pp): Free memory for tokens that are
5868 thrown away in the preprocessing stage.
5870 (dwarf_var_expanding_copy_visitor::visit_target_symbol):
5871 Free allocated memory when supressing target-variable errors
5873 2006-05-25 David Smith <dsmith@redhat.com>
5875 * testsuite/semok/twentyone.stp: New file.
5877 2006-05-24 Frank Ch. Eigler <fche@elastic.org>
5880 * tapsets.cxx (derived_probe::emit_common_header): New
5881 function, to emit code formerly inlined by
5882 emit_probe_prologue/epilogue.
5883 * translate.cxx (emit_common_header): Call it.
5884 * elaborate.h: Corresponding changes.
5886 2006-05-24 David Smith <dsmith@redhat.com>
5888 * elaborate.cxx (isglob): New function.
5889 (match_key::globmatch): New function.
5890 (match_node::find_and_build): Uses isglob() and
5891 match_key::globmatch() to provide support for wildcards such as
5892 "kernel.syscall.*read*" (Bugzilla #1928).
5893 * elaborate.h (match_key::globmatch): Added function declaration.
5894 * parse.cxx (parser::parse_probe_point): Collects one or more
5895 tokens into a single probe-point functor string.
5897 * testsuite/parseko/twentytwo.stp: New file.
5898 * testsuite/parseok/sixteen.stp: New file.
5900 2006-05-24 David Smith <dsmith@redhat.com>
5902 * testsuite/parseko/cmdlinearg01.stp: New file.
5903 * testsuite/parseko/cmdlinearg02.stp: New file.
5904 * testsuite/parseko/eighteen.stp: New file.
5905 * testsuite/parseko/foreachstmt01.stp: New file.
5906 * testsuite/parseko/foreachstmt02.stp: New file.
5907 * testsuite/parseko/foreachstmt03.stp: New file.
5908 * testsuite/parseko/foreachstmt04.stp: New file.
5909 * testsuite/parseko/foreachstmt05.stp: New file.
5910 * testsuite/parseko/forstmt01.stp: New file.
5911 * testsuite/parseko/forstmt02.stp: New file.
5912 * testsuite/parseko/forstmt03.stp: New file.
5913 * testsuite/parseko/forstmt04.stp: New file.
5914 * testsuite/parseko/functiondecl01.stp: New file.
5915 * testsuite/parseko/functiondecl02.stp: New file.
5916 * testsuite/parseko/functiondecl03.stp: New file.
5917 * testsuite/parseko/functiondecl04.stp: New file.
5918 * testsuite/parseko/functiondecl05.stp: New file.
5919 * testsuite/parseko/functiondecl06.stp: New file.
5920 * testsuite/parseko/functiondecl07.stp: New file.
5921 * testsuite/parseko/ifstmt01.stp: New file.
5922 * testsuite/parseko/ifstmt02.stp: New file.
5923 * testsuite/parseko/nineteen.stp: New file.
5924 * testsuite/parseko/preprocess01.stp: New file.
5925 * testsuite/parseko/preprocess02.stp: New file.
5926 * testsuite/parseko/preprocess03.stp: New file.
5927 * testsuite/parseko/preprocess04.stp: New file.
5928 * testsuite/parseko/preprocess05.stp: New file.
5929 * testsuite/parseko/preprocess06.stp: New file.
5930 * testsuite/parseko/preprocess07.stp: New file.
5931 * testsuite/parseko/preprocess08.stp: New file.
5932 * testsuite/parseko/preprocess09.stp: New file.
5933 * testsuite/parseko/probepoint01.stp: New file.
5934 * testsuite/parseko/probepoint02.stp: New file.
5935 * testsuite/parseko/probepoint03.stp: New file.
5936 * testsuite/parseko/seventeen.stp: New file.
5937 * testsuite/parseko/ternarystmt01.stp: New file.
5938 * testsuite/parseko/twenty.stp: New file.
5939 * testsuite/parseko/twentyone.stp: New file.
5940 * testsuite/parseko/whilestmt01.stp: New file.
5941 * testsuite/parseko/whilestmt02.stp: New file.
5943 2006-05-24 Li Guanglei <guanglei@cn.ibm.com>
5945 * configure.ac: add lket.5 & runtime/lket/b2a
5946 * Makefile.am: add lket & runtime/lket/b2a
5947 * aclocal.m4, Makefile.in, configure: regenerated
5948 * runtime/lket/b2a/*: a binary to ascii converter used
5949 to convert LKET's default binary trace data.
5950 * lket.5.in: add intro of lket-b2a converter.
5952 2006-05-23 David Smith <dsmith@redhat.com>
5954 * parse.cxx (parse_for_loop): Corrected error message.
5956 2006-05-22 David Smith <dsmith@redhat.com>
5958 * elaborate.cxx (find_and_build): Fixed issue #2643. Wildcard
5959 code was being too optimistic.
5961 2006-05-22 Li Guanglei <guanglei@cn.ibm.com>
5963 * lket.in.5: draft version of manpage for LKET
5964 * Makefile.in, configure, stap.1.in: add lket.in.5
5966 2006-05-18 Frank Ch. Eigler <fche@elastic.org>
5968 Organize "-t" output by script/parse level probes rather than
5970 * elaborate.cxx (derived_probe ctor): Remove name field setting.
5971 (alias_derived_probe): New class.
5972 (alias_expandion_builder::build): Create an instance of the above
5973 instead of parse-tree-level plain probe.
5974 * elaborate.h: Corresponding changes.
5975 (derived_probe::basest): Define.
5976 * staptree.cxx (probe ctor): Set new name field.
5977 * staptree.h (probe): Corresponding changes.
5978 (probe::basest): New field.
5979 * tapsets.cxx (emit_probe_prologue, emit_probe_entries):
5980 Switch to basest() probe name for Stat instance.
5981 (dwarf_derived_probe ctor): Stash away base probe.
5982 * translate.cxx (unparser::emit_probe): Remove index
5983 operand, just use probe name to generate symbols.
5984 (emit_module_init): Reorganize -t output in unregister functions.
5985 (translate_pass): Remove unparser::current_probenum field and all
5987 * translate.h: Corresponding changes.
5989 2006-05-18 Li Guanglei <guanglei@cn.ibm.com>
5991 * tapset/LKET/*: tracing tapsets of LKET
5992 * tapset/context.stp: add stp_pid() func
5993 * tapset/ppc64/syscalls.stp: add conditional preprocessing
5994 since sys64_time is removed from kernel >= 2.6.16
5996 2006-05-18 Li Guanglei <guanglei@cn.ibm.com>
5998 * tapset/tskschedule.stp: deleted, merge into scheduler.stp
5999 * tapset/scheduler.stp: incorporate tskschedule.stp
6000 * testsuite/buildok/tskschedule.stp: deleted, merge into
6002 * testsuite/buildok/sched_test.stp: incorporate tskschedule.stp
6004 2006-05-17 Josh Stone <joshua.i.stone@intel.com>
6006 * testsuite/buildok/sched_test.stp: test scheduler tapset
6007 * examples/small_demos/sched_snoop.stp: demo scheduler tapset
6009 2006-05-18 Li Guanglei <guanglei@cn.ibm.com>
6011 * testsuite/buildok/ioscheduler.stp: testcase for ioscheduler.stp
6012 * testsuite/buildok/memory.stp: testcase for memory.stp
6013 * testsuite/buildok/networking.stp: testcase for networking.stp
6014 * testsuite/buildok/scsi.stp: testcase for scsi.stp
6015 * testsuite/buildok/tskschedule.stp: testcase for tskschedule.stp
6017 2006-05-18 Li Guanglei <guanglei@cn.ibm.com>
6019 * tapset/ioscheduler.stp: generic IO scheduler tapsets from LKET
6020 * tapset/memory.stp: generic pagefault tapsets from LKET
6021 * tapset/networking.stp: generic networking tapsets from LKET
6022 * tapset/scsi.stp: generic scsi tapsets from LKET
6023 * tapset/tskschedule.stp: generic task scheduler tapsets from LKET
6024 * tapset/process.stp: changes to process.exec alias
6026 2006-05-16 David Smith <dsmith@redhat.com>
6028 * parse.cxx (parser::parser): Added initializer for 'context'
6030 (tt2str): Added support for new tok_keyword type.
6031 (operator <<): Ignores keyword content when outputting error
6033 (lexer::scan): Recognizes keywords, such as 'probe', 'global',
6034 'function', etc. and classifies them as type 'tok_keyword'. This
6035 causes keywords to become reserved so they cannot be used for
6036 function names, variable names, etc.
6037 (parser::parse): Changed tok_identifier to tok_keyword when looking
6038 for "probe", "global", or "function". Also sets context member
6039 variable which remembers if we're in probe, global, function, or
6041 (parser::parse_probe, parser::parse_statement)
6042 (parser::parse_global, parser::parse_functiondecl)
6043 (parser::parse_if_statement, parser::parse_delete_statement)
6044 (parser::parse_break_statement, parser::parse_continue_statement)
6045 (parser::parse_for_loop, parser::parse_while_loop)
6046 (parser::parse_foreach_loop, parser::parse_array_in): Looks for
6047 tok_keyword instead of tok_identifier.
6048 (parser::parse_probe_point): Allows keywords as part of a probe
6049 name, since "return" and "function" are keywords.
6050 (parser::parse_return_statement): Looks for tok_keyword instead of
6051 tok_identifier. Make sure we're in function context.
6052 (parser::parse_next_statement): Looks for tok_keyword instead of
6053 tok_identifier. Make sure we're in probe context.
6054 * parse.h: Added parse_context enum. Added 'tok_keyword' to
6055 token_type enum. Added parse_context 'context' member variable to
6057 * stap.1.in: Because the string() function has been removed,
6058 the 'string()' function reference has been changed to a 'sprint()'
6060 * stapex.5.in: Ditto.
6061 * stapfuncs.5.in: The description of the string() and hexstring()
6062 functions has been removed.
6063 * testsuite/buildok/context_test.stp: Calls to the string()
6064 function were converted to sprint() function calls.
6065 * testsuite/buildok/fifteen.stp: Ditto.
6066 * testsuite/buildok/nineteen.stp: Ditto.
6067 * testsuite/buildok/process_test.stp: Ditto.
6068 * testsuite/buildok/task_test.stp: Ditto.
6069 * testsuite/buildok/timestamp.stp: Ditto.
6070 * testsuite/buildok/twentyone.stp: Ditto.
6071 * testsuite/semok/args.stp: Ditto.
6072 * testsuite/semok/seven.stp: Ditto.
6073 * testsuite/buildok/fourteen.stp: Calls to log()/string() were
6074 converted to a call to printf().
6075 * testsuite/buildok/sixteen.stp: Ditto.
6076 * testsuite/buildok/thirteen.stp: Ditto.
6077 * testsuite/buildok/twentythree.stp: Ditto.
6078 * testsuite/buildok/twentytwo.stp: Ditto.
6079 * testsuite/buildok/seven.stp: Calls to the string()
6080 function were converted to sprint() calls. Calls to the
6081 hexstring() function were converted to sprintf() calls.
6082 * testsuite/semok/eleven.stp: Ditto.
6083 * testsuite/buildok/seventeen.stp: Calls to log()/hexstring() were
6084 converted to a call to printf().
6085 * testsuite/semko/nineteen.stp: Ditto.
6086 * testsuite/parseok/three.stp: Because keywords are reserved, a
6087 variable named 'string' was renamed to 'str'.
6088 * testsuite/parseok/two.stp: Because keywords are reserved, a
6089 variable named 'global' was renamed to 'gbl'.
6090 * testsuite/transko/two.stp: Because the parser now checks for
6091 'next' and 'return' statement context, a 'next' statement was
6092 removed from a function and a 'return' statement was removed from
6095 2006-05-15 Frank Ch. Eigler <fche@elastic.org>
6097 * tapsets.cxx, translator.cxx (*): Designate more emitted
6098 functions as static.
6099 * translator.cxx (visit_print_format): Correct regression
6100 regression from two weeks ago.
6101 * stapfuncs.5.in: Tweak wording. Deprecate returnval() in favour
6104 2006-05-12 Thang P Nguyen <thang.p.nguyen@intel.com>
6106 * testsuite/buildok/probefunc.stp: test probefunc()
6108 2006-05-12 Frank Ch. Eigler <fche@elastic.org>
6110 * stapfuncs.5.in: Clarify backtrace-related functions.
6112 2006-05-11 David Smith <dsmith@redhat.com>
6114 * tapset/ctime.stp: New file.
6116 2006-05-09 Josh Stone <joshua.i.stone@intel.com>
6118 * examples/small_demos/proc_snoop.stp: monitor all process events.
6119 * testsuite/buildok/task_test.stp: test compilation of all task
6121 * testsuite/buildok/process_test.stp: test all process events and
6122 associated variables.
6124 2006-05-09 Will Cohen <wcohen@redhat.com>
6128 * parse.cxx: Add << operator for struct source_loc.
6129 * translate.cxx (emit_module_init): Print location of probe in script.
6131 2006-05-09 Li Guanglei <guanglei@cn.ibm.com>
6134 * main.cxx: add -M option to stop merge per-cpu files in bulk mode
6135 * session.h: add merge member into systemtap_session
6136 * buildrun.cxx: generate stpd_cmd to stop merge per-cpu files if -M
6137 option is turned on by stap.
6139 2006-05-08 Li Guanglei <guanglei@cn.ibm.com>
6142 * elaborate.cxx: epilogue style alias expansion
6143 * parse.cxx: parse += alias definition
6144 * staptree.h: add epilogue_style member to probe_alias
6145 * stap.1.in: add the description of epilogue style alias
6146 * testsuite/parseok/fifteen.stp: testcase for epilogue style alias
6148 2006-05-05 Roland McGrath <roland@redhat.com>
6150 * configure.ac (build_elfutils): Pass CFLAGS to elfutils configure,
6152 * configure: Regenerated.
6154 2006-05-05 Frank Ch. Eigler <fche@elastic.org>
6157 * testsuite/buildok/syscalls.stp: Take "-u" away again.
6158 * configure.ac, systemtap.spec.in: Bump version to 0.5.7.
6159 * configure: Regenerated.
6161 2006-05-05 Frank Ch. Eigler <fche@elastic.org>
6163 * configure.ac, systemtap.spec.in: Bump version to 0.5.6.
6164 * configure: Regenerated.
6166 2006-05-05 Will Cohen <wcohen@redhat.com>
6168 * small_demos/fileopen.stp: Shows use of target() to look at pid.
6169 * small_demos/rwtiming.stp: Shows per executable histograms of time
6170 spent in read and write system calls.
6172 2006-05-05 Eugene Teo <eteo@redhat.com>
6175 * tapsets.cxx (dwarf_query::blacklisted_p): Extend the list of
6176 blacklisted .return probes to include "do_exit". Correct funcname
6177 typo for "sys_groupexit".
6178 * tapset/syscalls.stp: Remove .return probe aliases of never-
6179 returning syscall.exit and syscall.exit_group calls.
6181 2006-05-05 David Smith <dsmith@redhat.com>
6183 * translate.cxx (mapvar::exists): Added code for string array
6184 handling. Otherwise, string array elements always exist.
6186 2006-05-03 Josh Stone <joshua.i.stone@intel.com>
6189 * tapsets.cxx (dwarf_query::blacklisted_p): skip probes in .exit.*
6191 2006-05-02 Will Cohen <wcohen@redhat.com>
6193 * translate.cxx (emit_module_init): Move closing '}' inside #ifdef.
6195 2006-05-02 Will Cohen <wcohen@redhat.com>
6198 * stap.1.in: Document "-t" option.
6199 * main.cxx (main): Add "-t" option for collecting timing information.
6200 * session.h (systemtap_session): Corresponding changes.
6201 * tapsets.cxx (emit_probe_prologue, emit_probe_epilogue,
6202 emit_probe_entries):
6203 * translate.cxx: (emit_common_header, emit_module_init,
6204 translate_pass): Add time collection of timing information.
6207 2006-05-01 Frank Ch. Eigler <fche@elastic.org>
6209 * translate.cxx (visit_print_format): Fix regression in
6210 "printf" pseudo-result initialization.
6212 2006-04-30 Frank Ch. Eigler <fche@elastic.org>
6215 * translate.cxx (c_unparser::visit_arrayindex, visit_stat_op):
6216 Detect empty aggregates consistently.
6217 (visit_print_format): Ditto. Also detect errors due to
6218 argument evaluation.
6219 (translator_output::*): Add a flush before a failing assert,
6220 to produce more context when debugging.
6222 2006-04-25 Frank Ch. Eigler <fche@elastic.org>
6224 * Makefile.am: Removed "rpm" target.
6225 * Makefile.in, aclocal.m4: Regenerated.
6227 2006-04-25 Frank Ch. Eigler <fche@elastic.org>
6229 * elaborate.cxx (typeresolution_info::unresolved,invalid,
6230 mismatch): Print current function/probe name in error message.
6231 (semantic_pass_types): Pass sufficient information.
6232 * elaborate.h: Corresponding changes.
6234 2006-04-25 Frank Ch. Eigler <fche@elastic.org>
6237 * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode):
6238 Support /* pure */ declaration. Stop using __tvar_ naming hack.
6239 (v_c_u::visit_print_format): Mark sprint and sprintf as
6241 (deep_copy_visitor::visit_print_format): Propagate raw_components.
6242 * stap.1.in: Document declaration.
6243 * elaborate.cxx (semantic_pass_opt2): Verbose message tweak.
6244 (dead_stmtexpr_remover): Extend for more aggressive optimization.
6245 * tapsets.cxx (dwarf,mark_var_expanding_copy_visotor): Add
6246 /* pure */ declaration to rvalue expansions.
6247 * tapset/*.stp: Added /* pure */ declarations to many functions.
6248 * testsuite/parseok/unparsers.stp: Propagate guru mode flag.
6249 * testsuite/buildok/twentyfour.stp: New test.
6251 2006-04-24 Frank Ch. Eigler <fche@elastic.org>
6254 * elaborate.cxx (visit_assignment): Tolerate null current_expr.
6255 * testsuite/semok/optimize.stp: Add relevant tests.
6257 2006-04-23 Eugene Teo <eteo@redhat.com>
6260 * translate.cxx (mapvar::set): Test _stp_map_set_xx() for
6263 2006-04-23 Eugene Teo <eteo@redhat.com>
6265 * small_demos/ansi_colors.stp: Add an example of using octal
6266 escape sequences to display all possible ansi colors.
6268 2006-04-21 Eugene Teo <eteo@redhat.com>
6271 * translate.cxx (c_unparser::visit_binary_expression): Handle
6272 negative left and right shift count.
6274 2006-04-21 Frank Ch. Eigler <fche@elastic.org>
6277 * elaborate.h (derived_probe): Add field "name". Stop passing
6278 "probe index" to other emit_* calls.
6279 (emit_probe_context_vars): New member function.
6280 * elaborate.cxx (derived_probe ctor): Generate unique name.
6281 * translate.cxx (*): Adapt to index->name.
6282 (emit_probe): Realize that probe locals only occur at nesting=0.
6283 * tapsets.cxx (*derived_probe::emit_*): Adapt to index->name.
6284 (mark_var_expanding_copy_visitor): New class to process $argN.
6285 (mark_derived_probe ctor): Call it.
6286 (mark_derived_probe::emit_probe_context_vars): Do it.
6287 * buildrun.cxx (compile_pass): Add more optional gcc verbosity.
6288 Add CFLAGS += -freorder-blocks.
6289 * testsuite/buildok/marker.stp: New test.
6291 2006-04-19 Eugene Teo <eteo@redhat.com>
6294 * parse.cxx (lexer::scan): Added \[0-7]* case to preserve
6295 octal escape sequences.
6297 2006-04-18 Martin Hunt <hunt@redhat.com>
6299 * Makefile.am (install-data-local): Another try.
6301 2006-04-18 Frank Ch. Eigler <fche@elastic.org>
6304 * translate.cxx (visit_statement): Tolerate 0 first argument.
6305 (visit_for_loop, visit_foreach_loop): Call it thusly for condition
6307 (visit_embededcode, visit_block, visit_null_statement): Don't
6308 call visit_statement() at all.
6310 2006-04-18 Martin Hunt <hunt@redhat.com>
6312 * Makefile.am (install-data-local): Tweak previous fix.
6313 (install-data-local):
6315 2006-04-18 Martin Hunt <hunt@redhat.com>
6317 * Makefile.am (install-data-local): Rewrite. Set
6318 ownership and permissions for all files and directories
6319 under runtime and tapset. Restrict files to source code.
6321 * Makefile.in: Rebuilt.
6323 2006-04-18 Eugene Teo <eteo@redhat.com>
6326 * main.cxx (main): Use TMPDIR instead of hard-coded /tmp.
6328 2006-04-17 Frank Ch. Eigler <fche@elastic.org>
6330 * tapsets.cxx (mark_derived_probe::emit_{de}registrations):
6331 Use cmpxchg to synchronize.
6333 2006-04-12 Tom Zanussi <zanussi@us.ibm.com>
6336 * buildrun.cxx (compile_pass): Remove space
6337 between -I and runtime path.
6339 2006-04-12 Martin Hunt <hunt@redhat.com>
6342 * translate.cxx (translate_pass): Don't
6343 reset STP_STRING_SIZE if it was already defined.
6344 Set it to 1024 by default.
6346 2006-04-10 Martin Hunt <hunt@redhat.com>
6348 * translate.cxx (visit_print_format): Call
6349 _stp_snprintf() instead of snprintf().
6351 2006-04-09 Martin Hunt <hunt@redhat.com>
6353 Add binary printf support.
6355 * elaborate.cxx (visit_print_format): Don't include
6356 conv_literal or conv_size in components vector.
6357 Add conv_binary to switch statement.
6359 * translate.cxx (visit_print_format): Eliminate
6360 special cast to (long long) for pe_long because new
6361 vsnprintf uses int64_t.
6363 * staptree.h (struct print_format): Add conv_binary and conv_size.
6365 * staptree.cxx (components_to_string): Add conv_binary case.
6367 (string_to_components): Add cases for 'b' and 'n'
6369 2006-04-08 Frank Ch. Eigler <fche@elastic.org>
6371 * tapsets.cxx (resolve_prologue_endings): Rewrote.
6372 (resolve_prologue_endings2): Removed.
6374 * gen-stapmark.h: Emit a 0-arity marker.
6375 * stapmark.h: Regenerated for arities 0..6.
6377 2006-04-04 Roland McGrath <roland@redhat.com>
6379 * configure.ac: Bump version to 0.5.5.
6380 Require elfutils-0.120.
6381 * configure: Regenerated.
6382 * systemtap.spec.in: Likewise.
6384 * main.cxx (version): Use dwfl_version.
6386 * loc2c.c (array_stride): stride_size -> byte_stride
6388 2006-04-04 Tom Zanussi <zanussi@us.ibm.com>
6390 * stp_check: Change test for relay vs relayfs
6392 2006-03-30 Martin Hunt <hunt@redhat.com>
6394 * tapsets.cxx (dwarf_derived_probe::emit_registrations):
6395 Change maxactive so single-processor kernels using
6396 kretprobes don't get lots of dropped probes.
6398 2006-03-30 Frank Ch. Eigler <fche@elastic.org>
6401 * tapsets.cxx: (mark_derived_probe*): New classes.
6402 (register_standard_tapsets): Register kernel/module.mark() family.
6403 * stapmark.h: New header for static instrumentation markers.
6404 * gen-stapmark.h: New perl script to generate it.
6405 * elaborate.cxx (derived_probe ctor): Ignore null location*.
6407 2006-03-29 Josh Stone <joshua.i.stone@intel.com>
6409 * tapsets.cxx (hrtimer_derived_probe::*): creates a probe point
6410 based on the hrtimer APIs.
6411 * tapsets.cxx (hrtimer_builder::*): parses the user's time-spec
6412 into a 64-bit nanosecond value, and calls the appropriate
6414 * tapsets.cxx (register_standard_tapsets): add hrtimer bindings
6415 * translate.cxx (translate_pass): add linux/random.h include,
6416 used for generating 64-bit random numbers for hrtimers.
6418 2006-03-28 Martin Hunt <hunt@redhat.com>
6420 * testsuite/buildok/syscall.stp: Update so
6423 2006-03-16 Tom Zanussi <zanussi@us.ibm.com>
6425 * configure.ac: Revert relayfs version check.
6426 * configure: Reverted.
6427 * translate.cxx (compile_pass): Remove relayfs include path.
6429 2006-03-15 Tom Zanussi <zanussi@us.ibm.com>
6431 * configure.ac: Add check for relayfs version.
6432 * configure: Regenerated.
6433 * stp_check.in: Remove bundled relayfs loading/compilation, add
6434 check for relay (vs relayfs).
6436 2006-03-13 Josh Stone <joshua.i.stone@intel.com>
6438 * safety/safety.py: Support IA64 disassembly matching.
6439 * safety/data/opcodes-ia64: new opcode rules for IA64.
6440 * safety/data/references: Add references used by example scripts
6441 when compiled for IA64.
6443 2006-03-13 Frank Ch. Eigler <fche@elastic.org>
6445 * translate.cxx (emit_globals): Tag globals, especially the locks,
6446 as __cacheline_aligned.
6448 2006-03-09 Frank Ch. Eigler <fche@elastic.org>
6450 * translate.cxx (emit_locks): Emit dummy references to unlock_ ...
6451 (emit_module_init): ... and probe_point.
6453 2006-03-06 Frank Ch. Eigler <fche@elastic.org>
6456 * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode):
6457 Realize that $var-setter functions have side-effects.
6458 * testsuite/transok/tval-opt.stp: New test.
6460 2006-03-06 Martin Hunt <hunt@redhat.com>
6462 * buildrun.cxx (run_pass): Add "-u username".
6463 * stapfuncs.5.in: Document system().
6465 2006-03-06 Frank Ch. Eigler <fche@elastic.org>
6467 * stapex.5.in: Use \[aq] for plain single quotes for encoding
6468 variation tolerance.
6470 2006-03-03 Josh Stone <joshua.i.stone@intel.com>
6472 * main.cxx (main): search forward for dashes in the kernel release,
6473 to work properly with release names with more than one dash. Also
6474 * parse.cxx (eval_pp_conditional): ditto
6475 * tapsets.cxx (profile_derived_probe::profile_derived_probe): ditto
6476 * safety/safety.py (StaticSafety::__build_search_suffixes): ditto,
6477 and add copyright & GPL tag
6480 * main.cxx (main): expand search path so that revision w.x.y.z
6481 searches w.x.y.z, w.x.y, and w.x.
6483 2006-03-03 Frank Ch. Eigler <fche@elastic.org>
6485 * tapset/indent.stp, indent-default.stp: New little tapset.
6486 * stapfuncs.5.in: Document it.
6487 * testsuite/buildok/indent.stp: Build it.
6489 2006-02-27 Josh Stone <joshua.i.stone@intel.com>
6491 * safety/*: Add a static safety checker.
6493 2006-02-25 Frank Ch. Eigler <fche@elastic.org>
6495 * translate.cxx (var::init): Don't crush string module_params.
6496 (emit_global_param): New function, forked out of emit_global,
6497 to put module_param calls at the bottom of C file.
6498 * translate.h: Corresponding changes.
6500 2006-02-23 Frank Ch. Eigler <fche@elastic.org>
6503 * parse.cxx (lexer): Take systemtap_session argument.
6504 (lexer::scan): Support $1..$NNNN and @1...@NNNN expansion.
6505 * stap.1.in: Document this.
6506 * testsuite/semok/args.stp: New test.
6507 * translate.cxx (var::init, emit_global): Emit code to allow
6508 named module parameters to initialize global string/number scalars.
6509 * stap.1.in: Don't document this yet.
6512 * main.cxx (main): Clarify "-v" option repeatibility.
6515 2006-02-23 Roland McGrath <roland@redhat.com>
6517 * Makefile.am (AUTOMAKE_OPTIONS): New variable, set dist-bzip2.
6518 * Makefile.in: Regenerated.
6520 2006-02-23 Martin Hunt <hunt@redhat.com>
6522 PR 1989. Adds support for %p in printf
6523 * staptree.h (struct print_format): Add conv_unsigned_ptr.
6524 * staptree.cxx (components_to_string): Output 'p'
6525 for conv_unsigned_ptr.
6526 * elaborate.cxx (visit_print_format): Add case for
6529 2006-02-23 Martin Hunt <hunt@redhat.com>
6531 * Makefile.am (install-data-local): Create tapset/i686 and
6532 tapset/x86_64 directories. This fixes a problem where they
6533 were included, but had bad permissions.
6534 * Makefile.in: Rebuilt.
6536 2006-02-22 Frank Ch. Eigler <fche@elastic.org>
6538 * stapfuncs.5.in: Document get_cycles().
6539 * testsuite/buildok/timestamp.stp: Build it and its friends.
6541 2006-02-22 Frank Ch. Eigler <fche@elastic.org>
6544 * tapsets.cxx (emit_probe_epilogue): Emit early local_irq_save().
6545 (emit_probe_epilogue): ... and matching _restore().
6547 * main.cxx (main): Emit a "hello, I'm starting" message
6548 before pass 5 in verbose mode.
6550 2006-02-17 Frank Ch. Eigler <fche@elastic.org>
6552 * stapfuncs.5.in (cpu): Document contextinfo function.
6554 2006-02-15 Frank Ch. Eigler <fche@elastic.org>
6556 * translate.cxx (varlock*): Removed now unnecessary class.
6557 (aggregation_locks): Renamed field to aggregations_active.
6559 2006-02-14 Frank Ch. Eigler <fche@elastic.org>
6561 * stapfuncs.5.in: Document new queue_stats tapset.
6562 * elaborate.cxx (*): Put "while:" clarification messages before a
6563 thrown semantic error.
6564 * staptree.cxx (print_format::string_to_components): Correct
6565 parse of "%%" formatting element.
6567 2006-02-07 Frank Ch. Eigler <fche@elastic.org>
6569 * src/testsuite/buildok/syscalls.stp: Build with "-u" to build-test
6570 all auxiliary functions.
6571 * tapsets.cxx (dwarf_query::add_probe_point): Add some "-vv" output.
6573 2006-02-07 Josh Stone <joshua.i.stone@intel.com>
6576 * tapsets.cxx (dwarf_query::blacklisted_p): add __switch_to
6577 to the blacklist for x86_64 architecture only.
6579 2006-02-06 Will Cohen <wcohen@redhat.com>
6581 * tapset/syscall2.stp: Correct opening comment typo.
6583 2006-02-06 Will Cohen <wcohen@redhat.com>
6585 * tapset/syscall2.stp: Correct closing comment typos.
6587 2006-02-01 Frank Ch. Eigler <fche@elastic.org>
6589 * testsuite/semko/one.stp: Make sure test case stays broken.
6591 2006-02-01 Martin Hunt <hunt@redhat.com>
6593 * stapfuncs.5.in: Document is_return(), returnval() and
6595 * testsuite/buildok/syscall.stp: Basic syscall test.
6597 2006-02-01 Frank Ch. Eigler <fche@elastic.org>
6599 * configure.ac, systemtap.spec.in: Version 0.5.4.
6600 * configure: Regenerated.
6602 2006-01-31 Josh Stone <joshua.i.stone@intel.com>
6605 * translate.cxx (translate_pass): Fix legacy definition of
6608 2006-01-30 Frank Ch. Eigler <fche@elastic.org>
6610 * main.cxx (main): Also print elapsed real time for each pass.
6612 2006-01-27 Frank Ch. Eigler <fche@elastic.org>
6614 * main.cxx: Make "-v" (verbose) flag a counter.
6615 * stap.1.in: Document this.
6616 * session.h: Corresponding changes.
6617 * {elaborate,buildrun,tapsets,translate}.cxx: Update all uses of
6618 verbose flag to compare it to sensible level for value of message.
6620 2006-01-27 Frank Ch. Eigler <fche@elastic.org>
6622 * main.cxx (main): In verbose mode, print user+sys times after
6624 * buildrun.cxx (compile_pass): Move success message back to main().
6626 2006-01-26 Frank Ch. Eigler <fche@elastic.org>
6628 PR 2060: lock elevation, mop-up
6629 * staptree.cxx (functioncall_traversing_visitor): Store a
6630 current_function pointer during traversal.
6631 (visit_embeddedcode): Use it to handle $target-synthesized functions.
6632 (varuse_collecting_visitor::visit_assignment): Correct l-lr typo.
6633 (visit_foreach_loop): Note added write on sorted foreach.
6634 (visit_delete_statement): Note as read+write.
6635 * staptree.h: Corresponding changes.
6636 * elaborate.cxx (dead_assignment_remover::visit_expr_statement):
6637 Correct stmt token after possible expression rewriting.
6638 * tapsets.cxx (visit_target_symbol): Create naming convention
6639 to recognize $target-synthesized functions.
6640 * translate.cxx (emit_locks, emit_unlocks): New functions to
6641 emit lock/unlock sequences at the outermost level of a probe.
6642 (emit_probe): Call them.
6643 (varlock_*): #if-0 out the lock code generation. Later, these
6644 classes should be removed.
6645 (translate_pass): Emit read_trylock() kludge macro for old kernels.
6647 2006-01-25 Frank Ch. Eigler <fche@elastic.org>
6649 PR 2205, patch from <hiramatu@sdl.hitachi.co.jp>:
6650 * parse.cxx (scan): Correct EOF detection for %{ %} case.
6652 2006-01-24 Frank Ch. Eigler <fche@elastic.org>
6655 * tapsets.cxx (visit_target_symbol): Tolerate failed resolution by
6656 letting target_symbol instance pass through to optimizer and
6658 * elaborate.cxx (semantic_pass_optimize): New family of functions and
6659 associated visitor classes.
6660 (visit_for_loop): Tolerate absent init/incr clauses.
6661 (semantic_pass): Invoke unless unoptimized (-u) option given.
6662 * main.cxx, session.h: Add support for flag.
6663 * staptree.cxx (visit_for_loop): Tolerate absent init/incr clauses.
6664 (traversing_visitor::visit_arrayindex): Visit the index expressions.
6665 (functioncall_traversing_visitor): New class.
6666 (varuse_tracking_visitor): New class.
6667 * staptree.h: Corresponding changes.
6668 * parse.cxx (parse_for_loop): Represent absent init/incr expressions
6669 with null statement pointer instead of optimized-out dummy numbers.
6670 * stap.1.in: Document optimization.
6671 * testsuite/{semko,transko}/*.stp: Added "-u" or other code to many
6672 tests to check bad code without optimizer elision.
6673 * testsuite/semok/optimize.stp: New test.
6675 * elaborate.cxx (unresolved, invalid, mismatch): Standardize error
6677 * stapfuncs.5.in: Tweak print/printf docs.
6678 * tapset/logging.stp: Remove redundant "print" auxiliary function,
6679 since it's a translator built-in.
6680 * testsuite/transok/five.stp: Extend test.
6681 * translate.cxx (emit_symbol_data): Put symbol table into a separate
6682 temporary header file, to make "-p3" output easier on the eyes.
6683 * buildrun.cxx (compile_pass): Eliminate test-mode support throughout.
6684 * main.cxx, session.h, translate.cxx: Ditto.
6685 * main.cxx (main): For last-pass=2 runs, print post-optimization ASTs.
6687 2006-01-18 Josh Stone <joshua.i.stone@intel.com>
6689 * tapsets.cxx (profile_derived_probe::emit_probe_entries): Setup
6690 c->regs properly in light of the emit_probe_prologue change.
6692 2006-01-18 Josh Stone <joshua.i.stone@intel.com>
6694 * translate.cxx (c_unparser::visit_foreach_loop): improved the error
6695 message when _stp_pmap_agg fails.
6697 2006-01-18 Frank Ch. Eigler <fche@elastic.org>
6699 * translate.cxx (c_unparser_assignment::visit_arrayindex):
6700 Eliminate dummy assignments for "<<<" code.
6702 2006-01-17 Josh Stone <joshua.i.stone@intel.com>
6705 * testsuite/buildok/pmap_foreach.stp: Add test with sorting
6707 2006-01-17 Josh Stone <joshua.i.stone@intel.com>
6710 * translate.cxx (c_unparser::visit_foreach_loop): Check the return
6711 value of _stp_pmap_agg() for NULL.
6713 2006-01-17 Frank Ch. Eigler <fche@elastic.org>
6715 * systemtap.spec.in: Remove explicit kernel-devel dependency,
6716 since some old kernel rpm builds don't virtual-provide it for
6719 2006-01-17 Frank Ch. Eigler <fche@elastic.org>
6722 * translate.cxx (EXTRACTORS_PERMISSIVE): New experimental policy
6724 (c_unparser::visit_arrayindex, visit_print_format, visit_stat_op):
6725 Tolerate absent index (= NULL runtime return) in pmap.
6726 (*): Make semantic_error messages consistently lower case.
6727 * testsuite/buildok/iterate_histogram_buckets.stp: Note some missing
6730 2006-01-17 Josh Stone <joshua.i.stone@intel.com>
6732 * stap.1.in: Document the 'delete' operator.
6734 2006-01-16 Roland McGrath <roland@redhat.com>
6736 * systemtap.spec.in (elfutils_version): Require 0.119 now.
6737 * configure.ac, systemtap.spec.in: Version 0.5.3.
6738 * configure: Regenerated.
6740 2006-01-16 Josh Stone <joshua.i.stone@intel.com>
6743 * translate.cxx (mapvar::del): Add ability to delete an indexed stat
6745 (delete_statement_operand_visitor::visit_symbol): Add ability to
6746 delete entire pmaps and scalars.
6747 (delete_statement_operand_tmp_visitor): Add a special tmpvar visitor
6748 to parallel delete_statement_operand_visitor.
6749 (c_tmpcounter::visit_delete_statement): Invoke the new visitor.
6750 * testsuite/buildok/delete.stp: Also test scalar deletes.
6751 * vim/syntax/stap.vim: Recognize 'delete' operator.
6753 2006-01-15 Frank Ch. Eigler <fche@elastic.org>
6756 * translate.cxx (MAXERRORS): Actually the max should be 0, so first
6757 error aborts session.
6759 2006-01-13 Frank Ch. Eigler <fche@elastic.org>
6761 * main.cxx (main): Suppress "Try again with -v" message if already
6764 2006-01-13 Frank Ch. Eigler <fche@elastic.org>
6766 * translate.cxx (c_unparser:getmap): Correct exception throwing typo.
6768 2006-01-12 Josh Stone <joshua.i.stone@intel.com>
6771 * translate.cxx (c_unparser::aggregation_locks): Keeps track of
6772 foreach's locks on pmaps to avoid extra aggregation.
6773 (c_unparser::visit_foreach_loop): Set aggregation_locks appropriately.
6774 (c_unparser::load_aggregate, mapvar::call_prefix, mapvar::get):
6775 Use a new parameter to indicate that we should read from the
6776 already-aggregated map rather than the full pmap..
6777 (c_unparser::visit_arrayindex c_unparser::visit_print_format,
6778 c_unparser::visit_stat_op): Use aggregation_locks to avoid taking a
6779 lock and aggregating the pmap.
6780 (c_unparser::emit_map_type_instantiations): To read from a pmap's
6781 aggregated map, we need to include map-gen.c for the _stp_map_*
6783 (c_unparser::obtained_locks, varlock::varlock, varlock::~varlock):
6784 Add simple static checking to detect incompatible nested locks during
6785 translation, and flag it as an error.
6787 2006-01-11 Josh Stone <joshua.i.stone@intel.com>
6790 * testsuite/buildok/delete.stp: Test correct compilation of the
6791 'delete' operator for all "legal" variations.
6793 2006-01-11 Frank Ch. Eigler <fche@elastic.org>
6795 * translate.cxx (MAXERRORS): Oops, set back to intended default of 1.
6797 2006-01-10 Frank Ch. Eigler <fche@redhat.com>
6800 * tapsets.cxx (var_expanding_copy_visitor::visit_target_symbol):
6801 Produce error message for $var access within .return probes.
6802 * testsuite/semko/thirtyfour.stp: New test.
6804 2006-01-10 Frank Ch. Eigler <fche@redhat.com>
6807 * buildrun.cxx (compile_pass): Add "V=1" to kbuild if verbose.
6808 * translate.cxx (translator_output): For output-file constructor,
6809 set an explicit output buffer.
6810 (emit_module_init, emit_module_exit): Reorganize output, to spit
6811 each individual probe registration/deregistration blurb into a
6813 * translate.h: Corresponding changes; set default buffer size to 8K.
6814 * translate.cxx, tapsets.cxx: Replace "endl" by buffer-friendly "\n"
6815 throughout code generation routines.
6817 2006-01-09 Frank Ch. Eigler <fche@redhat.com>
6819 * HACKING: Extend guidelines for tapset testing.
6821 2006-01-06 Will Cohen <wcohen@redhat.com>
6823 * Makefile.am (gcov,lcov): Don't remove .gcno .gcda files.
6824 * Makefile.am (gcov): Fix to report data when tests fail.
6825 * Makefile.am (lcov): New rule to generate html coverage data.
6826 * Makefile.in: Regenerated.
6828 2006-01-05 Josh Stone <joshua.i.stone@intel.com>
6831 * translate.cxx (var::~var, var::hist, var::buckets): make these
6832 methods virtual, so we can use polymorphism.
6833 (mapvar::hist, mapvar::buckets): Override the corresponding var
6834 methods to handle pmaps correctly.
6835 (c_unparser::visit_arrayindex, c_unparser::visit_print_format): Make
6836 use of the new polymorphic behavior of var & mapvar when dealing with
6838 * testsuite/buildok/pmap_foreach.stp: Add tests to check histogram
6839 accesses with for/foreach.
6841 2006-01-04 Frank Ch. Eigler <fche@elastic.org>
6844 * translate.cxx (c_unparser_assignment::visit_arrayindex): Don't take
6845 write lock around pmap accumulation.
6847 2006-01-04 Will Cohen <wcohen@redhat.com>
6849 * testsuite/buildok/printf.stp: Improve test coverage.
6851 2006-01-03 Frank Ch. Eigler <fche@redhat.com>
6853 * tapsets.cxx (emit_deregistration): Fix bad thinko on loop nesting.
6855 2006-01-03 Frank Ch. Eigler <fche@redhat.com>
6858 * tapsets.cxx (emit_probe_prologue, _epilogue): New routines.
6859 Call from existing derived_probe spots. Implement soft errors in
6860 epilogue code. Implement reentrancy detection in prologue code.
6861 (dwarf_derived_probe::emit_deregistration): Add kprobes layer
6862 "nmissed" to skipped_count.
6863 * translate.cxx (varlock): Use nsleep(TRYLOCKDELAY) in lock
6865 (emit_module_exit): Report number of soft errors and skipped probes.
6866 (emit_function, _probe): Add __restrict__ marker to context pointer.
6867 (translate_pass): Define new MAXTRYLOCK, TRYLOCKDELAY, MAXERRORS,
6868 MAXSKIPPED parameters.
6869 * tapset/logging.stp (error): Don't stp_error, just set context state.
6870 * stap.1.in, stapfuncs.5.in: Document soft errors.
6871 * elaborate.h: Corresponding changes.
6873 2005-12-23 Kevin Stafford <krstaffo@us.ibm.com>
6875 * tapset/2.6.9-20.ELsmp/syscalls.stp: added kernel
6877 * tapset/2.6.9-20.ELsmp/i686/syscalls.stp: added kernel
6878 version arch specific tapset
6879 * tapset/doc/discrepancies.txt: log of kernel version
6882 2005-12-22 Roland McGrath <roland@redhat.com>
6884 * configure.ac: Pass LDFLAGS to elfutils configure to force DT_RUNPATH.
6885 * configure: Regeneraed.
6887 2005-12-21 Josh Stone <joshua.i.stone@intel.com>
6890 * translate.cxx (itervar::next): emit different code for pmaps
6892 2005-12-21 Frank Ch. Eigler <fche@elastic.org>
6894 * loc2c.h: Add __attribute__ defeating code for g++ 3.3 compatibility.
6896 2005-12-20 Josh Stone <joshua.i.stone@intel.com>
6898 * vim/filetype.vim: defines *.stp files as SystemTap scripts
6899 * vim/ftplugin/stap.vim: sets the comment styles
6900 * vim/indent/stap.vim: enables simple auto-indenting
6901 * vim/syntax/stap.vim: defines syntax highlighting
6903 2005-12-19 Roland McGrath <roland@redhat.com>
6905 * configure.ac, systemtap.spec.in: Version 0.5.2.
6906 * configure: Regenerated.
6908 2005-12-17 Roland McGrath <roland@redhat.com>
6910 * staptree.h: #include <cassert> here.
6912 2005-12-14 Kevin Stafford <krstaffo@us.ibm.com>
6914 * tapset/2.6.14/syscalls.stp: Added 2.6.14 syscalls to tapset.
6915 * 2.tapset/6.14/i686/syscalls.stp: Added i386 arch specific syscalls
6916 to tapset for kernel 2.6.14.
6917 * tapset/2.6.9-24.ELsmp/syscalls.stp: Added 2.6.9-24.ELsmp syscalls.
6918 * tapset/2.6.9-24.ELsmp/x86_64/syscalls.stp: Added x86_64 arch
6919 specific syscalls to tapset for kernel 2.6.9-24.ELsmp.
6920 * tapset/system_calls.stp: File removed.
6922 2005-12-14 Martin Hunt <hunt@redhat.com>
6924 * tapset/system_calls.stp (epoll.ctl): Temporarily remove
6925 references to $op and $event because gcc 4.0.2 can't
6927 (epoll.wait): Ditto for $maxevents.
6929 2005-12-13 Frank Ch. Eigler <fche@redhat.com>
6931 * tapsets.cxx (var_expanding_copy_visitor::visit_target):
6932 Transcribe token pointer to synthesized functiondecl.
6934 2005-12-12 Josh Stone <joshua.i.stone@intel.com>
6936 * tapset/context.stp
6937 (execname,pid,tid,ppid,pexecname,gid,egid,uid,euid): Removed
6938 in_interrupt checks and other pointer checks. We now operate on
6939 the assumption that "current" and its related data are always
6941 * tapsets.cxx (profile_derived_probe::*,profile_builder::build):
6942 Do kernel version checks at translation time, using the same
6943 internal mechanisms as the preprocessor - a la %( kernel_v <
6944 "2.6.10" %? ... %: ... %)
6946 2005-12-12 Kevin Stafford <krstaffo@us.ibm.com>
6948 * main.cxx (main): Added arch directory to the existing
6949 kernel-version-sensitive search path.
6951 2005-12-12 Frank Ch. Eigler <fche@redhat.com>
6953 * translate.cxx (translate_pass): Emit #include <linux/profile.h>.
6955 2005-12-12 Will Cohen <wcohen@redhat.com>
6957 * tapset/logging.stp (function_exit): Make sure systemtap probes
6958 stop collection additional data.
6960 2005-12-12 Frank Ch. Eigler <fche@redhat.com>
6962 Fix parse tree pretty-printer.
6963 * staptree.h (print_format): Add raw_components field.
6964 * parse.cxx (parse_symbol): Set it.
6965 * staptree.cxx (lex_cast_qstring): Copy it here too.
6966 (binary_expression::print): Add a space around operator, due to
6967 lexical ambiguity (expr % paren-expr) vs %( preprocessor op.
6968 (array_in:: foreach_loop:: arrayindex::print): Print base as indexable.
6969 (print_format::string_to_components): Use parse_error, not semantic.
6970 (print_format::print): Properly quote formatting string. Print
6972 * translate.cxx (visit_print_format): Properly quote formatting string.
6973 (varlock): Reword lock timeout error message.
6974 * testsuite/buildok/printf.stp: Add some quoting troublemakers.
6975 * testsuite/parseok/unparser.stp: New file.
6977 2005-12-11 Roland McGrath <roland@redhat.com>
6979 * configure.ac: Bump version to 0.5.1 for test builds.
6980 * systemtap.spec.in: Remove ExclusiveArch.
6981 * configure: Regenerated.
6984 * configure.ac: Grok --with-elfutils.
6985 * Makefile.am [BUILD_ELFUTILS] (install-elfutils, stamp-elfutils):
6987 [BUILD_ELFUTILS] (stap_LDFLAGS, stap_LDFLAGS): Add flags
6988 to point at local elfutils build.
6989 [BUILD_ELFUTILS] (BUILT_SOURCES): Add stamp-elfutils.
6990 [BUILD_ELFUTILS] (stap_DEPENDENCIES): New variable.
6991 [BUILD_ELFUTILS] (lib-elfutils/libdw.so): New target.
6992 [BUILD_ELFUTILS] (install-exec-local): Depend on install-elfutils.
6993 (loc2c_test_LDADD): Set this to $(stap_LDADD).
6994 (loc2c_test_CPPFLAGS, loc2c_test_LDFLAGS): New variables.
6995 * Makefile.in: Regenerated.
6996 * compile: New file from automakeland.
6997 * systemtap.spec.in (elfutils_version): Require 0.118 or later.
6998 [bundled_elfutils]: Remove old hacks for building elfutils, and rely
6999 on configure --with-elfutils instead.
7001 * Makefile.am (pkglibexecdir): New variable.
7002 (AM_CPPFLAGS): Use it.
7003 (pkglibexec_PROGRAMS): Set this instead of noinst_PROGRAMS with stpd.
7004 (pkglibexec_SCRIPTS, CLEANFILES): New variables.
7005 (install-exec-local): Target removed.
7006 * runtest.sh: Set LD_LIBRARY_PATH when lib-elfutils is in use.
7008 * loc2c-test.c (get_location): Fix function name in error message.
7010 2005-12-09 Graydon Hoare <graydon@redhat.com>
7012 * elaborate.cxx (alias_expansion_builder::build): Fix comment typo.
7013 * tapsets.cxx (symbol_cache): New class.
7014 (dwflpp::cache): Add cache.
7015 (dwflpp::pattern_limited_cus): New member.
7016 (dwflpp::pattern_limited_funcs): New member.
7017 (dwflpp::limit_search_to_function_pattern): New method.
7018 (dwflpp::iterate_over_cus): Modify to use cached, limited sets.
7019 (dwflpp::iterate_over_functions): Likewise.
7020 (dwarf_builder::user_dw): New member.
7021 (dwarf_builder::kern_dw): New member.
7022 (dwarf_builder::~dwarf_builder): Add dtor.
7023 (query_module): Call dwflpp::limit_search_to_function_pattern.
7024 (dwarf_builder::build): Initialize persistent dwflpp members on demand.
7026 2005-12-08 Graydon Hoare <graydon@redhat.com>
7028 * translate.cxx (delete_statement_operand_visitor::visit_arrayindex):
7029 Prohibit deleting histogram buckets.
7030 (c_tmpcounter::visit_array_in): Direct to visit_arrayindex.
7031 (c_unparser::visit_array_in): Likewise.
7033 * testsuite/buildok/histogram_operator_in.stp: New test.
7035 2005-12-08 Frank Ch. Eigler <fche@elastic.org>
7038 * buildrun.cxx (run_pass): Pass new "-d PID" option to stpd.
7039 Set SIGHUP to SIG_IGN too.
7041 2005-12-07 Graydon Hoare <graydon@redhat.com>
7043 * staptree.cxx (traversing_visitor::visit_foreach_loop): Visit
7044 the base indexable of the foreach loop.
7046 * translate.cxx (c_tmpcounter::visit_foreach_loop): Implement
7047 histogram bucket iteration arm.
7048 (c_unparser::visit_foreach_loop): Likewise.
7049 (c_tmpcounter::visit_arrayindex): Fix typo.
7051 * testsuite/buildok/iterate_histogram_buckets.stp: New test.
7053 2005-12-07 Martin Hunt <hunt@redhat.com>
7055 * translate.cxx (mapvar::fini): Use _stp_pmap_del() on pmaps.
7056 (emit_global): For pmaps, use "PMAP" instead of "MAP".
7058 2005-12-06 Frank Ch. Eigler <fche@elastic.org>
7061 * tapsets.cxx (resolve_prologue_endings2): Add new heuristic for
7062 tail-call optimized functions.
7063 (query_func_info): Make somewhat less verbose.
7065 2005-12-06 Graydon Hoare <graydon@redhat.com>
7067 * translate.cxx (visit_print_format): Explicitly Cast int64_t
7068 (pe_long) args to (long long) in generated code, for portability.
7070 2005-12-05 Frank Ch. Eigler <fche@elastic.org>
7072 * *.cxx: Add <cassert> #include as needed.
7074 2005-12-02 Graydon Hoare <graydon@redhat.com>
7076 * elaborate.cxx (mutated_var_collector): Forward
7077 traversal portion of calls to base class.
7078 (mutated_var_collector::visit_arrayindex): Resolve
7079 arrayindex-into-histogram expression as pe_long.
7080 (typeresolution_info::visit_print_format): Traverse
7081 into histogram if present.
7083 * parse.cxx (parse_symbol): Handle parse ambiguity surrounding
7084 print(@hist_op(...)[...]).
7086 * staptree.cxx (traversing_visitor::visit_arrayindex): Visit
7087 base member of arrayindex.
7089 * translate.cxx (c_unparser::histogram_index_check): New method.
7090 (var::hist): Fix bug.
7091 (var::buckets): New method.
7092 (stmt_expr::stmt_expr): Print with newline.
7093 (c_unparser::load_map_indices): Handle indexing-histogram case.
7094 (c_tmpcounter::visit_arrayindex): Likewise.
7095 (c_unparser::visit_arrayindex): Likewise.
7096 (c_tmpcounter_assignment::visit_arrayindex): Throw error when
7097 user attempts to write to histogram bucket.
7098 (c_unparser_assignment::visit_arrayindex): Likewise.
7100 * testsuite/buildok/print_histogram_entry.stp: New test.
7102 2005-12-02 Frank Ch. Eigler <fche@elastic.org>
7104 * configure.ac: Bump version number.
7105 * stap.1.in: Document some of the new print/stats stuff.
7106 * configure: Regenerated.
7107 * systemtap.spec.in: Enable ia64 and ppc builds.
7109 2005-12-01 Frank Ch. Eigler <fche@elastic.org>
7111 PR 1944 improved hack.
7112 * translator.cxx (c_tmpcounter::visit_block): New routine, allows
7113 overlay of sequential statements' temporaries within context.
7115 2005-12-01 Frank Ch. Eigler <fche@redhat.com>
7118 * translator.cxx (translate_pass): Reduce default MAXNESTING to 10.
7119 (emit_module_init): Add a paranoid check against oversize contexts.
7120 * stap.1.in: Document MAXNESTING change.
7122 2005-11-30 Frank Ch. Eigler <fche@redhat.com>
7125 From Josh Stone <joshua.i.stone@intel.com>:
7126 * tapsets.cxx (profile_derived_probe, profile_builder,
7127 register_standard_tapsets): Support timer.profile variety.
7128 * stapprobes.5.in: Document it.
7129 * testsuite/builok/fourteen.stp: Test its buildability.
7131 2005-11-28 Graydon Hoare <graydon@redhat.com>
7133 * translate.cxx (var::assert_hist_compatible): New method.
7134 (var::hist): New method.
7135 (c_unparser::load_aggregate): New method.
7136 (hist_op_downcaster): Remove, it was a mistake.
7137 (expression_is_hist_op): Likewise.
7138 (c_tmpcounter::visit_print_format): Implement print(@hist(...)).
7139 (c_unparser::visit_print_format): Likewise.
7141 * staptree.h (struct print_format): Add optional hist_op* member.
7142 * staptree.cxx (traversing_visitor::visit_functioncall): Visit
7143 hist_op if present in print_format.
7144 (deep_copy_visitor::visit_print_format): Likewise.
7146 * parse.cxx (parse_symbol): Special case to consume print(@hist(...)).
7148 * elaborate.cxx (typeresolution_info::visit_arrayindex): Fix type inference bug.
7149 (typeresolution_info::visit_foreach_loop): Likewise.
7151 * testsuite/buildok/print_histograms.stp: New test.
7153 2005-11-28 Frank Ch. Eigler <fche@redhat.com>
7155 * translate.cxx (c_tmpcounter_assignment::visit_symbol): Don't
7156 emit unused temporary into context. Saves mucho space with strings.
7158 2005-11-27 Roland McGrath <roland@redhat.com>
7160 * loc2c.c (location_from_address): Diagnose null FB_ATTR specially.
7162 * loc2c.c (location_from_address): Fix function name in error message.
7164 2005-11-27 Frank Ch. Eigler <fche@elastic.org>
7166 * loc2c.c (location_from_address): Tolerate errors with NULL *input.
7168 2005-11-26 Roland McGrath <roland@redhat.com>
7171 * loc2c.c (struct location): Move frame_base member out of the union.
7172 (alloc_location): Initialize it.
7173 (new_synthetic_loc, translate, location_from_address): Update uses.
7174 (emit_loc_value): Don't handle frame_base here.
7175 (c_emit_location): Do it here instead.
7176 (translate): Track USED_DEREF separately for each piece.
7177 Use a temporary struct when allocating a new piece, letting
7178 a pending loc_address piece finish up first.
7180 * loc2c-test.c (main): Free SCOPES at end.
7181 (handle_variable): Free POOL at end.
7183 * loc2c.c (translate): Initialize LOC->address.used_deref at start.
7185 2005-11-25 Frank Ch. Eigler <fche@elastic.org>
7188 * tapsets.cxx (translate_final_fetch_or_store): Remove apparently
7190 * testsuite/transok/ten.stp: New test for void* integerification.
7192 2005-11-24 Frank Ch. Eigler <fche@redhat.com>
7195 * parse.cxx (eval_pp_conditional): Support %( arch == "i686" %) form.
7196 * stap.1.in: Document it.
7197 * testsuite/parseok/fourteen.stp: Test it.
7198 * session.h (architecture): New field.
7199 * main.cxx (main): Initialize it.
7201 2005-11-24 Frank Ch. Eigler <fche@redhat.com>
7204 * translate.cxx (emit_common_header, emit_module_init,
7205 emit_module_exit): Switch context array to per-cpu kmalloc variant.
7206 * tapsets (*::emit_probe_entires): Use per_cpu_ptr() for my context.
7208 2005-11-23 Graydon Hoare <graydon@redhat.com>
7210 * elaborate.h (get_symbol_within_expression): Make visible.
7211 * elaborate.cxx (get_symbol_within_expression): Make non-static.
7212 (stat_decl_collector): New struct.
7213 (semantic_pass_stats): New semantic pass.
7214 (semantic_pass): Call it.
7215 (semantic_pass_symbols): Remove collection of statistic_decls from files.
7216 (visit_stat_op): Only fail if inferred type is not pe_long.
7218 * parse.cxx (parser::parse): Don't pass per-file statistic_decl
7220 (parser::parse_global): Don't parse global statistic_decls,
7222 * parse.hh (parser::parse_global): Adjust signature to match.
7224 * session.h (statistic_decl::operator==): New method.
7226 * staptree.h (print_format::is_empty): New method.
7227 (stapfile::stat_decls): Remove field.
7228 * staptree.cxx (string_to_components): Fix bugs in format-string
7231 * translate.cxx (var): Make private fields protected.
7232 (var::init): Support HIST_NONE stats.
7233 (aggvar): New struct.
7234 (mapvar::is_parallel): New method.
7235 (mapvar::call_prefix): Use it.
7236 (mapvar::calculate_aggregate): New method.
7237 (mapvar::fetch_existing_aggregate): New method.
7238 (mapvar::get): Support pe_stats.
7239 (mapvar::init): Use is_parallel(), and support HIST_NONE.
7240 (itervar::itervar): Only fault on pe_unknown.
7241 (itervar::start): Use mapvar::is_parallel and
7242 mapvar::fetch_existing_aggregate.
7243 (emit_map_type_instantiations): Include alloc.c before pmap-gen.c.
7244 Include pmap-gen.c for pe_stats maps.
7245 (c_unparser::gensym_aggregate): New method.
7246 (c_unparser::visit_foreach_loop): Handle mapvar::is_parallel case.
7247 (arrayindex_downcaster): New struct.
7248 (expression_is_arrayindex): New function.
7249 (c_tmpcounter::visit_stat_op): New method.
7250 (c_unparser::visit_stat_op): Implement.
7251 (c_unparser::visit_hist_op): Add commentary, still not implemented.
7253 * testsuite/buildok/stat_{insert,extract}.stp: New tests.
7254 * testsuite/semok/ten.stp: Correct for changes to global declarations.
7255 * testsuite/semko/*.stp: Likewise.
7257 2005-11-21 Roland McGrath <roland@redhat.com>
7259 * loc2c.c (c_translate_location): Take Dwarf_Op vector as argument
7260 directly, not Dwarf_Attribute.
7261 * loc2c.h: Update decl.
7262 * loc2c-test.c (get_location): New function.
7263 (handle_variable): Use it.
7264 * tapsets.cxx (dwflpp::translate_location): New method.
7265 (dwflpp::translate_components, dwflpp::literal_stmt_for_local): Use it.
7267 2005-11-21 Frank Ch. Eigler <fche@elastic.org>
7270 From Josh Stone <joshua.i.stone@intel.com>:
7271 * tapsets.cxx (timer_derived_probe, timer_builder,
7272 register_standard_tapsets): Support timer.ms() variety.
7273 * stapprobes.5.in: Document it.
7274 * testsuite/builok/fourteen.stp: Test its buildability.
7276 2005-11-18 Martin Hunt <hunt@redhat.com>
7279 * testsuite/buildko/one.stp: Replace printk.
7280 * testsuite/buildok/one.stp: Ditto.
7281 * testsuite/buildok/two.stp: Ditto.
7282 * testsuite/semko/fifteen.stp: Ditto.
7283 * testsuite/semko/fourteen.stp: Ditto.
7284 * testsuite/semko/thirteen.stp: Ditto.
7285 * testsuite/transok/eight.stp: Ditto.
7286 * testsuite/transok/seven.stp: Ditto.
7287 * testsuite/transok/six.stp: Ditto.
7289 * tapsets.cxx (*::emit_probe_entries): Replace printk() calls
7292 * stap.1.in: Replace printk with printf in example.
7294 * stapfuncs.5.in: Remove docs for printk and add for
7297 * tapset/logging.stp (printk): Deleted.
7299 2005-11-13 Graydon Hoare <graydon@redhat.com>
7301 * staptree.h (struct indexable): New struct.
7302 (classify_indexable): New function.
7303 (classify_const_indexable): New function.
7304 (struct symbol): Implement indexable.
7305 (struct arrayindex): Take indexable as base.
7306 (struct foreach_loop): Take indexable as base.
7307 (struct print_format): New struct.
7308 (enum stat_component_type): New enum.
7309 (struct stat_op): New struct.
7310 (enum historgram_type): New enum.
7311 (struct hist_op): New struct.
7313 (struct traversing_visitor)
7314 (struct throwing_visitor)
7315 (struct deep_copy_visitor): Add new visitor methods.
7316 (require): Specialize for indexable*.
7318 * staptree.cxx (print_format::*)
7322 (traversing_visitor::*)
7323 (throwing_visitor::*)
7324 (deep_copy_visitor::*)
7325 (classify_indexable)
7326 (classify_const_indexable): Implement
7327 (deep_copy_visitor::*): Update to use indexables.
7329 * parse.h (parser::parse_indexable): New method.
7330 (parser::parse_hist_op_or_bare_name): New method.
7332 * parse.cxx (lexer::scan): Accept @ in identifiers.
7333 (parser::parse_array_in)
7334 (parser::parse_foreach_loop): Call parse_indexable.
7335 (parser::parse_hist_op_or_bare_name): Implement.
7336 (parser::parse_indexable): Implement.
7337 (parser::parse_symbol): Accept printf, stat_ops, hist_ops.
7339 * elaborate.h (struct typeresolution_info): Add methods for
7340 visiting print_format, stat_op, hist_op.
7342 * elaborate.cxx (symbol_fetcher): New class.
7343 (get_symbol_within_expression): New function.
7344 (get_symbol_within_indexable): New function.
7345 (mutated_var_collector): Replace mutated_map_collector.
7346 (no_var_mutation_during_iteration_check): Replace
7347 no_map_mutation_during_iteration_check.
7348 (semantic_pass_vars): Replace semantic_pass_maps.
7349 (semantic_pass): Update call accordingly.
7350 (symresolution_info::*) Add new visitors, teach about indexables
7351 (typeresolution_info::*) Likewise.
7354 (c_unparser::getiter): Take symbol, not foreach_loop.
7355 (c_unparser::*) Add new visitors, teach about indexables.
7357 (delete_statement_operand_visitor::visit_arrayindex)
7358 (c_tmpcounter_assignment::*)
7359 (c_unparser_assignment::*): Likewise.
7360 (hist_op_downcaster): New struct.
7361 (expression_is_hist_op): New function.
7363 * testsuite/buildok/printf.stp: New test for print_format.
7365 2005-11-10 Frank Ch. Eigler <fche@elastic.org>
7367 * translate.cxx (c_unparser::visit_array_in, visit_arrayindex):
7368 Finish adapting to PR 1275 by switching back to read locks.
7370 2005-11-09 Martin Hunt <hunt@redhat.com>
7372 * translate.cxx: New API uses HIST_LOG and HIST_LINEAR
7373 instead of HSTAT_LOG and HSTAT_LINEAR.
7375 2005-11-09 Frank Ch. Eigler <fche@elastic.org>
7377 Reported by Guang Lei Li <liguangl@cn.ibm.com>:
7378 * tapset/context.stp (pid,ppid,tid): Correctly pick tgid vs pid.
7379 * testsuite/buildok/context_test.stp: Print out tid() too.
7381 2005-11-08 Frank Ch. Eigler <fche@redhat.com>
7383 * tapsets.cxx (blacklisted_p): Tolerate NULL filename parameter.
7384 * src/testsuite/semok/twenty.stp: New test to enumerate everything
7387 2005-11-08 Frank Ch. Eigler <fche@redhat.com>
7389 * translate.cxx (c_unparser::visit_foreach_loop): With PR 1275
7390 done, add back read lock around foreach loop. Add a write lock
7391 around preceding sort operation. Leave a race condition window. :-(
7393 2005-11-08 Frank Ch. Eigler <fche@redhat.com>
7395 * translate.cxx (mapvar::exists): Correct some more.
7397 2005-11-08 Frank Ch. Eigler <fche@redhat.com>
7399 Patch from "Mao, Bibo" <bibo.mao@intel.com>
7400 * translate.cxx (mapvar::exists): Correct 64-bit type mismatch.
7402 2005-11-08 Frank Ch. Eigler <fche@redhat.com>
7404 * tapsets.cxx (blacklisted_p): Add blacklist for some .return
7405 probes to kludge around bug #1345.
7406 * tapset/system_calls.stp: Add some %( %? %) conditionals to
7407 get closer to using tapset on 2.6.9 kernel.
7409 2005-11-07 Frank Ch. Eigler <fche@redhat.com>
7412 * tapsets.cxx (blacklisted_p): New function. Add a few blacklist
7414 * testsuite/semko/thirtythree.stp: New test.
7416 2005-11-07 Frank Ch. Eigler <fche@redhat.com>
7418 * testsuite/buildok/twentytwo.stp: Add another test for PR 1271.
7420 2005-11-04 Frank Ch. Eigler <fche@redhat.com>
7422 * tapsets.cxx (dwarf_derived_probe::emit_registrations): Add
7423 possible kprobe address prechecking logic. Set kretprobes
7425 * translate.cxx (emit_module_init): Set a more helpful default
7426 probe_point value for use in registration errors. Exit properly
7427 after registration failure of probe #0.
7429 2005-11-04 Roland McGrath <roland@redhat.com>
7431 * tapsets.cxx (add_probe_point): Use dwfl_module_relocation_info to
7432 get symbol name when dwfl_module_relocations has the info.
7434 2005-11-03 Roland McGrath <roland@redhat.com>
7436 * tapsets.cxx (add_probe_point): Use explicit test with assignment in
7439 2005-11-03 Frank Ch. Eigler <fche@elastic.org>
7442 * tapsets.cxx (dwarf_query::add_probe_point): Look up section name
7443 containing given address. Skip request if it came from .init.*.
7444 * testsuite/semko/thirtytwo.stp: New test.
7446 2005-11-02 Martin Hunt <hunt@redhat.com>
7448 * Makefile.am (EXTRA_DIST): Add session.h.
7449 * Makefile.in: Regenerated.
7451 2005-11-01 Frank Ch. Eigler <fche@elastic.org>
7453 Sound advice from <drepper@redhat.com>:
7454 * configure.ac: Undo last change.
7455 * configure.ac: Unregenerated.
7456 * parse.cxx: Use glibc strverscmp function instead of rpmlib.
7457 * stap.1.in: Update correspondingly.
7459 2005-11-01 Graydon Hoare <graydon@redhat.com>
7461 * translate.cxx (c_unparser::collect_map_index_types)
7462 (c_unparser::emit_map_type_instantiations)
7463 (c_unparser::visit_arrayindex)
7464 (c_unparser::visit_array_in)
7465 (delete_statement_operand_visitor::visit_arrayindex)
7466 (c_unparser_assignment::visit_arrayindex)
7467 (mapvar::*): Update to new runtime map API.
7469 2005-11-01 Frank Ch. Eigler <fche@elastic.org>
7472 * configure.ac: Look for rpm-devel headers and libs.
7473 * configure: Regenerated.
7474 * session.h: New file to contain systemtap_session decl.
7475 * staptree.h: Likewise evict statistics_decl.
7476 * elaborate.h: Corresponding changes.
7477 * main.cxx (usage): Elaborate. Re-enable "-r RELEASE" option.
7478 * parse.cxx (parser): Add systemtap_session& field. Update users.
7479 (scan_pp, eval_pp_conditional): New routines for preprocessing.
7480 (peek, next): Call it.
7481 (lexer::scan): Lex the preprocessor operators.
7482 (parser::parse): Include an extra level of exception catching
7483 for parse errors that occur during recovery.
7484 * parse.h: Corresponding changes.
7485 (parse_error): Allow explicit token parameter.
7486 * stap.1.in: Document preprocessing.
7487 * testsuite/parseok/fourteen.stp: New test.
7489 2005-10-31 Roland McGrath <roland@redhat.com>
7491 * systemtap.spec.in, configure.ac: Version 0.4.2 cooked.
7492 * configure: Regenerated.
7494 * configure.ac: Update libdw test to require 0.116 with dwarf_diecu.
7495 * configure: Regenerated.
7496 * systemtap.spec.in: Update elfutils requirement to 0.116.
7497 * loc2c.c: Dwarf_Loc -> Dwarf_Op.
7498 (location_from_address): dwarf_addrloclists -> dwarf_getlocation_addr.
7499 (c_translate_location): Likewise.
7500 (max_fetch_size): Remove fakeo dwarf_diecu macro.
7501 * tapsets.cxx (dwflpp): Dwarf_Func -> Dwarf_Die;
7502 dwarf_func_name -> dwarf_diename;
7503 dwarf_func_entrypc -> dwarf_entrypc;
7504 dwarf_func_file, dwarf_func_line -> dwarf_decl_file, dwarf_decl_line.
7506 2005-10-26 Roland McGrath <roland@redhat.com>
7508 * loc2c.c (max_fetch_size): Default to host pointer size,
7509 while still waiting for new libdw entrypoint.
7511 2005-10-25 Roland McGrath <roland@redhat.com>
7514 * testsuite/buildok/twentytwo.stp: New file.
7515 * testsuite/buildok/twentythree.stp: New file.
7516 * loc2c.c (discontiguify): Add missing ; in output.
7518 2005-10-20 Graydon Hoare <graydon@redhat.com>
7521 * staptree.h (struct statistic_decl): New struct.
7522 (stapfile::stat_decls): New member.
7524 * parse.h, parse.cxx
7525 (parser::expect_known): Fix typo.
7526 (parser::expect_number): New method.
7527 (parser::parse_global): Parse global statistic_decls.
7529 * elaborate.h (systemtap_session::stat_decls): New member.
7530 * elaborate.cxx (semantic_pass_symbols): Copy per-file stat_decls
7532 (typeresolution_info::visit_assignment): Detect some semantic stats
7533 errors in type resolution pass.
7535 * translate.cxx (var::sd): New private member.
7536 (var::var): Initialize it.
7537 (var::sdecl): New accessor.
7538 (var::init): Handle stats values.
7539 (mapvar::mapvar): Pass through statistic_decl to var ctor.
7540 (mapvar::get): Test for long explicitly.
7541 (mapvar::set): Likewise.
7542 (mapvar::init): Handle stats values.
7543 (c_unparser::emit_common_header): Remove typedef of stats_t,
7544 include stat.c when necessary.
7545 (mapvar::key_typename): Typo.
7546 (c_unparser::emit_map_type_instantiations): Thinko: value_typename not key_typename.
7547 (c_unparser::c_typename): Implementation typename is "Stat", not "stats_t".
7548 (c_unparser::c_assign): Fix bad error message.
7549 (c_unparser_assignment::c_assignop): Handle operator <<<.
7550 (c_unparser::getvar): Feed session statistic_decl into var.
7551 (c_unparser::getmap): Likewise.
7552 (c_unparser::visit_assignment): Handle operator <<<.
7553 (c_tmpcounter_assignment::visit_symbol): Derive type from rvalue when present.
7554 (c_unparser_assignment::visit_symbol)
7555 (c_tmpcounter_assignment::visit_arrayindex)
7556 (c_unparser_assignment::load_map_indices): Likewise.
7557 (c_unparser::visit_arrayindex): Likewise, and Prohibit statistic rvalues.
7558 (c_unparser_assignment::visit_arrayindex): Handle operator <<<.
7560 * testsuite/semko/twentyfour.stp:
7561 * testsuite/semko/twentyfive.stp:
7562 * testsuite/semko/twentysix.stp:
7563 * testsuite/semko/twentyseven.stp:
7564 * testsuite/semko/twentyeight.stp:
7565 * testsuite/semko/twentynine.stp:
7566 * testsuite/semko/thirty.stp:
7567 * testsuite/semko/thirtyone.stp: New tests for prohibited statistic contexts.
7568 * testsuite/buildok/twentytwo.stp: New test for legal statistic contexts.
7570 2005-10-19 Tom Zanussi <zanussi@us.ibm.com>
7573 * elaborate.h: Move output_file variable into systemtap_session.
7574 * buildrun.cxx (run_pass): Pass output file to stpd if applicable.
7575 * main.cxx (main): Set output_file if -o option specified.
7577 2005-10-18 Frank Ch. Eigler <fche@redhat.com>
7580 * main.cxx (main): Set PATH and LC_ALL, so
7581 * buildrun.cxx (compile_pass, run_pass): ... and ...
7582 * translate.cxx (emit_symbol_data): ... don't have to.
7584 2005-10-18 Frank Ch. Eigler <fche@elastic.org>
7587 * translator.cxx (emit_module_init): Set aside a variable for
7588 detailed probe point id.
7589 * tapsets.cxx (emit_registrations): Use it.
7590 (add_probe_point): Correct synthesized probe-point typo.
7592 2005-10-17 Martin Hunt <hunt@redhat.com>
7595 * tapsets.cxx (emit_registrations): On failure, don't
7596 forget to unregister probe 0;
7598 2005-10-17 Frank Ch. Eigler <fche@elastic.org>
7601 * parse.cx (parse_probe): Unconditionally visit parse_probe_point.
7602 (parse_probe_point): Accept "*" as component name.
7603 * stapprobes.5.in: Document this.
7604 * elaborate.cxx (derive_probes): Rewrite. Make top-level function.
7605 (match_node::find_and_build): New function to replace
7606 (find_builder): Removed.
7607 (match_key operator <): Correct one nasty typo.
7608 (match_node::bind): Refuse to bind "*" component names.
7609 (derived_probe_builder::build): Remove recursion output param.
7610 (alias_expandion_builder::build): Recurse to derive_probes instead.
7611 * elaborate.h: Corresponding changes.
7612 * tapsets.cxx: Ditto.
7613 (query_cu): Elide prologue finding for uninteresting CUs.
7614 * testsuite/semok/nineteen.stp: New test.
7615 * testsuite/semko/twentythree.stp: New test.
7616 * testsuite/semko/twentyone/two.stp: Fix -p2.
7618 2005-10-17 Graydon Hoare <graydon@redhat.com>
7620 * testsuite/semko/twentyone.stp: Check function doesn't match inline.
7622 * testsuite/semko/twentytwo.stp: Check inline doesn't match function.
7624 * testsuite/buildok/six.stp: Change "function" to "inline".
7626 * stapprobes.5.in: Describe "inline" probes.
7628 * tapsets.cxx (TOK_INLINE): New token "inline".
7629 (dwarf_query::has_inline_str)
7630 (dwarf_query::has_inline_num)
7631 (dwarf_query::inline_str_val)
7632 (dwarf_query::inline_num_val): New members.
7633 (dwarf_query::dwarf_query): Load new members.
7634 (query_dwarf_inline_instance)
7638 (dwarf_derived_probe::add_probe_point)
7639 (dwarf_builder::build):
7640 Use inline-related members where appropriate.
7641 (dwarf_derived_probe::register_inline_variants): New method.
7642 (dwarf_derived_probe::register_function_and_statement_variants):
7645 2005-10-14 Roland McGrath <roland@redhat.com>
7648 * loc2c.c (translate): Set LOC->byte_size in loc_noncontiguous result.
7649 (struct location.address): New member `declare'.
7650 (new_synthetic_loc, translate): Initialize it.
7651 (struct location.type): Add loc_fragment, loc_decl to enum.
7652 (c_emit_location): Emit unadorned code for loc_fragment.
7653 (discontiguify): New function.
7654 (c_translate_fetch, c_translate_store): Call it.
7655 (get_bitfield): New function, broken out of ....
7656 (emit_bitfield): ... here. Function removed.
7657 (declare_noncontig_union): New function.
7658 (max_fetch_size): New function.
7659 (translate_base_fetch): New function, broken out of ...
7660 (c_translate_fetch): ... here. Call it.
7661 Use get_bitfield here, not emit_bitfield.
7662 (c_translate_store): Likewise.
7663 (c_emit_location): Emit declarations first.
7665 * loc2c.c (dwarf_diename_integrate): Function removed.
7666 Change all callers to use dwarf_diename.
7668 * loc2c-test.c (handle_variable): Check for "=" before fetching DIE
7671 2005-10-13 Roland McGrath <roland@redhat.com>
7673 * loc2c.c (c_emit_location): Use final location's used_deref flag too.
7675 * loc2c.c (translate): Pass LOC to alloc_location, not INPUT.
7677 * loc2c-test.c (fail): Print a newline after the error message.
7679 2005-10-10 Frank Ch. Eigler <fche@elastic.org>
7681 * elaborate.cxx (match_node::bind): Improve error message.
7682 (register_library_aliases): Catch and verbosify error message.
7683 (semantic_pass): Provide a back-up exception catcher.
7685 2005-10-10 Frank Ch. Eigler <fche@elastic.org>
7688 * translate.cxx (c_unparser_assignment): Rename "pre" field to "post",
7689 add blurb to clarify polarity.
7690 (visit_pre/post_crement): Flip passed flag value.
7692 2005-10-07 Frank Ch. Eigler <fche@elastic.org>
7695 * staptree.h (foreach_loop): Add sort_column, sort_direction fields.
7696 * parse.cxx (parse_foreach_loop): Parse "+"/"-" suffix operators.
7697 * stap.1.in, stapex.5.in: Document them.
7698 * staptree.cxx (foreach_loop print, copy): Propagate them.
7699 * translate.cxx (visit_foreach_loop): Support them.
7700 * testsuite/parseok/fifteen.stp, parseko/thirteen.stp,
7701 buildok/twentyone.stp: Test them.
7703 2005-10-07 Kevin Stafford <kevinrs@us.ibm.com>
7705 * tapset/system_calls.stp: All 281 syscalls *prototyped*. They
7706 are still untested. Many of the aliases useability are contin-
7707 gent upon resolution of namely: bz #1295 & bz #1382.
7709 2005-10-06 Frank Ch. Eigler <fche@elastic.org>
7711 * stap.1.in: Document -b/-s options.
7712 * main.cxx (usage): Clarify -b/-s blurbs.
7713 * translator.cxx (translate_pass): Handle bulk_mode here instead.
7715 2005-10-06 Frank Ch. Eigler <fche@elastic.org>
7718 * translate.cxx (emit_symbol_data): New function to transcribe
7719 a processed address->symbol lookup table, based upon /proc/kallsyms.
7721 2005-10-05 Tom Zanussi <zanussi@us.ibm.com>
7723 * buildrun.cxx (run_pass): Add bulk/buffer_size flags to flags
7725 * elaborate.h (systemtap_session): Add bulk/buffer_size flags.
7726 * main.cxx (usage,main): Add -b (bulk), -s (buffer_size) options.
7729 2005-10-04 Graydon Hoare <graydon@redhat.com>
7733 (target_variable_flavour_calculating_visitor::visit_target_symbol)
7734 (var_expanding_copy_visitor::visit_target_symbol):
7735 Require guru mode for writing to target vars.
7736 * testsuite/buildok/twenty.stp: Test writing to target vars.
7738 2005-10-01 Frank Ch. Eigler <fche@elastic.org>
7740 * tapsets.cxx (get_module_dwarf): Add "required" parameter, which
7741 throws an exception if debuginfo is not found.
7742 (focus_on_module_containing_global_address): Tolerate miss.
7743 (query_kernel_exists): New function to test for "kernel" module in
7744 dwfl_getmodules() result set.
7745 (dwarf_builder::build): Call it if appropriate.
7747 2005-09-30 Graydon Hoare <graydon@redhat.com>
7750 * tapsets.cxx (dwflpp::find_variable_and_frame_base)
7751 (dwflpp::translate_components)
7752 (dwflpp::resolve_unqualified_inner_typedie)
7753 (dwflpp::translate_final_fetch_or_store): New functions.
7754 (dwflpp::literal_stmt_for_local): Factor a bit.
7755 (variable_flavour_calculating_visitor::visit_target_symbol):
7756 Don't fault on lvalue, just collect an extra char.
7757 (var_expanding_copy_visitor::target_symbol_setter_functioncalls):
7759 (var_expanding_copy_visitor::visit_assignment): New method.
7760 (var_expanding_copy_visitor::visit_target_symbol): Permit lvalues.
7762 2005-09-30 Frank Ch. Eigler <fche@elastic.org>
7764 * tapset/system_calls.stp (*_str): Simplified boolean test logic
7765 throughout, fixed some typos.
7767 2005-09-28 Frank Ch. Eigler <fche@elastic.org>
7770 * main.cxx (main): Support -D macro-setting option.
7771 * stap.1.in: Document it and related macros.
7772 * buildrun.cxx (compile_pass): Emit macro definitions.
7773 * translate.cxx (translate_pass): Guard limit macros with #ifdef.
7774 Eliminate MAXCONCURRENCY macro.
7775 * elaborate.h (systemtap_session): Add "macros" field.
7776 * parse.cxx (parse_if_statement): Clear "elseblock" if needed.
7778 2005-09-27 Frank Ch. Eigler <fche@elastic.org>
7780 * tapsets.cxx (query_cu_containing_global_address): Tolerate
7781 way out of range addresses that result in null cudie pointers.
7783 2005-09-27 Frank Ch. Eigler <fche@elastic.org>
7786 * translate.cxx (emit_common_header): Move some MAX* definitions out ...
7787 (translate_pass): ... to here. Fix probe_start API impedance mismatch.
7788 (emit_module_init, exit): Tolerate registration errors, such as absence
7789 of kretprobes support.
7791 2005-09-27 Frank Ch. Eigler <fche@elastic.org>
7794 * tapsets.cxx (target_variable_flavour_calculating_visitor::
7795 visit_target_symbol): Print verbose error.
7796 (var_expanding_copy_visitor::visit_target_symbol): Throw
7799 2005-09-26 Frank Ch. Eigler <fche@elastic.org>
7801 * stapfuncs.5.in: Extend errno_str verbiage.
7802 * tapset/errno.stp: Canonicalize script code slightly.
7804 2005-09-26 Frank Ch. Eigler <fche@elastic.org>
7807 * tapsets.cxx (resolve_prologue_endings2): Try another heuristic
7808 for end-of-prologue.
7810 2005-09-22 Graydon Hoare <graydon@redhat.com>,
7811 Frank Ch. Eigler <fche@elastic.org>
7814 * tapsets.cxx (dwarf_derived_probe): Allow multiple probe_point
7815 locations per derived_probe.
7816 (dwarf_query): Add probe "flavour" concept, to reuse probe bodies for
7817 identical flavours across wildcards.
7818 (dwarf::emit_registrations, emit_deregistrations, emit_probe_entries):
7820 * staptree (probe::printsig): Put multiple locations on separate lines.
7822 2005-09-22 Will Cohen <wcohen@redhat.com>
7824 * stap.1.in: Correct sys_read alias example.
7826 2005-09-19 Frank Ch. Eigler <fche@redhat.com>
7828 * tapsets.cxx (*::emit_probe_entries): Handle busy-count correctly
7831 2005-09-14 Graydon Hoare <graydon@redhat.com>
7834 * tapsets.cxx (dwflpp::resolve_prologue_endings): Correct logic
7835 error triggered by consecutive function-beginning line records.
7837 2005-09-14 Frank Ch. Eigler <fche@elastic.org>
7840 * translate.cxx: Call _stp_map_clear for "delete ARRAY" statement.
7842 2005-09-14 Roland McGrath <roland@redhat.com>
7844 * systemtap.spec.in: Version 0.4.1 cooked.
7845 Build runpath into elfutils libs too.
7847 2005-09-14 Frank Ch. Eigler <fche@elastic.org>
7850 * Makefile.am (AM_CFLAGS): Add -fexceptions.
7851 * loc2c.c (c_translate_location): Invoke *fail properly.
7852 * Makefile.in: Regenerated.
7854 2005-09-13 Graydon Hoare <graydon@redhat.com>
7857 * tapsets.cxx (func_info::func_info): Initialize fields.
7858 (inline_instance_info::inline_instance_info): Likewise.
7859 (query_inline_instance_info): Add try-catch block.
7860 (query_func_info): Likewise, and fault when missing prologue-end.
7861 (query_dwarf_func): Fault when missing entrypc.
7863 2005-09-12 Frank Ch. Eigler <fche@elastic.org>
7866 * translate.cxx (c_tmpcounter::visit_functioncall): Correct
7868 * testsuite/buildok/nineteen.stp: New test case.
7870 2005-09-12 Graydon Hoare <graydon@redhat.com>
7873 * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Fix two
7874 off-by-one errors in previous change.
7876 2005-09-12 Graydon Hoare <graydon@redhat.com>
7879 * tapsets.cxx (dwflpp::has_single_line_record): New function.
7880 (dwflpp::iterate_over_srcfile_lines): Throw when user requests
7881 single statement line with multiple records (and provide advice).
7882 (query_cu): Adjust call to match.
7883 (query_srcfile_line): Fix indentation.
7885 2005-09-10 Frank Ch. Eigler <fche@elastic.org>
7887 * Makefile.am, runtest.sh: Use a "testresuilt/" directory in build
7888 tree rather than overloading "testsuite/".
7889 * TODO: Removed obsoleted file.
7890 * Makefile.in: Regenerated.
7892 2005-09-07 Martin Hunt <hunt@redhat.com>
7894 * stap.1.in: Document current "-c" and "-x" options.
7896 2005-09-07 Frank Ch. Eigler <fche@elastic.org>
7898 * systemtap.spec.in: Remove kernel-debuginfo dependency.
7900 2005-09-07 Frank Ch. Eigler <fche@redhat.com>
7902 * main.cxx (main): Choose getpid()-based module names.
7903 * tapsets.cxx: Make timer.jiffies' use of task_pt_regs __i386__-only.
7905 2005-09-07 Frank Ch. Eigler <fche@redhat.com>
7907 * stap.1.in: Oops, && and || do short-circuit.
7909 2005-09-06 Frank Ch. Eigler <fche@elastic.org>
7911 * stap.1.in: Clarify absence of short-circuiting in && and ||.
7912 * translate.cxx (emit_function): Improve "array locals" message.
7913 * tapset/timestamp.stp: Add gettimeofday_us function. Correct
7914 arithmetic typing in other functions.
7915 * stapfuncs.5.in: Document new function.
7917 2005-09-06 Martin Hunt <hunt@redhat.com>
7919 * systemtap.spec.in: Bump elfutils_version to .115.
7921 2005-09-05 Roland McGrath <roland@redhat.com>
7923 * loc2c.h: Comment fix.
7925 2005-09-06 Frank Ch. Eigler <fche@elastic.org>
7927 * configure.ac: Require elfutils 0.115+.
7928 * tapsets.cxx: Restore graydon's PR 1244 code.
7929 * testsuite/buildok/eighteen.stp: Correct typing.
7930 * configure: Regenerated.
7932 2005-09-06 Martin Hunt <hunt@redhat.com>
7934 * tapset/context.stp: Add function target().
7935 * stapfuncs.5.in (target): Document it.
7936 * elaborate.h (struct systemtap_session): Add cmd and target_pid to
7938 * main.cxx (usage): Add descriptions of "-c" and "-x" options.
7939 (main): Set s.cmd and s.target_pid.
7940 * buildrun.cxx (stringify): Copy this utility func here too.
7941 (run_pass): Add new options to set cmd and pid to the stpd
7944 2005-09-06 Frank Ch. Eigler <fche@redhat.com>
7946 * tapsets.cxx (emit_probe_entries): Disable fault_handler for now.
7948 2005-09-05 Frank Ch. Eigler <fche@elastic.org>
7951 * translate.cxx (lex_cast_qstring): Correct "cast" of object
7952 to string containing more than one word.
7953 * tapset.cxx (lex_cast_qstring): Ditto.
7954 (dwarf_derived_module::emit_probe_entries): Emit and use
7955 a generic fault_handler.
7957 2005-09-05 Frank Ch. Eigler <fche@elastic.org>
7960 * staptree.h, staptree.cxx: Make all ::print*(), operator<<
7961 functions take const staptree objects.
7962 (literal_string::print): \-prefix double-quotes.
7963 * translate.cxx (emit_common_header): Add context probe_point field.
7964 Switch to atomic_t busy flags.
7965 (emit_module_exit): Use atomic operations for busy flag.
7966 (visit_*): Use lex_cast_qstring for last_stmt strings.
7967 * tapsets.cxx (lex_cast_qstring): New function.
7968 (*::emit_probe_entries): Populate probe_point. Use atomic operations
7970 * tapset/context.stp (pp): New function.
7971 * stapfuncs.5.in: Document it.
7972 * testsuite/buildok/context_test.stp: Test it.
7974 2005-09-04 Frank Ch. Eigler <fche@elastic.org>
7976 * translate.cxx (visit_literal_string): \-prefix double-quotes.
7978 2005-09-04 Martin Hunt <hunt@redhat.com>
7980 * testsuite/buildok/context_test.stp: New test.
7981 * tapset/logging.stp (log): Call _stp_printf().
7982 * stapfuncs.5.in: Add contextinfo funcs.
7983 * tapset/context.stp: Minor cleanup.
7985 2005-09-03 Frank Ch. Eigler <fche@elastic.org>
7988 * tapset.cxx (literal_stmt_for_local): Don't automgaically copy
7989 target char*'s to systemtap strings.
7990 * tapset/conversions.stp (user_string, kernel_string): New functions.
7991 * stapfuncs.5.in: Document new functions.
7993 2005-09-03 Frank Ch. Eigler <fche@elastic.org>
7995 PR 1292, by popular request.
7996 * parse.cxx (parse_functiondecl): Allow optional value/param type
7998 * stap.1.in: Document this.
7999 * tapset/*.stp: Convert most functions accordingly.
8000 * testsuite/parseok/twelve.stp, semok/seven.stp,
8001 semko/twenty.stp: Test this.
8003 2005-09-02 Frank Ch. Eigler <fche@redhat.com>
8005 * translate.cxx (varlock): Use trylock only for write locks.
8006 (translate_pass): Remove read_trylock macro hack.
8007 (visit_foreach_loop): Remove protective read lock, until PR 1275.
8008 (visit_*): Added many more "last_stmt"-setting expressions in the
8009 output, to improve last_error message locality.
8011 2005-09-02 Martin Hunt <hunt@redhat.com>
8013 * tapset/logging.stp: Make log() be same as print().
8015 2005-09-02 Frank Ch. Eigler <fche@elastic.org>
8017 * tapsets.cxx: Temporarily rolled back graydon's changes.
8019 2005-09-02 Frank Ch. Eigler <fche@elastic.org>
8021 * tapset/*.stp: Renamed several files to simplify names.
8023 2005-09-01 Graydon Hoare <graydon@redhat.com>
8026 * testsuite/buildok/eighteen.stp: New test.
8027 * tapsets.cxx (dwflpp::literal_stmt_for_local)
8028 (query_statement, query_inline_instance_info)
8029 (query_func_info, query_srcfile_line, query_cu)
8030 (var_expanding_copy_visitor, visit_target_symbol)
8031 (dwarf_derived_probe): Fix 1244.
8033 2005-09-01 Martin Hunt <hunt@redhat.com>
8035 * tapset/builtin_logging.stp: Add print.
8037 * tapset/context.stp: New file. First cut at some
8040 2005-09-01 Martin Hunt <hunt@redhat.com>
8042 * translate.cxx (emit_probe): Add a call to _stp_print_flush
8043 at the end of each probe.
8044 (translate_pass): Define STP_NUM_STRINGS to be 1 for
8045 a scratch string. Include current.c and stack.c. Don't
8046 define KALLSYMS_LOOKUP_NAME or KALLSYMS_LOOKUP. Remove
8047 references to next_fmt() and stp_dbug().
8049 2005-08-31 Graydon Hoare <graydon@redhat.com>
8052 * tapsets.cxx (dwflpp::literal_stmt_for_local):
8053 Support DW_TAG_enumeration_type tag as synonymous with
8055 * loc2c.c (base_byte_size): Likewise.
8056 * testsuite/buildok/seven.stp: Adjust to work on UP kernels.
8058 2005-08-31 Graydon Hoare <graydon@redhat.com>
8060 * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Correct segv
8061 reported in PR 1270.
8063 2005-08-31 Frank Ch. Eigler <fche@redhat.com>
8065 * translate.cxx (visit_array_in, visit_arrayindex): Use write locks
8066 even for array reads, until PR 1275.
8067 (translate_pass): Add read_trylock -> write_trylock escalation.
8069 2005-08-30 Roland McGrath <roland@redhat.com>
8071 * Makefile.am (install-data-local): Use mkdir -p, not -mkdir.
8072 * Makefile.in: Regenerated.
8074 2005-08-30 Graydon Hoare <graydon@redhat.com>
8076 * tapsets.cxx (dwflpp::literal_stmt_for_local): Handle dwarf
8077 pointer-to-1-byte-means-char case (found in PR 1187)
8078 * parse.cxx (parse_symbol): Eliminate use of "." from target
8079 symbol parser, conflicting with string concatenation operator.
8080 * staptree.h (target_symbol::component_type) Eliminate
8081 comp_struct_pointer_member, since . and -> are considered the
8083 * staptree.cxx (target_symbol::print): Likewise.
8084 * testsuite/buildok/seventeen.stp: Test solution on PR 1191.
8085 * testsuite/buildok/six.stp: Test working portion of PR 1155.
8086 * testsuite/semko/nineteen.stp: Unresolved portion of PR 1155.
8088 2005-08-30 Frank Ch. Eigler <fche@elastic.org>
8091 * translator (varlock): Add deadlock detection code.
8092 (emit_common_header): Add a new MAXTRYLOCK configuration macro.
8094 2005-08-29 Graydon Hoare <graydon@redhat.com>
8098 (func_info::decl_file)
8099 (func_info::decl_line)
8100 (inline_instance_info::decl_file)
8101 (inline_instance_info::decl_line): New fields.
8102 (dwflpp::function_srcfile): Remove.
8103 (dwflpp::function_file): Add.
8104 (dwflpp::function_line): Add.
8105 (dwarf_derived_probe::dwarf_derived_probe): Update.
8106 (query_statement): Pass func, file, line through.
8107 (query_inline_instance_info): Likewise.
8108 (query_func_info): Likewise.
8109 (query_srcfile_line): Query statement lines if
8110 statement_str exists, rather than *_info.
8111 (query_dwarf_inline_instance): Extract file and line.
8112 (query_dwarf_func): Likewise.
8113 (query_cu): Pass empty func, file, line, for address-based
8116 2005-08-29 Frank Ch. Eigler <fche@redhat.com>
8118 * runtest.sh: Tolerate relative $SRCDIR.
8120 2005-08-29 Frank Ch. Eigler <fche@redhat.com>
8122 * stapprobes.5.in, stapfuncs.5.in, stapex.5.in: New man pages.
8123 * stap.1.in: Moved some content out.
8124 * Makefile.am (man_MANS): Add new man pages.
8125 * configure.ac (AC_CONFIG_FILES): Add them.
8126 * systemtap.spec.in: Package them.
8127 * Makefile.in, configure: Regenerated.
8128 * buildrun.cxx (run_pass): Pass "-r" to stpd.
8129 * translate.cxx (emit_common_header): Wrap try/catch around
8130 variable decls, to improve exception particularity.
8131 (visit_literal_number): Emit as unsigned literal, which is
8132 actually a subtle correctness issue.
8134 2005-08-28 Frank Ch. Eigler <fche@redhat.com>
8136 * tapsets.cxx (visit_target): Make target variable exceptions
8138 (literal_stmt_for_local): Improve bad-type exception message.
8139 * translate.cxx (emit_module_init): Include probe point in comments.
8141 2005-08-27 Roland McGrath <roland@redhat.com>
8143 * loc2c-test.c (print_type): New function.
8144 (print_vars): Use it.
8146 * loc2c-test.c (paddr, print_vars): New functions.
8147 (main): If given no variable name argument, print out variables.
8149 2005-08-26 Graydon Hoare <graydon@redhat.com>
8151 * translate.cxx: Revert tmp initialization changes.
8153 2005-08-26 Graydon Hoare <graydon@redhat.com>
8155 * parse.cxx (scan): Preserve basic C-ish escapes.
8156 * translate.cxx (c_tmpcounter::declaring): New flag.
8157 (c_tmpcounter::declare_or_init): New helper method.
8158 (c_tmpcounter::visit_*): Use declare_or_init.
8159 (c_unparser::emit_function): Run a tmpcounter to initialize tmps.
8160 (c_unparser::emit_probe): Likewise.
8161 (c_unparser::c_strcpy): Use strlcpy.
8162 (c_unparser::c_strcat): Use strlcat.
8164 2005-08-25 Roland McGrath <roland@redhat.com>
8166 * Makefile.am (EXTRA_DIST): List .h files explicitly.
8167 Automake really does not like wildcards.
8168 * Makefile.in: Regenerated.
8170 2005-08-25 Frank Ch. Eigler <fche@redhat.com>
8172 * Makefile.am (docs): Removed target.
8173 * Makefile.in: Regenerated.
8175 2005-08-24 Graydon Hoare <graydon@redhat.com>
8177 * tapsets.cxx (dwflpp::literal_stmt_for_local): Fetch pointer types,
8178 array types, strings, from target.
8180 2005-08-24 Roland McGrath <roland@redhat.com>
8182 * loc2c-test.c (handle_variable): Iterate on const_type/volatile_type.
8184 2005-08-24 Frank Ch. Eigler <fche@elastic.org>
8186 * configure.ac: Require elfutils 0.114.
8187 * tapsets.cxx: Brought back graydon's changes.
8188 * configure: Regenerated.
8190 2005-08-24 Roland McGrath <roland@redhat.com>
8192 * systemtap.spec.in: Update elfutils requirement.
8194 2005-08-24 Frank Ch. Eigler <fche@elastic.org>
8196 * translate.cxx (emit_global, emit_module_init): Use 2.6.9-compatible
8197 rwlock initialization.
8199 2005-08-24 Frank Ch. Eigler <fche@elastic.org>
8201 * tapsets.cxx (*::emit_probe_entries): Treat NULL and "" last_errors
8202 both as clean early returns, not errors.
8203 * translate.cxx: Revamp last_error handling logic. Remove all
8204 "goto out" paths from expression context.
8205 (visit_statement): Handle last_error exit one nesting level at a time.
8206 (visit_return_statement, visit_functioncall): Set/reset last_error="".
8207 (c_tmpcounter::visit_for_loop): New routine.
8208 (c_unparser::visit_foreach, visit_for_loop): Rewrite to properly
8209 support continue/breaks, non-local exits, (foreach) locks.
8210 (emit_global): Emit lock variable.
8211 (varlock ctor, dtor): Lock/unlock global variable.
8212 (varlock_w, varlock_r): New concrete subclasses. Update all users.
8213 * tapset/builtin_logging.stp (exit): Don't set last_error.
8214 * src/testsuite/buildok/sixteen.stp: New test.
8216 * tapsets.cxx: Temporarily rolled back graydon's changes.
8218 2005-08-23 Graydon Hoare <graydon@redhat.com>
8220 * tapsets.cxx: Re-implement dwarf probe-pattern resolution.
8222 2005-08-22 Frank Ch. Eigler <fche@elastic.org>
8225 * elaborate.h (module_fds): New member in systemtap_session.
8226 * tapsets.cxx (dwarf_derived_probe ctor): Open /sys/module/$MOD/.text
8227 for the duration of a systemtap session, to lock module in memory.
8229 2005-08-21 Frank Ch. Eigler <fche@redhat.com>
8231 PR systemtap/1195, systemtap/1193
8232 * elaborate.cxx (alias_expansion_builder): Set new block token.
8233 * parse.cxx (parse_symbol): Set new target_symbol token.
8234 * runtest.sh: Store more pertinent failure data.
8235 * tapsets.cxx (emit_probe_entries): Rewrite error-handling path.
8236 * translate.cxx (emit_common_header): Goodbye errorcount, hello
8237 last_error & last_stmt.
8238 (c_unparser::visit_statement): New "header" for all other stmts.
8239 (c_assignop, visit_binary_expression): Adapt to last_error.
8240 * tapset/builtin_logging.stp: Adapt to last_error.
8242 2005-08-19 Frank Ch. Eigler <fche@elastic.org>
8245 * translate.cxx (visit_if_statement): Translate else arms.
8247 2005-08-19 Frank Ch. Eigler <fche@elastic.org>
8250 * elaborate.cxx (derived_probe_builder): Add get_param function.
8251 * elaborate.h: Declare them.
8252 * tapsets.cxx (dwarf_query::get_*_param): Call them.
8253 (timer_derived_probe, timer_builder): New classes.
8254 (register_standard_tapsets): Register timer.jiffies(N) and friend.
8255 * translate.cxx (translate_pass): #include <linux/timers.h>.
8256 * stap.1.in: Document timer.jiffies(N) probe points.
8257 * testsuite/buildok/fourteen.stp: New test.
8259 2005-08-19 Frank Ch. Eigler <fche@elastic.org>
8261 * elaborate.cxx (find_var): Remove $pid/$tid builtin logic.
8263 2005-08-19 Martin Hunt <hunt@redhat.com>
8265 * stp_check.in: Remove stp-control.
8267 2005-08-18 Roland McGrath <roland@redhat.com>
8269 * loc2c.c (c_translate_addressof): Take TYPEDIE instead of TYPEATTR.
8270 * loc2c.h: Update decl.
8271 * loc2c-test.c (handle_variable): Handle DW_TAG_pointer_type target
8274 2005-08-18 Will Cohen <wcohen@redhat.com>
8276 * stp_check.in: See if relayfs available filesystem.
8278 2005-08-18 Roland McGrath <roland@redhat.com>
8280 * loc2c.c (struct location): New member `emit_address'.
8281 (alloc_location): Initialize new member from ORIGIN.
8282 (location_from_address): New argument EMIT_ADDRESS.
8283 Initialize new member.
8284 (translate): Use LOC->emit_address hook to format DW_OP_addr constant.
8285 (location_relative): Die if DW_OP_addr is used.
8286 (default_emit_address): New function.
8287 (c_translate_location): New argument EMIT_ADDRESS, pass it down.
8288 Use default_emit_address if argument is null.
8289 * loc2c.h: Update decl.
8290 * loc2c-test.c (handle_variable): Update caller.
8291 * tapsets.cxx (dwflpp::literal_stmt_for_local): Update caller.
8292 (dwflpp::loc2c_emit_address): New static method.
8294 2005-08-17 Roland McGrath <roland@redhat.com>
8297 * loc2c.c (struct location): New members `fail', `fail_arg'.
8298 (alloc_location): New function. Initialize those members.
8299 (new_synthetic_loc, translate): Use that instead of obstack_alloc.
8300 (location_from_address, location_relative): Likewise.
8301 (FAIL): New macro. Use it everywhere in place of `error'.
8302 (c_translate_location): Take new args FAIL, FAIL_ARG.
8303 * loc2c.h: Update declaration.
8304 * loc2c-test.c (fail): New function.
8305 (handle_variable): Pass it to c_translate_location.
8306 * tapsets.cxx (dwflpp::loc2c_error): New static method.
8307 (dwflpp::literal_stmt_for_local): Pass it to to c_translate_location.
8309 PR systemtap/1205, systemtap/1206
8310 * loc2c.c (c_translate_fetch): Take TYPEDIE instead of TYPEATTR.
8311 (c_translate_store): Likewise.
8312 * loc2c.h: Update decls.
8313 * loc2c-test.c (handle_variable): Update callers.
8314 Look up type, resolve typedefs, and check that it's DW_TAG_base_type.
8315 * tapsets.cxx (dwflpp::literal_stmt_for_local): Likewise.
8317 * loc2c.c (base_byte_size): Add assert on expected DIE tag.
8318 (c_translate_array, c_translate_pointer): Likewise.
8319 * loc2c.h: Amend comments to explicitly state type DIE tags expected.
8321 * loc2c.c: #include "loc2c.h".
8323 2005-08-16 Frank Ch. Eigler <fche@elastic.org>
8326 * tapsets.cxx (*): Add more verbose-predicatation to informative
8327 messages. Correct more hex/dec ostream mismatches.
8328 (query_function): Use entry/querypc, not prologue-end, for
8329 function().return and .statement() probe points.
8330 (dwarf_derived_probe ctor): Reorganize function/statement
8331 probe point regeneration.
8333 2005-08-16 Frank Ch. Eigler <fche@elastic.org>
8335 * main.cxx: Don't print library parse trees if last_pass=1.
8337 2005-08-14 Roland McGrath <roland@redhat.com>
8339 * systemtap.spec.in: Update elfutils_version requirement to 0.113;
8340 restore bundled_elfutils setting to 1.
8342 2005-08-12 Graydon Hoare <graydon@redhat.com>
8344 * translate.cxx (c_tmpcounter::visit_array_in): Implement.
8345 (c_unparser::visit_array_in): Likewise.
8346 (mapvar::exists): New method.
8348 2005-08-12 Frank Ch. Eigler <fche@elastic.org>
8350 PR systemtap/1122 et alii
8351 * parse.cxx (parse_literal): Parse and range-limit 64-bit numbers.
8352 (parse_unary): Correct precedence glitch.
8353 * staptree.h (literal_number): Store an int64_t.
8354 * staptree.cxx: Corresponding changes.
8355 * translate.cxx (check_dbz): Remove - insufficient.
8356 (emit_function): Define CONTEXT macro sibling for THIS.
8357 (c_typename): pe_long -> int64_t.
8358 (visit_literal_number): Format literal rigorously and uglily.
8359 (c_assignop, visit_binary_expression): Handle div/mod via new
8360 helper functions in runtime.
8361 * tapset/builtin_logging.stp: Add error, exit builtins.
8362 * testsuite/buildok/ten,eleven.stp: New tests.
8363 * testsuite/parse{ko,ok}/six.stp: Modify for larger numbers.
8364 * testsuite/transok/one.stp: Add more ";"s, maybe unnecessarily.
8366 2005-08-11 Frank Ch. Eigler <fche@elastic.org>
8368 * systemtap.spec.in: Tweak to turn into fedora-flavoured spec.
8369 Don't build/install runtime docs.
8371 2005-08-11 Frank Ch. Eigler <fche@elastic.org>
8373 * Makefile.am (uninstall-local): New target.
8374 * Makefile.in: Regenerate.
8376 2005-08-11 Frank Ch. Eigler <fche@elastic.org>
8378 * translate.cxx (emit_function): Add an extra { } around the
8379 function body visitation.
8380 * tapset/timestamp_functions.stp: New file.
8381 * tapset/builtin_conversions.stp: Aggregated from [hex]string.
8382 * tapset/builtin_logging.stp: Aggregated from log/warn/printk.
8384 2005-08-11 Frank Ch. Eigler <fche@elastic.org>
8386 * tapsets.cxx: Tweak hex/decimal printing for consistency.
8387 (emit_registrations): Remove module-specific code, anticipating
8388 that libelf gives us run-time addresses already.
8390 2005-08-10 Roland McGrath <roland@redhat.com>
8392 * loc2c.c (emit_base_store): New function.
8393 (emit_bitfield): Rewritten to handle stores, change parameters.
8394 (c_translate_fetch): Update caller.
8395 (c_translate_store): New function.
8396 * loc2c.h: Declare it.
8397 * loc2c-test.c (handle_variable): Grok "=" last argument to do a store.
8399 * loc2c.c (c_translate_location): Increment INDENT.
8400 (c_translate_pointer): Likewise.
8401 (emit_loc_value): Increment INDENT after emit_header.
8403 2005-08-10 Graydon Hoare <graydon@redhat.com>
8405 * tapsets.cxx (dwflpp::literal_stmt_for_local): Copy code from
8406 loc2c-test to implement target member variable access.
8408 2005-08-10 Graydon Hoare <graydon@redhat.com>
8411 (dwflpp::global_addr_of_line_in_cu): Implement next-line heuristic.
8412 (dwarf_query::get_number_param): Dwarf_Addr variant.
8413 (query_cu): Add line-selecting variant for function iteration.
8415 2005-08-10 Frank Ch. Eigler <fche@elastic.org>
8418 * elaborate.cxx (resolve_2types): Accept a flag to tolerate unresolved
8420 (visit_functioncall): Call it thusly.
8421 * translate.cxx (emit_function): Tolerate void functions.
8422 * stap.1.in: Document possibility of void functions.
8423 * tapset/builtin_{log,printk,warn}.stp: Make these void functions.
8424 * testsuite/buildok/nine.stp, semok/eighteen.stp: New tests.
8426 2005-08-10 Frank Ch. Eigler <fche@elastic.org>
8428 * tapsets.cxx: Correct hex/decimal misformatting of verbose messages.
8429 * main.cxx: Add formal "-h" and "-V" options.
8430 * stap.1.in: Document them.
8432 2005-08-10 Frank Ch. Eigler <fche@elastic.org>
8434 * tapsets.cxx: Move around "focusing on ..." messages to print
8435 them only for matching functions/modules.
8436 (dwflpp ctor): Also add cu (source file) name to derived
8439 2005-08-09 Graydon Hoare <graydon@redhat.com>
8441 * testsuite/parseok/nine.stp: Update
8442 * testsuite/semok/{six,seven,eleven,seventeen}.stp: Update.
8444 2005-08-09 Graydon Hoare <graydon@redhat.com>
8447 (target_symbol): New struct.
8448 (*_visitor::visit_target_symbol): Support it.
8449 (visitor::active_lvalues)
8450 (visitor::is_active_lvalue)
8451 (visitor::push_active_lvalue)
8452 (visitor::pop_active_lvalue): Support lvalue-detection.
8453 (delete_statement::visit)
8454 (pre_crement::visit)
8455 (post_crement::visit)
8456 (assignment::visit): Push and pop lvalue expressions.
8458 (lvalule_aware_traversing_visitor): Remove class.
8459 (no_map_mutation_during_iteration_check)
8460 (mutated_map_collector): Update lvalue logic.
8461 (typeresolution_info::visit_target_symbol): Add, throw error.
8466 (parser::peek_*): New helpers.
8467 (parser::parse_symbol): Rewrite, support target_symbols.
8468 * translate.cxx (c_unparser::visit_target_symbol): Implement.
8469 * tapsets.cxx (var_expanding_copy_visitor): Update lvalue logic,
8470 change visit_symbol to visit_target_symbol.
8472 2005-08-09 Martin Hunt <hunt@redhat.com>
8475 * stp_check.in: Supply path for lsmod.
8476 * stp_check: Removed.
8478 2005-08-09 Graydon Hoare <graydon@redhat.com>
8481 (delete_statement_symresolution_info): New struct.
8482 (symresolution_info::visit_delete_statement): Use it.
8483 (delete_statement_typeresolution_info): New struct.
8484 (typeresolution_info::visit_delete_statement): Use it.
8485 (symresolution_info::find_var): Accept -1 as 'unknown' arity.
8486 * elaborate.h: Update to reflect changes in .cxx.
8487 * translate.cxx (mapvar::del): New method.
8488 (c_unparser::getmap): Check arity >= 1;
8489 (delete_statement_operand_visitor): New struct.
8490 (c_unparser::visit_delete_statement): Use it.
8491 * staptree.cxx (vardecl::set_arity): Accept and ignore -1.
8492 (vardecl::compatible_arity): Likewise.
8493 * testsuite/buildok/eight.stp: New test for 'delete' operator.
8495 2005-08-08 Roland McGrath <roland@redhat.com>
8497 * loc2c-test.c: New file.
8498 * Makefile.am (noinst_PROGRAMS): Add loc2c-test.
8499 (loc2c_test_SOURCES, loc2c_test_LDADD): New variables.
8500 * Makefile.in, aclocal.m4: Regenerated.
8502 2005-08-08 Frank Ch. Eigler <fche@elastic.org>
8504 * stap.1.in: Autoconfify old man page.
8505 * configure.ac: Make it so.
8507 * configure, Makefile.in, aclocal.m4: Regenerated.
8509 2005-08-05 Frank Ch. Eigler <fche@elastic.org>
8511 * runtest.sh: Keep around log files from crashed processes,
8512 those whose rc is neither 0 nor 1.
8514 2005-08-05 Frank Ch. Eigler <fche@elastic.org>
8516 * tapsets.cxx (query_statement|function|cu|module): Add explicit
8517 nested try/catch, since elfutils iteration seems to block
8520 2005-08-05 Frank Ch. Eigler <fche@elastic.org>
8523 * translate.cxx (*): Added unlikely() markers to most emitted error
8525 (mapvar::get,set): Handle NULL<->"" impedance mismatch.
8526 (itervar::get_key): Ditto. Use base index=1 for keys.
8527 * testsuite/buildok/one.stp: Extend. And it runs with -p5 too.
8528 * stap.1: Document use of ";" statament as mechanism for grammar
8529 ambiguity resolution.
8530 * stp_check.in: Set $prefix.
8531 * systemtap.spec.in: Prereq kernel-devel, kernel-debuginfo,
8533 * tapsets.cxx: Make slightly less verbose.
8535 2005-08-03 Graydon Hoare <graydon@redhat.com>
8537 * tapsets.cxx (dwflpp): Fix address calculation logic a bit,
8538 and use prologue-end addresses for function probes.
8540 2005-08-03 Frank Ch. Eigler <fche@redhat.com>
8542 * stap.1: More meat, all stub sections filled.
8543 * elaborate.cxx (visit_assignment): Add numerous missing cases.
8544 * parse.cxx: Parse ".=" operator.
8545 * testsuite/semok/sixteen.stp: Check them.
8546 * main.cxx (usage): Don't show incompletely supported options.
8548 2005-08-03 Martin Hunt <hunt@redhat.com>
8550 * stp_check.in : Copy sources to /var/cache/systemtap.
8551 * systemtap.spec.in: Install stp_check.
8552 * Makefile.am (install-exec-local): Install stp_check.
8554 2005-08-03 Martin Hunt <hunt@redhat.com>
8556 * configure.ac: Add stp_check to AC_CONFIG_FILES.
8557 * stp_check.in : New file.
8559 2005-08-03 Frank Ch. Eigler <fche@elastic.org>
8561 * README: Be more specific about prerequisites.
8562 * tapset/builtin_string.stp: New builtin.
8563 * testsuite/buildok/seven.stp, semko/eighteen.stp: New tests.
8565 2005-08-03 Roland McGrath <roland@redhat.com>
8567 * configure.ac, systemtap.spec.in: Version 0.2.1.
8568 * Makefile.in, aclocal.m4, configure: Regenerated.
8570 2005-08-02 Roland McGrath <roland@redhat.com>
8572 * loc2c.c (emit_bitfield): Return bool, value from emit_base_fetch.
8573 (c_translate_fetch): Update caller.
8574 (c_translate_pointer): Never ignore emit_base_fetch return value.
8576 * systemtap.spec.in (%install): Remove parameters after %makeinstall.
8578 2005-08-02 Frank Ch. Eigler <fche@elastic.org>
8580 * loc2.c (emit_loc_address): Emit interleaved declaration into
8581 its own nested { } block.
8582 * tapsets.cxx (literal_stmt_for_local): Emit deref_fault block
8584 * tapset/builtin_hexstring.stp: New builtin.
8585 * testsuite/buildok/six.stp: New test.
8587 2005-08-02 Frank Ch. Eigler <fche@elastic.org>
8589 * tapsets.cxx (emit_registrations): Treat module_name="kernel"
8590 as if module_name="".
8592 2005-08-01 Graydon Hoare <graydon@redhat.com>
8594 * staptree.{cxx,h} (probe_point::component): Add a ctor.
8595 * tapsets.cxx (dwarf_derived_probe): Synthesize concrete
8596 probe_point for matched pattern.
8598 (dwarf_query::add_kernel_probe)
8599 (dwarf_query::add_module_probe): Remove, they were noise.
8600 (dwflpp::module_name_matches): Don't call get_module_dwarf().
8602 2005-08-01 Frank Ch. Eigler <fche@elastic.org>
8604 * tapsets.cxx: Support ".return" option for function probe points.
8605 * testuite/buildok/five.stp: Try it.
8607 2005-08-01 Frank Ch. Eigler <fche@elastic.org>
8609 * elaborate.cxx (derive_probes, semantic_pass_symbols): Improve
8610 error message specificity.
8611 * translate.cxx (emit_module_init): Compact partial registration
8613 (emit_module_exit): Invert deregistration sequence.
8614 * testsuite/buildok/four.stp: Some module() test case.
8616 2005-08-01 Frank Ch. Eigler <fche@elastic.org>
8618 * elaborate.cxx (derive_probes): Print error if results empty.
8619 * tapsets.cxx (dwflpp_assert): Handle positive RCs, which likely
8621 (dwflpp::setup): Improve missing debug-info messages.
8622 * testsuite/semko/sixteen,seventeen.stp: New tests.
8623 * runtest.sh: Save stdout/stderr of FAIL/XPASS test cases.
8624 * Makefile.am (clean-local): Clean up testsuite/.
8625 * Makefile.in, aclocal.m4: Regenerated.
8627 2005-07-29 Frank Ch. Eigler <fche@redhat.com>
8629 From Graydon Hoare <graydon@redhat.com:
8630 * tapsets.cxx (var_expanding_copy_visitor): Correct lvalue cases.
8632 2005-07-29 Frank Ch. Eigler <fche@redhat.com>
8634 * Makefile.am: Make sure stpd goes into libexec/systemtap/
8635 * Makefile.in: Regenerated.
8637 2005-07-29 Frank Ch. Eigler <fche@redhat.com>
8639 * configure.ac: Fail configure stage if elfutils 0.111+ is not found.
8640 * Makefile.am, elaborate.cxx, tapsets.cxx: Unconditionalize.
8641 * configure, Makefile.in, config.in: Regenerated.
8643 2005-07-29 Roland McGrath <roland@redhat.com>
8645 * Version 0.2 distribution.
8647 * systemtap.spec.in: Include %{_datadir}/systemtap/tapset directory.
8648 (%check): Add section, run make check.
8649 * Makefile.am (EXTRA_DIST): Add runtest.sh.
8650 * Makefile.in: Regenerated.
8652 * systemtap.spec.in: Include man pages.
8653 * Makefile.am (man_MANS): Renamed to dist_man_MANS.
8655 * configure.ac: Add AM_CONDITIONAL definition of HAVE_LIBDW.
8656 * Makefile.am [HAVE_LIBDW] (stap_SOURCES_libdw): New variable.
8657 (stap_SOURCES): Use it, moving loc2c.c there.
8658 * configure, config.in: Regenerated.
8660 * tapsets.cxx: <libdw.h> -> <elfutils/libdw.h>
8661 * loc2c.c, loc2c.h: Likewise.
8663 * main.cxx (main): Check return value of system.
8665 * systemtap.spec.in (LDFLAGS): Punt using $ORIGIN here, just hard-code
8667 (elfutils_version): Bump to 0.111.
8668 [bundled_elfutils]: Don't massage libdwfl.h header any more.
8670 * configure.ac: Don't check for libelf.h, not actually #include'd.
8671 Update -ldw check for merged libdwfl+libdw.
8672 (stap_LIBS): New substituted variable. Set only this, not LIBS,
8674 * Makefile.am (stap_LDADD): New variable, use @stap_LIBS@.
8676 * Makefile.am (AM_CPPFLAGS): Use ${pkgdatadir}.
8677 (AM_CFLAGS): Use -W instead of -Wextra, for gcc 3 compatibility.
8678 (stpd_LDFLAGS): Variable removed.
8679 (AM_MAKEFLAGS): Variable removed.
8681 2005-07-28 Frank Ch. Eigler <fche@elastic.org>
8683 * elaborate.cxx (find_var): Correct array dereferencing thinko.
8685 2005-07-28 Graydon Hoare <graydon@redhat.com>
8687 * elaborate.cxx (derived_probe::derived_probe): Accept NULL probe.
8688 * staptree.cxx (provide, require): Move from here...
8689 * staptree.h: to here, and virtualize deep-copy methods.
8691 (c_unparser::emit_common_header): Include loc2c-runtime.h
8693 (dwflpp::iterate_over_modules): Use new, faster getmodules loop.
8694 (dwflpp::literal_stmt_for_local): New method, call loc2c.
8695 (var_expanding_copy_visitor): New struct which expands $-vars.
8696 (dwarf_derived_probe): Rebuild this->body using var expander.
8697 (query_function): Refactor logic a bit for speed.
8698 * loc2c.{c,h}: Copies (with minor changes) of Roland's work
8700 * Makefile.am (AM_CFLAGS): Set to elfutils-style.
8701 (stap_SOURCES): Add loc2c.c.
8702 * Makefile.in: Regenerate.
8704 2005-07-28 Frank Ch. Eigler <fche@redhat.com>
8706 * stap.1: Beginnings of a man page.
8707 * Makefile.am: Install it. Comment out stpd LDADD goodies.
8708 * configure.ac: Futilely complain about non-stpd LIBS.
8709 * Makefile.in, configure.in: Regenerated.
8710 * main.cxx (usage): Remove ARGS from help text, as nothing is
8711 done with these yet.
8713 2005-07-28 Frank Ch. Eigler <fche@redhat.com>
8715 * translate.cxx: Add "pt_regs*" field to context.
8716 * tapsets.cxx (*): Correct kprobes API interface.
8717 * testsuite/buildok/three.stp: New test, copied from semok.
8718 * Makefile.am (install-data-local): Also install runtime/relayfs,
8719 so scripts can build against headers located thereunder.
8720 * Makefile.in: Regenerated.
8722 2005-07-28 Frank Ch. Eigler <fche@redhat.com>
8725 * main.cxx (main): Preset -R and -I options from environment
8726 variables (if set). Pass guru mode flags to parser.
8727 * parse.cxx (privileged): New parser operation flag. Update callers.
8728 (parse_embeddedcode): Throw an error if !privileged.
8729 (parse_functiondecl): Change signature. Prevent duplicates.
8730 (parse_globals): Ditto.
8731 * parse.h: Corresponding changes.
8732 * tapset/*.stp: Beginnings of real tapset library, to replace
8734 * tapsets.cxx: Greatly reduce verbose mode output.
8735 * Makefile.am: Install & dist it.
8736 * runtest.sh: Refer to it.
8737 * Makefile.in, aclocal.m4: Regenerated.
8738 * testsuite/*/*.stp: Set guru mode via /bin/sh if needed.
8739 * testusite/*/*ko.stp: Homogenize shell scripts.
8741 2005-07-28 Frank Ch. Eigler <fche@redhat.com>
8745 * elaborate.cxx (semantic_pass_symbols): Print a more helpful
8746 error message around exceptions.
8747 * elaborate.h (systemtap_session): Add guru_mode field.
8748 * main.cxx (main): Initialize it to false. Add version-sensitive
8749 script library searching. Add more failure messages.
8750 * tapsets.cxx (dwflpp_assert): Add a decorative text parameter.
8753 2005-07-28 Martin Hunt <hunt@redhat.com>
8755 * Makefile.am (install-data-local): Add runtime/transport.
8756 * Makefile.in: regenerated.
8758 2005-07-26 Graydon Hoare <graydon@redhat.com>
8760 * elaborate.cxx: Revert builtin-function code.
8761 * translate.cxx: Likewise.
8762 * tapsets.{h,cxx}: Likewise.
8764 2005-07-26 Martin Hunt <hunt@redhat.com>
8766 * buildrun.cxx (compile_pass): Add -Wno-unused to CFLAGS because
8767 usually a module doesn't use every function in the runtime.
8769 2005-07-26 Martin Hunt <hunt@redhat.com>
8771 * Makefile.am (stpd_LDFLAGS): Set rpath correclty because otherwise
8772 automake doesn't seem to get it right when binaries are in libexec
8774 (AM_CPPFLAGS): revert.
8775 * systemtap.spec.in (LDFLAGS): Set libexecdir here instead.
8777 2005-07-26 Frank Ch. Eigler <fche@redhat.com>
8779 Support %{ embedded-c %}
8780 * staptree.h (embeddedcode): New statement subtype. Stub support in
8782 * staptree.cxx: Ditto.
8783 * parse.cxx: Parse %{ / %}. Accept "_" as identifier leading char.
8784 (parse_probe): Simplify calling convention.
8785 * elaborate.h: Store embedded code.
8786 * elaborate.cxx: Pass it.
8787 * translate.cxx: Transcribe it. Return some dropped module init/exit
8789 * Makefile.am: Add buildok/buildko tests.
8790 * Makefile.in: Regenerated.
8791 * main.cxx: Return EXIT_SUCCESS/FAILURE even for weird rc.
8792 * testsuite/parseok/nine.stp: Test _identifiers.
8793 * testsuite/transko/*.stp: Tweak to force -p3 rather than -p2 errors.
8794 * testsuite/semok/transko.stp: ... and keep it that way in the future.
8795 * testsuite/parse*/*: Some new tests for %{ %}.
8796 * testsuite/build*/*: New tests for -p4.
8798 2005-07-26 Martin Hunt <hunt@redhat.com>
8800 * Makefile.am (AM_CPPFLAGS): Set PKGLIBDIR correctly.
8802 2005-07-26 Martin Hunt <hunt@redhat.com>
8804 * systemtap.spec.in: Stpd goes in libexec/systemtap.
8805 * Makefile.am (libexecdir): Set to libexecdir/systemtap.
8806 * aclocal.m4, Makefile.in: Regenerated
8808 2005-07-25 Roland McGrath <roland@redhat.com>
8810 * configure.ac: Don't define PKGLIBDIR and PKGDATADIR here.
8811 * Makefile.am (AM_CPPFLAGS): New variable, use -D here instead.
8812 (dist-hook): Don't remove ChangeLog files.
8813 (install-data-local): Don't install docs, just runtime stuff.
8814 (rpm, clean-local): Use make variables instead of @substitution@s.
8815 * configure, config.in, aclocal.m4, Makefile.in: Regenerated
8817 2005-07-22 Graydon Hoare <graydon@redhat.com>
8819 * translate.cxx (itervar): New class.
8820 (*::visit_foreach_loop): Implement.
8822 * staptree.cxx (deep_copy_visitor::*): Copy tok fields.
8823 * elaborate.cxx (lvalue_aware_traversing_visitor):
8824 (mutated_map_collector):
8825 (no_map_mutation_during_iteration_check): New classes.
8826 (semantic_pass_maps): New function to check map usage.
8827 (semantic_pass): Call it.
8828 * testsuite/transok/eight.stp: Test 'foreach' loop translation.
8829 * testsuite/semko/{thirteen,fourteen,fifteen}.stp:
8830 Test prohibited forms of foreach loops.
8832 2005-07-21 Martin Hunt <hunt@redhat.com>
8834 * Makefile.am (EXTRA_DIST): Add systemtap.spec.
8835 (install-data-local): Install docs and probes.
8839 * configure.ac: Set initial version to 0.1.1.
8840 (pkglibdir): Set to libexec.
8842 * Makefile.in: Regenerated.
8844 2005-07-20 Graydon Hoare <graydon@redhat.com>
8846 * elaborate.{cxx,h} (find_array): Remove.
8847 (find_scalar): Rename to find_var, add array support.
8848 * staptree.{cxx,h} (vardecl::compatible_arity): New method.
8849 * translate.cxx: Refactor, add array read/write support.
8850 * testsuite/transok/three.stp: Uncomment array uses.
8851 * testsuite/transok/seven.stp: New test of array r/w.
8853 2005-07-20 Frank Ch. Eigler <fche@redhat.com>
8855 * tapsets.cxx (*::emit_[de]registrations): Add logic for probe
8856 lifecycle control (session_state).
8857 * translate.cxx (emit_common_header,emit_module_{init,exit}): Ditto.
8858 (visit_*): Use per-context errorcount.
8860 2005-07-19 Frank Ch. Eigler <fche@redhat.com>
8862 * Makefile.am (dist-hook): Complete the resulting tarball.
8863 * Makefile.in: Regenerated.
8865 2005-07-19 Frank Ch. Eigler <fche@redhat.com>
8867 * translate.cxx (emit_module_init/exit, translate_pass): Conform
8868 to newer runtime startup/shutdown hooks.
8870 2005-07-15 Frank Ch. Eigler <fche@redhat.com>
8872 * Makefile.am (install-data-local): Correct typo.
8873 * buildrun.cxx (compile_pass): Ditto.
8874 * main.cxx (main): Print errors if passes 4 or 5 fail.
8876 2005-07-14 Frank Ch. Eigler <fche@redhat.com>
8878 * buildrun.cxx (compile_pass, run_pass): Get closer to a working
8880 * translate.cxx (emit_module_init, emit_common_header): Ditto.
8881 (translate_pass): Ditto.
8883 2005-07-14 Frank Ch. Eigler <fche@redhat.com>
8885 * Makefile.am (stpd): Install in $pkglibdir.
8886 (runtime): Copy to $pkgdatadir.
8887 * configure.ac: Pass along pkgdatadir and pkglibdir.
8888 * main.cxx: Default runtime_path from pkgdatadir.
8889 * buildrun.cxx (run_pass): Correct stpd directory.
8890 * Makefile.in, configure, config.in: Regenerated.
8892 2005-07-12 Graydon Hoare <graydon@redhat.com>
8895 (semantic_pass_symbols): Only enter body if non-null.
8896 (semantic_pass_types): Likewise.
8897 (semantic_pass): Pass session to register_standard_tapsets.
8899 (builtin_collector): New struct.
8900 (hookup_builtins): New function.
8901 (translate_pass): Only translate functions with bodies.
8902 (c_unparser::emit_common_header): Likewise, and call hookup_builtins.
8903 * tapsets.hh (builtin_function): New class.
8904 (register_standard_tapsets): Change parameter to session.
8905 * tapsets.cc (bultin_function::*): Implement class.
8906 (register_standard_tapsets): Register printk, log, warn.
8907 * testsuite/transok/six.stp: New test.
8909 2005-07-12 Frank Ch. Eigler <fche@redhat.com>
8911 * buildrun.cxx (compile_pass): Make non-verbose mode quieter.
8912 (run_pass): Spawn stpd for dirty work.
8913 * Makefile.am: Also build stpd into libexecdir.
8914 * configure.ac: Pass LIBEXECDIR.
8915 * Makefile.in, configure, config.in: Regenerated.
8918 2005-07-11 Graydon Hoare <graydon@redhat.com>
8920 * staptree.cxx (require): Generally handle null pointers in src.
8921 (deep_copy_visitor::visit_if_statement): Revert fche's change.
8923 2005-07-11 Frank Ch. Eigler <fche@redhat.com>
8925 * parse.cxx (parse_literal): Compile cleanly on 64-bit host.
8926 * staptree.cxx (deep_copy_visitor::visit_if_statement): Don't
8927 freak on a null if_statement.elseblock.
8929 2005-07-07 Graydon Hoare <graydon@redhat.com>
8931 * staptree.{h,cxx} (deep_copy_visitor): New visitor.
8933 (derived_probe::derived_probe):
8934 (alias_expansion_builder::build): Use it.
8935 * testsuite/semok/fifteen.stp: New test which relies on deep copy.
8937 2005-07-07 Frank Ch. Eigler <fche@redhat.com>
8939 * Makefile.am (dist): Package up the source tree, including
8940 testsuite and runtime.
8941 * main.cxx: Use clog instead of cerr for logging messages.
8942 * buildrun.cxx: Ditto.
8943 (compile_pass): Add -Iruntime/user for test mode.
8944 * translate.cxx (*): Commonalize test/real mode output.
8945 * Makefile.in: Regenerated.
8947 2005-07-05 Graydon Hoare <graydon@redhat.com>
8949 * elaborate.{h,cxx}: Revert previous changes.
8950 * tapsets.{h,cxx}: Adapt to verbose as a member of session.
8951 * elaborate.cxx (alias_expansion_builder::build): Avoid copying
8952 locals between alias definition and use.
8953 * testsuite/semok/{twelve,thirteen,fourteen}.stp: New tests.
8954 * staptree.cxx (probe_alias::printsig): Print equals sign.
8956 2005-07-05 Frank Ch. Eigler <fche@redhat.com>
8958 * elaborate.h (systemtap_session): Add more command-line arguments.
8959 * staptree.h (verbose): Bad global, no donut.
8960 * elaborate.cxx: Temporarily disable verbose variable access.
8961 * main.cxx: Support more arguments, build/run passes. Revamp
8962 temporary file generation and partial-pass output generation.
8963 * tapsets.cxx, translate.cxx: Emit just enough extra punctuation
8964 and fluff to make generated probe pass -Werror.
8965 * buildrun.cxx, buildrun.h: New files for passes 4/5. Partial
8966 support for build pass, nothing on probe execution yet.
8967 * testsuite/transok/*.stp: Force just -p3, now that -p4/5 exist.
8968 * Makefile.am, Makefile.in: Corresponding changes.
8970 2005-07-04 Graydon Hoare <graydon@redhat.com>
8972 * elaborate.h (symresolution_info::current_derived_probe): New field.
8973 (symresolution_info::current_probe): Change type.
8974 * elaborate.cxx (semantic_pass_symbols): Add passes for resolving
8975 locals in pre-derivation base probes and pre-expansion aliases.
8976 (symresolution_info::visit_symbol):
8977 (symresolution_info::find_scalar): Update to match new field.
8979 2005-06-27 Graydon Hoare <graydon@redhat.com>
8981 * staptree.{h,cxx} (probe_alias): New structure.
8982 * parse.{h,cxx} (parser::parse): Parse probes or probe aliases.
8983 (parser::parse_probe): Likewise.
8985 (derived_probe_builder):
8988 (alias_derived_probe): Move from here,
8989 * elaborate.{h,cxx}: to here.
8990 * elaborate.h (systemtap_session::pattern_root): New member.
8991 (register_library_aliases): New function.
8992 * tapsets.cxx: Build one dwarf_derived_probe per target address.
8994 2005-06-23 Graydon Hoare <graydon@redhat.com>
8997 (probe_type): New enum.
8998 (probe_spec): New struct.
8999 (dwarf_derived_probe): Reorganize a bit, interpret .return.
9000 (query_statement): Translate addresses back to module space.
9001 (probe_entry_function_name):
9002 (probe_entry_struct_kprobe_name):
9003 (foreach_dwarf_probe_entry):
9004 (declare_dwarf_kernel_entry):
9005 (deregister_dwarf_kernel_entry):
9006 (register_dwarf_kernel_entry):
9007 (register_dwarf_module):
9008 (declare_dwarf_module_entry):
9009 (deregister_dwarf_module_entry):
9010 (register_dwarf_module_entry): New functions.
9011 (dwarf_derived_probes::emit_probe_entries):
9012 (dwarf_derived_probes::emit_registrations):
9013 (dwarf_derived_probes::emit_deregistrations): Implement.
9015 2005-06-21 Frank Ch. Eigler <fche@redhat.com>
9017 * config.in, configure: Regenerated.
9018 * tapsets.cxx: Make dwarf code conditional on new elfutils header.
9020 2005-06-20 Graydon Hoare <graydon@redhat.com>
9022 * configure.ac: Scan for libdwfl.
9023 * staptree.h (verbose): New global.
9024 * main.cxx (usage, main): Implement -v option.
9025 * tapsets.cxx (dwflpp): New struct.
9026 (query_statement): New function.
9027 (query_function): New function.
9028 (query_cu): New function.
9029 (query_module): New function.
9030 (dwarf_derived_probe): Implement primary forms.
9032 2005-06-14 Graydon Hoare <graydon@redhat.com>
9034 * tapsets.h: New file.
9035 (derived_probe_builder): Callback for making derived probes.
9036 (match_key): Component of pattern-matching tree.
9037 (match_node): Other component of pattern-matching tree.
9038 * tapsets.cxx: Add pattern-matching system for probes.
9039 (alias_derived_probe): Skeleton for alias probes.
9040 (dwarf_derived_probe): Skeleton for dwarf probes.
9041 (register_standard_tapsets): Registry for standard tapsets.
9043 2005-06-13 Frank Ch. Eigler <fche@redhat.com>
9045 Start separating out translator-side probe point recognition.
9046 * tapsets.cxx: New file.
9047 (be_derived_probe): Support for begin/end probes.
9048 (derive_probe): Ditto. Reject anything unrecognized.
9049 * translator.cxx: Move out old code.
9050 * Makefile.am: Add new source file.
9051 * testsuite/semok/*: Switch to begin/end probes only.
9053 2005-06-08 Frank Ch. Eigler <fche@redhat.com>
9056 Implement all basic scalar operators, including modify-assignment.
9057 * parse.cxx (lexer): Allow multi-character lookahead in order to
9058 scan 1/2/3-character operators.
9059 (parse_boolean_or/and/xor/shift): New routines.
9060 * translate.cxx (visit_assignment, visit_binary_expression,
9061 visit_*_crement): Generally rewrote.
9062 (visit_*): Added more parentheses in output.
9063 (emit_module_init): Initialize globals.
9064 * staptree.h, elaborate.cxx, elaborate.h: Remove exponentiation.
9065 * main.cxx (main): Add an end-of-line to output file.
9066 * testsuite/*: Several new tests.
9068 2005-06-05 Frank Ch. Eigler <fche@elastic.org>
9070 Implement for/next/continue/break/while statements.
9071 * staptree.h: Declare new 0-arity statement types. Tweak for_loop.
9072 * parse.cxx: Parse them all.
9073 * translate.cxx (c_unparser): Maintain break/continue label stack.
9074 (visit_for_loop, *_statement): New implementations.
9075 * elaborate.*, staptree.cxx: Mechanical changes.
9076 * testsuite/parseok/ten.stp, semko/twelve.stp, transko/two.stp,
9077 transok/five.stp: New tests.
9079 2005-06-03 Frank Ch. Eigler <fche@elastic.org>
9081 * elaborate.cxx (find_*): Remove arity checks from here ...
9082 * staptree.cxx (set_arity): Put arity match assertion here.
9083 * testsuite/semko/{six,nine}.stp: Confirm logic.
9084 * testsuite/transko/one.stp: First translation-time ko test.
9086 2005-06-03 Frank Ch. Eigler <fche@redhat.com>
9088 * TODO: Removed entries already represented in bugzilla.
9089 * elaborate.cxx: Rewrite type inference for several operators.
9090 * main.cxx (main): For -p2 runs, print types of function/probe locals.
9091 * parse.cxx (scan): Identify more two-character operators.
9092 (parse_comparison): Support the whole suite.
9093 * translate.cxx (visit_unary_expression, logical_or_expr,
9094 logical_and_expr, comparison,ternary_expression): New support.
9095 * testsuite/parseok/semok.stp: Clever new test.
9096 * testsuite/transok/four.stp: New test.
9097 * testsuite/*: Some tweaked tests for syntax changes.
9099 2005-06-03 Frank Ch. Eigler <fche@redhat.com>
9101 * parse.cxx (scan): Support C and C++ comment styles.
9102 * testsuite/parseok/four.stp: Test them some ...
9103 * testsuite/parseko/nine.stp: ... and some more.
9105 2005-06-02 Frank Ch. Eigler <fche@redhat.com>
9107 * translate.cxx (visit_concatenation, visit_binary_expression):
9108 New basic implementation.
9109 (*): Reduce emitted whitespace and remove `# LINE "FILE"' lines.
9111 2005-06-02 Frank Ch. Eigler <fche@redhat.com>
9113 Parse foreach construct. Added fuller copyright notices throughout.
9114 * staptree.h (foreach_loop): New tree node type.
9115 * staptree.cxx: Print it, visit it, love it, leave it.
9116 * parse.cxx: Parse it.
9117 (parse_stmt_block): Don't require ";" separators between statements.
9118 (parse_array_in): Use [] as index group operator instead of ().
9119 * elaborate.cxx (visit_foreach_loop): New code.
9120 * translate.cxx: Slightly tighten errorcount/actioncount handling.
9121 * main.cxx: Accept "-" as script file name standing for stdin.
9122 (visit_arrayindex): Switch to simpler set_arity call.
9123 * configure.ac: Generate DATE macro.
9124 * Makefile.in, configure, config.in: Regenerated.
9125 * testsuite/*: New/updated tests for syntax changes, foreach ().
9127 2005-05-30 Frank Ch. Eigler <fche@redhat.com>
9129 More fully parse & elaborate "expr in array" construct.
9130 * staptree.h (array_in): Make this unary. Update .cxx to match.
9131 * parse.cxx (parse_array_in): Rewrite.
9132 (parse_symbol_plain): Removed. Update .h to match.
9133 * elaborate.cxx (typeresolution_info::visit_array_in): New function.
9134 (find_array): Tentatively, accept arity=0.
9135 * translate.cxx (c_unparser::c_assign): New functions to eliminate
9136 much ugly duplication. Use throughout.
9137 (visit_symbol): Correct function formal argument search.
9138 (c_tmpcounter*::visit): Add missing recursion in several functions.
9139 * testsuite/*: Add new tests for array-in construct. Add the
9140 first "transok" test.
9141 * Makefile.am: Add transok tests.
9142 * Makefile.in: Regenerated.
9144 2005-05-26 Frank Ch. Eigler <fche@redhat.com>
9146 * translate.cxx: Traverse trees just for common-header generation,
9147 to emit explicit temp variables into context. Switch to explicit
9148 "frame" pointer in generated function/probe bodies. Initialize
9149 locals in function bodies. Rename "test_unparser" to "c_unparser"
9152 2005-05-24 Frank Ch. Eigler <fche@redhat.com>
9154 * elaborate.cxx (find_array): Support automagic tapset globals.
9155 * testsuite/semok/nine.stp: Test it.
9156 * staptree.cxx (stapfile print): List globals.
9158 2005-05-24 Frank Ch. Eigler <fche@redhat.com>
9160 * testsuite/semlib/*: New tapset library chunks for "-I" testing.
9161 * testsuite/semok/eight.stp, nine.stp: New tests.
9163 2005-05-22 Frank Ch. Eigler <fche@elastic.org>
9165 * Makefile.am (gcov): New target to generate test-coverage data from
9167 * Makefile.in: Regenerated.
9169 2005-05-20 Frank Ch. Eigler <fche@redhat.com>
9171 Many changes throughout. Partial sketch of translation output.
9172 * elaborate.*: Elaboration pass.
9173 * translate.*: Translation pass.
9174 * staptree.*: Simplified for visitor concept.
9175 * main.cxx: Translator mainline.
9176 * *test.cxx: Removed.
9177 * testsuite/*: Some new tests, some changed for newer syntax.
9179 2005-05-05 Frank Ch. Eigler <fche@redhat.com>
9181 * parse.cxx (parse): Add helper methods.
9182 (lexer::scan, parse_assignment): Parse "<<<" operator. Fix assignment
9184 (parse_symbol): Permit function with empty arg list.
9185 (parse_global, parse_statement, parse_functiondecl): Expect
9186 unconsumed leading keyword.
9187 (parse_global): Don't use ";" termination.
9188 * parse.h: Corresponding changes.
9189 * staptree.cxx (binary_expression::resolve_types): Fix <<<
9191 (translator_output): Improve pretty-printing.
9192 (*): Add general visitors to statement/expression types.
9193 * staptree.h: Corresponding changes. Tweak symresolution_info fields.
9194 Add semantic_error class.
9195 * semtest.cxx: Adapt to this.
9196 * testsuite/parseok/two.stp, semok/*.stp: Adapt to syntax changes.
9198 2005-03-15 Frank Ch. Eigler <fche@redhat.com>
9200 * semtest.cxx: Print probe signatures properly.
9201 * staptree.cxx (probe::printsig): New function.
9203 2005-03-15 Frank Ch. Eigler <fche@redhat.com>
9205 * TODO: New file. Include some probe-point-provider syntax examples.
9206 * parse.cxx (lexer::scan, parser::parse_literal): Support hex, octal
9208 (parse_probe, parse_probe_point): Modify for dotted syntax.
9209 * staptree.cxx: Ditto.
9210 * parsetest.cxx, semtest.cxx: Print parse/sem results even if
9211 .stp files were given on command line.
9212 * parse.h, staptree.h: Rename probe_point_spec -> probe_point.
9213 * runtest.sh: New test-runner front-end script.
9214 * Makefile.am: Use it for TESTS_ENVIRONMENT.
9215 * testsuite/*: Update probe point syntax. Add a bunch of new tests.
9217 2005-03-04 Frank Ch. Eigler <fche@redhat.com>
9219 * parse.cxx (scan): Support '$' characters in identifiers.
9220 (parse_symbol): Support thread-> / process-> shorthand.
9221 * staptree.cxx (symresolution_info::find): Split up into
9222 find_scalar, find_array, find_function.
9223 (resolve_symbols): Call the above for symbol/arrayindex/functioncall.
9224 (find_scalar): Add stub support for synthetic builtin variables.
9225 * staptree.h: Corresponding changes.
9226 * testsuite/*: Some new tests.
9228 2005-03-03 Frank Ch. Eigler <fche@redhat.com>
9230 * parse.cxx (parse_assignment): Assert lvalueness of left
9232 * staptree.h (expression): Add is_lvalue member.
9233 * staptree.cxx (functioncall::resolve_types): Don't crash on
9234 formal-vs-actual argument count mismatch.
9235 (*): Add some is_lvalue stub functions.
9236 * testsuite/*: Some new tests.
9238 2005-03-01 Frank Ch. Eigler <fche@redhat.com>
9240 * parse.cxx: Implement left-associativity for several types of
9241 operators. Add some more statement types. Parse functions.
9242 Be able to print tokens. Simplify error generating functions.
9243 Save tokens in all parse tree nodes.
9244 * parse.h: Corresponding changes.
9245 * staptree.cxx: Move tree-printing functions here. Add many
9246 new functions for symbol and type resolution.
9247 * staptree.h: Corresponding changes.
9248 * semtest.cxx: New semantic analysis pass & test driver.
9249 * testsuite/sem*/*: New tests.
9250 * parsetest.cxx: Separated parse test driver.
9251 * testsuite/parse*/*: Adapt tests to parsetest driver.
9252 * Makefile.am: Build semtest. Run its tests.
9253 * Makefile.in: Regenerated.
9255 2005-02-11 Frank Ch. Eigler <fche@redhat.com>
9257 * parse.cxx, parse.h: New files: parser.
9258 * staptree.h: New file: semantic object declarations.
9259 * staptree.cxx: New dummy driver file.