hunt [Wed, 26 Oct 2005 08:29:38 +0000 (08:29 +0000)]
2005-10-26 Martin Hunt <hunt@redhat.com>
* map.c (_new_map_create, _new_map_del_node, _new_map_del_node,
_new_map_set_int64, _new_map_set_str,_new_map_get_int64,
_new_map_get_str, _new_map_get_stat, _new_map_set_stat):
New internal functions for the new API.
* map-int.c (__stp_map_set_int64): Modify to return an
error code.
* map-stat.c (_stp_map_add_stat): Ditto.
* map-str (_stp_map_set_str): Ditto.
* Doxyfile: Remove predefines NEED_STRING_VALS,
NEED_STATS, NEED_INT64.
* map-keys.c: Ditto.
* list.c (_stp_list_new): Ditto. Also set map->list.
* map-values.c: Ditto.
hunt [Wed, 26 Oct 2005 08:08:53 +0000 (08:08 +0000)]
2005-10-26 Martin Hunt <hunt@redhat.com>
* maps/map.test: Update with results for new tests.
* maps/*2.c: Tests for the new API.
* maps/ist.c: Renamed isx.c.
* maps/setadd.c: New test of adding and setting.
graydon [Thu, 20 Oct 2005 22:11:33 +0000 (22:11 +0000)]
2005-10-20 Graydon Hoare <graydon@redhat.com>
PR 917 (incomplete)
* staptree.h (struct statistic_decl): New struct.
(stapfile::stat_decls): New member.
* parse.h, parse.cxx
(parser::expect_known): Fix typo.
(parser::expect_number): New method.
(parser::parse_global): Parse global statistic_decls.
* elaborate.h (systemtap_session::stat_decls): New member.
* elaborate.cxx (semantic_pass_symbols): Copy per-file stat_decls
to session-wide.
(typeresolution_info::visit_assignment): Detect some semantic stats
errors in type resolution pass.
* translate.cxx (var::sd): New private member.
(var::var): Initialize it.
(var::sdecl): New accessor.
(var::init): Handle stats values.
(mapvar::mapvar): Pass through statistic_decl to var ctor.
(mapvar::get): Test for long explicitly.
(mapvar::set): Likewise.
(mapvar::init): Handle stats values.
(c_unparser::emit_common_header): Remove typedef of stats_t,
include stat.c when necessary.
(mapvar::key_typename): Typo.
(c_unparser::emit_map_type_instantiations): Thinko: value_typename not key_typename.
(c_unparser::c_typename): Implementation typename is "Stat", not "stats_t".
(c_unparser::c_assign): Fix bad error message.
(c_unparser_assignment::c_assignop): Handle operator <<<.
(c_unparser::getvar): Feed session statistic_decl into var.
(c_unparser::getmap): Likewise.
(c_unparser::visit_assignment): Handle operator <<<.
(c_tmpcounter_assignment::visit_symbol): Derive type from rvalue when present.
(c_unparser_assignment::visit_symbol)
(c_tmpcounter_assignment::visit_arrayindex)
(c_unparser_assignment::load_map_indices): Likewise.
(c_unparser::visit_arrayindex): Likewise, and Prohibit statistic rvalues.
(c_unparser_assignment::visit_arrayindex): Handle operator <<<.
* testsuite/semko/twentyfour.stp:
* testsuite/semko/twentyfive.stp:
* testsuite/semko/twentysix.stp:
* testsuite/semko/twentyseven.stp:
* testsuite/semko/twentyeight.stp:
* testsuite/semko/twentynine.stp:
* testsuite/semko/thirty.stp:
* testsuite/semko/thirtyone.stp: New tests for prohibited statistic contexts.
* testsuite/buildok/twentytwo.stp: New test for legal statistic contexts.
fche [Tue, 18 Oct 2005 17:59:17 +0000 (17:59 +0000)]
2005-10-18 Frank Ch. Eigler <fche@redhat.com>
PR 1477.
* main.cxx (main): Set PATH and LC_ALL, so
* buildrun.cxx (compile_pass, run_pass): ... and ...
* translate.cxx (emit_symbol_data): ... don't have to.
fche [Tue, 18 Oct 2005 12:40:59 +0000 (12:40 +0000)]
2005-10-18 Frank Ch. Eigler <fche@elastic.org>
PR 1482 cont'd.
* translator.cxx (emit_module_init): Set aside a variable for
detailed probe point id.
* tapsets.cxx (emit_registrations): Use it.
(add_probe_point): Correct synthesized probe-point typo.
hunt [Tue, 18 Oct 2005 04:34:05 +0000 (04:34 +0000)]
2005-10-17 Martin Hunt <hunt@redhat.com>
* transport.c (_stp_handle_start): Grab semaphore before
calling probe_start() and release after it is done.
(_stp_handle_exit): Ditto for exiting. This prevents
exiting before probe_start() is finished.
graydon [Mon, 17 Oct 2005 23:52:34 +0000 (23:52 +0000)]
2005-10-17 Graydon Hoare <graydon@redhat.com>
* testsuite/semko/twentyone.stp: Check function doesn't match inline.
* testsuite/semko/twentytwo.stp: Check inline doesn't match function.
* testsuite/buildok/six.stp: Change "function" to "inline".
* stapprobes.5.in: Describe "inline" probes.
* tapsets.cxx (TOK_INLINE): New token "inline".
(dwarf_query::has_inline_str)
(dwarf_query::has_inline_num)
(dwarf_query::inline_str_val)
(dwarf_query::inline_num_val): New members.
(dwarf_query::dwarf_query): Load new members.
(query_dwarf_inline_instance)
(query_dwarf_func)
(query_cu)
(query_module)
(dwarf_derived_probe::add_probe_point)
(dwarf_builder::build):
Use inline-related members where appropriate.
(dwarf_derived_probe::register_inline_variants): New method.
(dwarf_derived_probe::register_function_and_statement_variants):
Call it.
roland [Fri, 14 Oct 2005 11:30:45 +0000 (11:30 +0000)]
2005-10-14 Roland McGrath <roland@redhat.com>
PR 1271.
* loc2c.c (translate): Set LOC->byte_size in loc_noncontiguous result.
(struct location.address): New member `declare'.
(new_synthetic_loc, translate): Initialize it.
(struct location.type): Add loc_fragment, loc_decl to enum.
(c_emit_location): Emit unadorned code for loc_fragment.
(discontiguify): New function.
(c_translate_fetch, c_translate_store): Call it.
(get_bitfield): New function, broken out of ....
(emit_bitfield): ... here. Function removed.
(declare_noncontig_union): New function.
(max_fetch_size): New function.
(translate_base_fetch): New function, broken out of ...
(c_translate_fetch): ... here. Call it.
Use get_bitfield here, not emit_bitfield.
(c_translate_store): Likewise.
(c_emit_location): Emit declarations first.
* loc2c.c (dwarf_diename_integrate): Function removed.
Change all callers to use dwarf_diename.
2005-10-13 Roland McGrath <roland@redhat.com>
* loc2c.c (c_emit_location): Use final location's used_deref flag too.
* loc2c.c (translate): Pass LOC to alloc_location, not INPUT.
kevinrs [Wed, 12 Oct 2005 23:47:26 +0000 (23:47 +0000)]
tapset/systemcall.stp:
* Tested the first 15 aliases on fc4. Cleaned up
some code.
tapset/aux_syscalls.stp:
* Added file to contain aux helper functions that
are used by the system call tapset. Added embed-
ded C functions to extract values from user-
space pointers.
fche [Mon, 10 Oct 2005 17:06:57 +0000 (17:06 +0000)]
2005-10-10 Frank Ch. Eigler <fche@elastic.org>
PR 1456.
* translate.cxx (c_unparser_assignment): Rename "pre" field to "post",
add blurb to clarify polarity.
(visit_pre/post_crement): Flip passed flag value.
kevinrs [Fri, 7 Oct 2005 17:54:26 +0000 (17:54 +0000)]
* tapset/system_calls.stp: All 281 syscalls *prototyped*. They
are still untested. Many of the aliases useability are contin-
gent upon resolution of namely: bz #1295 & bz #1382.
fche [Thu, 6 Oct 2005 16:33:48 +0000 (16:33 +0000)]
2005-10-06 Frank Ch. Eigler <fche@elastic.org>
PR 1332.
* translate.cxx (emit_symbol_data): New function to transcribe
a processed address->symbol lookup table, based upon /proc/kallsyms.
2005-10-06 Frank Ch. Eigler <fche@elastic.org>
PR 1332.
* sym.h: New file to declare explicit symbol table struct.
* runtime.h (_stp_kallsyms_lookup_tabled): Use it if available.
* sym.c (_stp_symbol_sprint): HAS_LOOKUP mooted.
graydon [Wed, 5 Oct 2005 00:43:14 +0000 (00:43 +0000)]
2005-10-04 Graydon Hoare <graydon@redhat.com>
PR 1131.
* tapsets.cxx
(target_variable_flavour_calculating_visitor::visit_target_symbol)
(var_expanding_copy_visitor::visit_target_symbol):
Require guru mode for writing to target vars.
* testsuite/buildok/twenty.stp: Test writing to target vars.
fche [Sat, 1 Oct 2005 17:25:24 +0000 (17:25 +0000)]
2005-10-01 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx (get_module_dwarf): Add "required" parameter, which
throws an exception if debuginfo is not found.
(focus_on_module_containing_global_address): Tolerate miss.
(query_kernel_exists): New function to test for "kernel" module in
dwfl_getmodules() result set.
(dwarf_builder::build): Call it if appropriate.
graydon [Sat, 1 Oct 2005 00:10:52 +0000 (00:10 +0000)]
[ChangeLog]
2005-09-30 Graydon Hoare <graydon@redhat.com>
PR 1131.
* tapsets.cxx (dwflpp::find_variable_and_frame_base)
(dwflpp::translate_components)
(dwflpp::resolve_unqualified_inner_typedie)
(dwflpp::translate_final_fetch_or_store): New functions.
(dwflpp::literal_stmt_for_local): Factor a bit.
(variable_flavour_calculating_visitor::visit_target_symbol):
Don't fault on lvalue, just collect an extra char.
(var_expanding_copy_visitor::target_symbol_setter_functioncalls):
New member.
(var_expanding_copy_visitor::visit_assignment): New method.
(var_expanding_copy_visitor::visit_target_symbol): Permit lvalues.
mask_string.stp
function uses different algorithm to build symbolic
flag string from int. Now uses locals to do so. SMP
safe.
string.stp
add isinstr(s1,s2) - return 1 if s1 contains s2 else
return 0
tapset/mask_string.stp:
wrote a few aux functions that can be used by tapsets to derive
a bitmask symbolic string from a given number
tapset/string.stp:
strlen: Returns the length of the string argument
substr: Returns a substring starting at start/ending at stop
stapfuncs.5.in:
Added a STRING category with aforementioned functions
tapset/system_calls.stp
Exported more variable for more system calls
PR 1368.
* translate.cxx (emit_common_header): Move some MAX* definitions out ...
(translate_pass): ... to here. Fix probe_start API impedance mismatch.
(emit_module_init, exit): Tolerate registration errors, such as absence
of kretprobes support.
* map.c (_stp_cmp): New comparison function for sorts.
(_stp_swap): New swap function for bubble sort.
(_stp_map_sortn): New function.
(_stp_map_sort): New function.
(_stp_map_printn): New function.
(_stp_map_print): Convert to a macro.
PR 1306
* tapsets.cxx (dwflpp::has_single_line_record): New function.
(dwflpp::iterate_over_srcfile_lines): Throw when user requests
single statement line with multiple records (and provide advice).
(query_cu): Adjust call to match.
(query_srcfile_line): Fix indentation.
* arith.c (_stp_div64): Check for division by 0 or -1 first.
This simplifies things and removes the possibility of x86_64
trying LLONG_MIN/-1 and faulting.
(_stp_mod64): Ditto.
* Makefile.am, runtest.sh: Use a "testresuilt/" directory in build
tree rather than overloading "testsuite/".
* TODO: Removed obsoleted file.
* Makefile.in: Regenerated.