| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
PR 1903
* parse.cxx (eval_pp_conditional): Support %( arch == "i686" %) form.
* stap.1.in: Document it.
* testsuite/parseok/fourteen.stp: Test it.
* session.h (architecture): New field.
* main.cxx (main): Initialize it.
|
|
|
|
|
|
|
| |
PR 1917
* translate.cxx (emit_common_header, emit_module_init,
emit_module_exit): Switch context array to per-cpu kmalloc variant.
* tapsets (*::emit_probe_entires): Use per_cpu_ptr() for my context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elaborate.h (get_symbol_within_expression): Make visible.
* elaborate.cxx (get_symbol_within_expression): Make non-static.
(stat_decl_collector): New struct.
(semantic_pass_stats): New semantic pass.
(semantic_pass): Call it.
(semantic_pass_symbols): Remove collection of statistic_decls from files.
(visit_stat_op): Only fail if inferred type is not pe_long.
* parse.cxx (parser::parse): Don't pass per-file statistic_decl
into parse_global.
(parser::parse_global): Don't parse global statistic_decls,
they're obsolete.
* parse.hh (parser::parse_global): Adjust signature to match.
* session.h (statistic_decl::operator==): New method.
* staptree.h (print_format::is_empty): New method.
(stapfile::stat_decls): Remove field.
* staptree.cxx (string_to_components): Fix bugs in format-string
parser.
* translate.cxx (var): Make private fields protected.
(var::init): Support HIST_NONE stats.
(aggvar): New struct.
(mapvar::is_parallel): New method.
(mapvar::call_prefix): Use it.
(mapvar::calculate_aggregate): New method.
(mapvar::fetch_existing_aggregate): New method.
(mapvar::get): Support pe_stats.
(mapvar::init): Use is_parallel(), and support HIST_NONE.
(itervar::itervar): Only fault on pe_unknown.
(itervar::start): Use mapvar::is_parallel and
mapvar::fetch_existing_aggregate.
(emit_map_type_instantiations): Include alloc.c before pmap-gen.c.
Include pmap-gen.c for pe_stats maps.
(c_unparser::gensym_aggregate): New method.
(c_unparser::visit_foreach_loop): Handle mapvar::is_parallel case.
(arrayindex_downcaster): New struct.
(expression_is_arrayindex): New function.
(c_tmpcounter::visit_stat_op): New method.
(c_unparser::visit_stat_op): Implement.
(c_unparser::visit_hist_op): Add commentary, still not implemented.
* testsuite/buildok/stat_{insert,extract}.stp: New tests.
* testsuite/semok/ten.stp: Correct for changes to global declarations.
* testsuite/semko/*.stp: Likewise.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* loc2c.c (c_translate_location): Take Dwarf_Op vector as argument
directly, not Dwarf_Attribute.p
* loc2c.h: Update decl.
* loc2c-test.c (get_location): New function.
(handle_variable): Use it.
* tapsets.cxx (dwflpp::translate_location): New method.
(dwflpp::translate_components, dwflpp::literal_stmt_for_local): Use it.
|
|
|
|
|
|
|
|
|
| |
PR 1276
From Josh Stone <joshua.i.stone@intel.com>:
* tapsets.cxx (timer_derived_probe, timer_builder,
register_standard_tapsets): Support timer.ms() variety.
* stapprobes.5.in: Document it.
* testsuite/builok/fourteen.stp: Test its buildability.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1837
* testsuite/buildko/one.stp: Replace printk.
* testsuite/buildok/one.stp: Ditto.
* testsuite/buildok/two.stp: Ditto.
* testsuite/semko/fifteen.stp: Ditto.
* testsuite/semko/fourteen.stp: Ditto.
* testsuite/semko/thirteen.stp: Ditto.
* testsuite/transok/eight.stp: Ditto.
* testsuite/transok/seven.stp: Ditto.
* testsuite/transok/six.stp: Ditto.
* tapsets.cxx (*::emit_probe_entries): Replace printk() calls
with _stp_warn().
* stap.1.in: Replace printk with printf in example.
* stapfuncs.5.in: Remove docs for printk and add for
print and printf.
* tapset/logging.stp (printk): Deleted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* staptree.h (struct indexable): New struct.
(classify_indexable): New function.
(classify_const_indexable): New function.
(struct symbol): Implement indexable.
(struct arrayindex): Take indexable as base.
(struct foreach_loop): Take indexable as base.
(struct print_format): New struct.
(enum stat_component_type): New enum.
(struct stat_op): New struct.
(enum historgram_type): New enum.
(struct hist_op): New struct.
(struct visitor)
(struct traversing_visitor)
(struct throwing_visitor)
(struct deep_copy_visitor): Add new visitor methods.
(require): Specialize for indexable*.
* staptree.cxx (print_format::*)
(stat_op::*)
(hist_op::*)
(indexable::*)
(traversing_visitor::*)
(throwing_visitor::*)
(deep_copy_visitor::*)
(classify_indexable)
(classify_const_indexable): Implement
(deep_copy_visitor::*): Update to use indexables.
* parse.h (parser::parse_indexable): New method.
(parser::parse_hist_op_or_bare_name): New method.
* parse.cxx (lexer::scan): Accept @ in identifiers.
(parser::parse_array_in)
(parser::parse_foreach_loop): Call parse_indexable.
(parser::parse_hist_op_or_bare_name): Implement.
(parser::parse_indexable): Implement.
(parser::parse_symbol): Accept printf, stat_ops, hist_ops.
* elaborate.h (struct typeresolution_info): Add methods for
visiting print_format, stat_op, hist_op.
* elaborate.cxx (symbol_fetcher): New class.
(get_symbol_within_expression): New function.
(get_symbol_within_indexable): New function.
(mutated_var_collector): Replace mutated_map_collector.
(no_var_mutation_during_iteration_check): Replace
no_map_mutation_during_iteration_check.
(semantic_pass_vars): Replace semantic_pass_maps.
(semantic_pass): Update call accordingly.
(symresolution_info::*) Add new visitors, teach about indexables
(typeresolution_info::*) Likewise.
* translate.cxx
(c_unparser::getiter): Take symbol, not foreach_loop.
(c_unparser::*) Add new visitors, teach about indexables.
(c_tmpcounter::*)
(delete_statement_operand_visitor::visit_arrayindex)
(c_tmpcounter_assignment::*)
(c_unparser_assignment::*): Likewise.
(hist_op_downcaster): New struct.
(expression_is_hist_op): New function.
* testsuite/buildok/printf.stp: New test for print_format.
|
|
|
|
| |
* map.h: Removed old API macros and prototypes.
|
|
|
|
|
|
|
|
|
| |
* pmap-gen.c (_stp_pmap_get()): New function. Aggregates
the per-cpu map nodes into an aggregation map node.
* map.c (_stp_new_agg): Return a struct map_node *.
(_stp_add_agg): If count is 0 when adding,
just set the stats.
|
|
|
|
|
|
| |
* pmaps/ix2.c: New test. Test _stp_pmap_get_*().
* pmaps/iii3.c: New test. Test _stp_pmap_get_*().
* pmaps/pmap.test: Update.
|
|
|
|
|
|
|
|
|
|
| |
Polished entry point aliases, no more pointer-deref
faults (instead the user-space address is given for
pointer arguments). Return probe aliases still dont
do much. Tested on vanilla 2.6.13 and 2.6.14.
* aux_syscalls.stp
Any helpers for the syscall tapset are now in this
file. More to come.
|
|
|
|
|
|
| |
* map.c: Doc updates.
* pmap-gen.c: Change a bunch of generated function names to
avoid conflicts with maps with the same key and value types.
|
|
|
|
|
| |
* pmaps/ii2.c: New test of maps and pmaps with the same keysym.
* pmaps/pmap.test: Update.
|
|
|
|
|
| |
* translate.cxx (c_unparser::visit_array_in, visit_arrayindex):
Finish adapting to PR 1275 by switching back to read locks.
|
|
|
|
| |
* map.c (_stp_cmp): Use _stp_div64().
|
| |
|
|
|
|
|
| |
* translate.cxx: New API uses HIST_LOG and HIST_LINEAR
instead of HSTAT_LOG and HSTAT_LINEAR.
|
|
|
|
|
|
| |
* map.h: Remove HSTAT_LOG and HSTAT_LINEAR.
* map-gen.c: Fix comment.
* pmap-gen.c: Ditto.
|
|
|
|
|
|
| |
* map.c (_stp_cmp): Patch to sort on stats.
(_stp_map_sort): Ditto.
(_stp_map_sortn): Ditto.
|
|
|
|
|
|
| |
* maps/sort2.c: New file.
* maps/sort_stat.c: New file.
* maps/map.test: Update
|
|
|
|
|
|
| |
Reported by Guang Lei Li <liguangl@cn.ibm.com>:
* tapset/context.stp (pid,ppid,tid): Correctly pick tgid vs pid.
* testsuite/buildok/context_test.stp: Print out tid() too.
|
|
|
|
| |
* map.c: Change order of includes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* map.h (struct map_root): Delete fields
used by old API.
* map.c: Remove old map API functions.
* map-stat.c (_stp_map_add_stat): Delete.
(_stp_pmap_new_hstat_linear): Move here from map.c.
(_stp_pmap_new_hstat_log): Ditto.
* list.c: Deleted.
* map-keys.c: Deleted.
* map-values.c: Deleted.
* map-int.c: Deleted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* maps/map.test: Remove old map API tests.
* maps/ii2.c: Renamed ii.c.
* maps/iiss2.c: Renamed iiss.c.
* maps/is2.c: Renamed is.c.
* maps/issii2.c: Renamed issii.c.
* maps/isx2.c: Renamed isx.c.
* maps/map_format2.c: Renamed map_format.c.
* maps/si2.c: Renamed si.c.
* maps/keys.c: Deleted
* maps/test_list_int64.c: Deleted.
* maps/test_list_string.c: Deleted.
* maps/sort.c: Update to use new map API.
|
|
|
|
|
|
|
|
| |
* shellsnoop/shellsnoop.c: Updated to use new map API.
* where_func/kprobe_where_funct.c: Ditto.
* os_timer/os_timer.c (probe_start): Ditto.
* test4/test4.c: Ditto.
* scf/scf.c: Ditto.
|
|
|
|
|
| |
* alloc.c (__stp_valloc_percpu): Fix call to vmalloc_node.
(vmalloc_node): Remove nonworking code.
|
| |
|
|
|
|
| |
* alloc.c (__stp_valloc_percpu): Fix call to vmalloc_node.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* map.c (_stp_map_init): New function. Extracted from _stp_map_new()
so it can be used in _stp_pmap_new().
(_stp_map_new): Call _stp_map_init().
(_stp_pmap_new): New function.
(_stp_pmap_new_hstat_linear): New function.
(_stp_pmap_new_hstat_log): New function.
(_stp_pmap_del): New function.
(_stp_pmap_printn_cpu): New function.
(_stp_pmap_printn): New function.
(_stp_new_agg): New function.
(_stp_add_agg): New function.
(_stp_pmap_agg): New function.
(_new_map_clear_node): New function.
* map.h (struct map_root): Add Hist struct. Add copy
and cmp function pointers for pmaps.
* stat.h: Remove Stat struct. Replace with Hist struct
that is limited to only histogram params.
* map-stat.c: Fix up references to histogram params in map_root.
* stat-common.c: Ditto.
* stat.c: Ditto.
* pmap-gen.c: New file. Implements per-cpu maps.
* map-gen.c: Minor bug fixes. Use new VAL_IS_ZERO() macro.
* alloc.c (vmalloc_node): For NUMA, provide a vmalloc that
does node-local allocations.
(_stp_alloc_cpu): A version of _stp_alloc() that does
node-local allocations.
(_stp_valloc): A version of _stp_valloc() that does
node-local allocations.
(__stp_valloc_percpu): New function. Like alloc_percpu()
except uses _stp_valloc().
(_stp_vfree_percpu): New function. Like free_percpu().
|
|
|
|
|
|
| |
* tapsets.cxx (blacklisted_p): Tolerate NULL filename parameter.
* src/testsuite/semok/twenty.stp: New test to enumerate everything
dwarfly probeable.
|
|
|
|
|
|
| |
* recreate_links: Add link to pmap-gen.c
* print.c (next_fmt): Remove unneeded dbug().
* alloc.c: Update to reflect changes to runtime/alloc.c.
|
|
|
|
| |
* pmaps/*: Add new pmaps tests.
|
|
|
|
|
|
| |
* translate.cxx (c_unparser::visit_foreach_loop): With PR 1275
done, add back read lock around foreach loop. Add a write lock
around preceding sort operation. Leave a race condition window. :-(
|
|
|
|
| |
* translate.cxx (mapvar::exists): Correct some more.
|
|
|
|
|
| |
Patch from "Mao, Bibo" <bibo.mao@intel.com>
* translate.cxx (mapvar::exists): Correct 64-bit type mismatch.
|
|
|
|
|
|
|
| |
* tapsets.cxx (blacklisted_p): Add blacklist for some .return
probes to kludge around bug #1345.
* tapset/system_calls.stp: Add some %( %? %) conditionals to
get closer to using tapset on 2.6.9 kernel.
|
|
|
|
|
|
|
| |
PR 1828.
* tapsets.cxx (blacklisted_p): New function. Add a few blacklist
entries.
* testsuite/semko/thirtythree.stp: New test.
|
|
|
|
| |
* testsuite/buildok/twentytwo.stp: Add another test for PR 1271.
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (dwarf_derived_probe::emit_registrations): Add
possible kprobe address prechecking logic. Set kretprobes
maxactive to zero.
* translate.cxx (emit_module_init): Set a more helpful default
probe_point value for use in registration errors. Exit properly
after registration failure of probe #0.
|
| |
|
|
|
|
|
| |
* tapsets.cxx (add_probe_point): Use dwfl_module_relocation_info to
get symbol name when dwfl_module_relocations has the info.
|
| |
|
|
|
|
|
|
| |
* runtime.h: #include <linux/version.h>.
(init_module): Remove old ppc comment.
ifdef _stp_kta so it only gets set for x86 and x86_64.
|
|
|
|
| |
anymore
|
| |
|
|
|
|
|
| |
* tapsets.cxx (add_probe_point): Use explicit test with assignment in
while condition.
|
|
|
|
|
|
|
| |
PR 1329.
* tapsets.cxx (dwarf_query::add_probe_point): Look up section name
containing given address. Skip request if it came from .init.*.
* testsuite/semko/thirtytwo.stp: New test.
|
| |
|