eteo [Fri, 21 Mar 2008 14:35:25 +0000 (14:35 +0000)]
2008-03-21 Eugene Teo <eugeneteo@kernel.sg>
PR 5528
* tapset/conversions.stp (user_string_n, user_string_n2,
user_string_n_warn, user_string_n_quoted, user_short, user_short_warn,
user_int, user_int_warn, user_long, user_long_warn, user_char,
user_char_warn): New user_* functions.
* stapfuncs.5.in: Documented the new functions.
* testsuite/systemtap.stress/conversions.stp: Test new functions.
* testsuite/buildok/conversions.stp: Test new functions.
* testsuite/buildok/conversions-embedded.stp: Test new functions.
hiramatu [Sat, 15 Mar 2008 00:02:00 +0000 (00:02 +0000)]
2008-03-14 Masami Hiramatsu <mhiramat@redhat.com>
PR 3542
* buildrun.cxx (compile_pass): Add an autoconf to check the kernel
supports batch unregistration.
* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Add an
array of probe pointers for batch unregistration.
* tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): Use
unregister_k(ret)probes if it is supported.
* runtime/autoconf-unregister-kprobes.c : New file.
brolley [Mon, 10 Mar 2008 18:46:14 +0000 (18:46 +0000)]
2008-03-10 Dave Brolley <brolley@redhat.com>
PR5189
* translate.cxx (probe_or_function_needs_deref_fault_handler): New member of
c_unparser.
(c_unparser::emit_function): Initialize probe_or_function_needs_deref_fault_handler.
Check it after the body is visited and generate a deref fault handler if necessary.
(c_unparser::emit_probe): Likewise.
(c_unparser::visit_print_format): Correct the compoenent type for an overridden string
literal. Generate code to check that pointer arguments to %m can be dereferenced.
Generate casts for printf arguments as necessary.
* elaborate.cxx (typeresolution_info::visit_print_format): Desired type for conv_memory
is pe_long.
brolley [Mon, 10 Mar 2008 18:45:34 +0000 (18:45 +0000)]
2008-03-10 Dave Brolley <brolley@redhat.com>
PR5189
* systemtap.printf/memory1.{stp,exp}: Rewrite to reflect new %m safety checks.
* systemtap.stress/conversions.exp: Add a test for invalid argument to %m.
brolley [Mon, 10 Mar 2008 18:45:03 +0000 (18:45 +0000)]
2008-03-10 Dave Brolley <brolley@redhat.com>
PR5189
* vsprintf.c (_stp_vsnprintf): Arguments for dynamic width and precision
are of type 'int' again.
* loc2c-runtime.h (deref_string): Copy the data only if dst is not NULL.
(deref_buffer): New macro.
hunt [Wed, 27 Feb 2008 19:45:45 +0000 (19:45 +0000)]
2008-02-27 Martin Hunt <hunt@redhat.com>
* sym.h (_stp_module): Add text_size, lock, and unwind data
pointer.
* sym.c (_stp_find_module_by_addr): New function.
(_stp_kallsyms_lookup): Call _stp_find_module_by_addr().
(_stp_get_unwind_info): New.
* runtime.h: Move debug macros to debug.h. Include it.
* debug.h: New file.
* map.c: Update debug calls.
* map-gen.c: Update debug calls.
* pmap-gen.c: Update debug calls.
* mempool.c: New file.
* symbols.c: Use rwlocks. Use new dbug macros. Handle
unwind info if present.
* transport.c: Include mempool.c. Update dbug and kbug calls
to new macros.
* transport_msgs.h (_stp_command_name): Add
struct containing message names for debugging.
* control.c, procfs.c: Use new dbug macros. Use
new mempool functions.
brolley [Wed, 27 Feb 2008 16:42:35 +0000 (16:42 +0000)]
2008-02-21 Dave Brolley <brolley@redhat.com>
PR5189
* staptree.h (print_format::conv_memory): New enumerator.
(print_format::width_type): New enumeration.
(print_format::precision_type): New enumeration.
(format_component::widthtype): New member.
(format_component::prectype): New member.
(format_component::is_empty): Test widthtype and prectype.
(format_component::clear): Clear widthtype and prectype.
* staptree.cxx (print_format::components_to_string): Handle dynamic width and precision.
Handle conv_memory.
(print_format::string_to_components): Parse dynamic width and precision specifiers.
Set widthtype and prectype. Parse %m format specifier.
* elaborate.h (typeresolution_info::check_arg_type): New method.
* elaborate.cxx (typeresolution_info::visit_print_format): Account for dynamic width
and precision when computing the expected number of arguments. Check the types of
arguments for dynamic width and precision. Use check_arg_type to check the types of
all arguments. Handle print_format::conv_memory.
(typeresolution_info::check_arg_type): New method.
* NEWS: Describe the enhancements above.
brolley [Wed, 27 Feb 2008 16:42:05 +0000 (16:42 +0000)]
2008-02-27 Dave Brolley <brolley@redhat.com>
PR5189
* vsprintf.c (_stp_vsnprintf): Extract arguments of type int64_t for
dynamic width and precision. Implement width and precision correctly for
the %b format specifier. Implement the %m specifier.
dsmith [Wed, 20 Feb 2008 19:04:04 +0000 (19:04 +0000)]
2008-02-20 David Smith <dsmith@redhat.com>
* tapsets.cxx (struct mark_derived_probe): Renamed 'probe_sig' to
'probe_format'.
(mark_derived_probe::mark_derived_probe): Added new "format" probe
point component.
(mark_derived_probe::parse_probe_format): Renamed from
'mark_derived_probe::parse_probe_sig'.
(struct mark_builder): Added typedefs. Converted mark_cache from
a map to a multimap to handle markers with the same name but
different formats.
(mark_builder::build): Added new 'format' probe parameter.
(register_standard_tapsets): Added new 'format' marker probe
optional parameter.
* stapprobes.5.in (parts): Documented new "format" probe
component.
roland [Wed, 20 Feb 2008 02:44:10 +0000 (02:44 +0000)]
2008-02-19 Roland McGrath <roland@redhat.com>
* tapsets.cxx (query_module): Use dwfl_module_getdwarf rather
than dwfl_module_getelf for e_machine check.
(dwarf_query::get_blacklist_section): Likewise for section search.
Ignore non-SHF_ALLOC sections.
dsmith [Tue, 19 Feb 2008 14:37:17 +0000 (14:37 +0000)]
2008-02-19 David Smith <dsmith@redhat.com>
PR 5672.
* tapsets.cxx (mark_derived_probe): Call probe_point copy ctor to
shallow-copy incoming base probe location before
recomputing/overwriting it.
brolley [Wed, 13 Feb 2008 16:43:08 +0000 (16:43 +0000)]
2008-02-13 Dave Brolley <brolley@redhat.com>
PR5609
* staptree.h (probe::collect_derivation_chain): Now takes vector<probe*>.
(probe::get_alias): New virtual method.
* elaborate.h (derived_probe::collect_derivation_chain): Now takes vector<probe*>.
* staptree.cxx (probe::collect_derivation_chain): Now takes vector<probe*>. Don't
cast 'this' to (derived_probe*).
* elaborate.cxx (derived_probe::collect_derivation_chain): Now takes vector<probe*>.
(alias_derived_probe::get_alias): New virtual method.
(alias_derived_probe::alias): New member.
(alias_expansion_builder::build): Call checkForRecursiveExpansion and emit a
diagnostic if recursion is detected. Pass alias to constructor of
alias_derived_probe.
(alias_expansion_builder::checkForRecursiveExpansion): New method.
* coveragedb.cxx: Pass vector<probe*> on all calls to collect_derivation_chain.
fche [Wed, 13 Feb 2008 03:33:18 +0000 (03:33 +0000)]
2008-02-12 Frank Ch. Eigler <fche@elastic.org>
* systemtap.context/context.exp: Build temporary modules under
build tree, to tolerate read-only source trees.
* {args,backtrace,pid}.tcl: Corresponding changes.
* systemtap_test_module2.c: Add a bunch of asm("")'s to prevent
inlining even better than noinline does.