| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* translate.cxx (translate_pass): Emit #include <linux/profile.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix parse tree pretty-printer.
* staptree.h (print_format): Add raw_components field.
* parse.cxx (parse_symbol): Set it.
* staptree.cxx (lex_cast_qstring): Copy it here too.
(binary_expression::print): Add a space around operator, due to
lexical ambiguity (expr % paren-expr) vs %( preprocessor op.
(array_in:: foreach_loop:: arrayindex::print): Print base as indexable.
(print_format::string_to_components): Use parse_error, not semantic.
(print_format::print): Properly quote formatting string. Print
histogram argument.
* translate.cxx (visit_print_format): Properly quote formatting string.
(varlock): Reword lock timeout error message.
* testsuite/buildok/printf.stp: Add some quoting troublemakers.
* testsuite/parseok/unparser.stp: New file.
|
|
|
|
|
|
|
|
|
| |
* translate.cxx (delete_statement_operand_visitor::visit_arrayindex):
Prohibit deleting histogram buckets.
(c_tmpcounter::visit_array_in): Direct to visit_arrayindex.
(c_unparser::visit_array_in): Likewise.
* testsuite/buildok/histogram_operator_in.stp: New test.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* staptree.cxx (traversing_visitor::visit_foreach_loop): Visit
the base indexable of the foreach loop.
* translate.cxx (c_tmpcounter::visit_foreach_loop): Implement
histogram bucket iteration arm.
(c_unparser::visit_foreach_loop): Likewise.
(c_tmpcounter::visit_arrayindex): Fix typo.
* testsuite/buildok/iterate_histogram_buckets.stp: New test.
|
|
|
|
|
| |
* translate.cxx (mapvar::fini): Use _stp_pmap_del() on pmaps.
(emit_global): For pmaps, use "PMAP" instead of "MAP".
|
|
|
|
|
| |
* translate.cxx (visit_print_format): Explicitly Cast int64_t
(pe_long) args to (long long) in generated code, for portability.
|
|
|
|
| |
* *.cxx: Add <cassert> #include as needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elaborate.cxx (mutated_var_collector): Forward
traversal portion of calls to base class.
(mutated_var_collector::visit_arrayindex): Resolve
arrayindex-into-histogram expression as pe_long.
(typeresolution_info::visit_print_format): Traverse
into histogram if present.
* parse.cxx (parse_symbol): Handle parse ambiguity surrounding
print(@hist_op(...)[...]).
* staptree.cxx (traversing_visitor::visit_arrayindex): Visit
base member of arrayindex.
* translate.cxx (c_unparser::histogram_index_check): New method.
(var::hist): Fix bug.
(var::buckets): New method.
(stmt_expr::stmt_expr): Print with newline.
(c_unparser::load_map_indices): Handle indexing-histogram case.
(c_tmpcounter::visit_arrayindex): Likewise.
(c_unparser::visit_arrayindex): Likewise.
(c_tmpcounter_assignment::visit_arrayindex): Throw error when
user attempts to write to histogram bucket.
(c_unparser_assignment::visit_arrayindex): Likewise.
* testsuite/buildok/print_histogram_entry.stp: New test.
|
|
|
|
|
|
| |
PR 1944 improved hack.
* translator.cxx (c_tmpcounter::visit_block): New routine, allows
overlay of sequential statements' temporaries within context.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1944 quick hack.
* translator.cxx (translate_pass): Reduce default MAXNESTING to 10.
(emit_module_init): Add a paranoid check against oversize contexts.
* stap.1.in: Document MAXNESTING change.
2005-12-01 Frank Ch. Eigler <fche@redhat.com>
PR 1944 quick hack.
* testsuite/systemtap.sample/control_limits.*: Adapt to new
MAXNESTING default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2005-11-28 Graydon Hoare <graydon@redhat.com>
* translate.cxx (var::assert_hist_compatible): New method.
(var::hist): New method.
(c_unparser::load_aggregate): New method.
(hist_op_downcaster): Remove, it was a mistake.
(expression_is_hist_op): Likewise.
(c_tmpcounter::visit_print_format): Implement print(@hist(...)).
(c_unparser::visit_print_format): Likewise.
* staptree.h (struct print_format): Add optional hist_op* member.
* staptree.cxx (traversing_visitor::visit_functioncall): Visit
hist_op if present in print_format.
(deep_copy_visitor::visit_print_format): Likewise.
* parse.cxx (parse_symbol): Special case to consume print(@hist(...)).
* elaborate.cxx (typeresolution_info::visit_arrayindex): Fix type inference bug.
(typeresolution_info::visit_foreach_loop): Likewise.
* testsuite/buildok/print_histograms.stp: New test.
[runtime/ChangeLog]
2005-11-28 Graydon Hoare <graydon@redhat.com>
* stat-common.c (_stp_stat_print_histogram): Various formatting
corrections and aesthetic tweaks.
(__stp_stat_add): Correction to linear bucket underflow cases.
|
|
|
|
|
| |
* translate.cxx (c_tmpcounter_assignment::visit_symbol): Don't
emit unused temporary into context. Saves mucho space with strings.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* translate.cxx (c_unparser::visit_array_in, visit_arrayindex):
Finish adapting to PR 1275 by switching back to read locks.
|
|
|
|
|
| |
* translate.cxx: New API uses HIST_LOG and HIST_LINEAR
instead of HSTAT_LOG and HSTAT_LINEAR.
|
|
|
|
|
|
| |
* 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 (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.
|
|
|
|
|
|
|
|
|
|
| |
* translate.cxx (c_unparser::collect_map_index_types)
(c_unparser::emit_map_type_instantiations)
(c_unparser::visit_arrayindex)
(c_unparser::visit_array_in)
(delete_statement_operand_visitor::visit_arrayindex)
(c_unparser_assignment::visit_arrayindex)
(mapvar::*): Update to new runtime map API.
|
|
|
|
|
|
|
| |
Systemtap should now be able to build on Ia64.
Includes supports for - function probes, return probes,
function parameter access and dumping stack backtrace.
Added by Anil S Keshavamurthy <Anil.s.keshavamurthy@intel.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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
2005-10-10 Frank Ch. Eigler <fche@elastic.org>
PR 1456.
* systemtap.samples/arith.stp: Add pre/post-crement tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1366.
* staptree.h (foreach_loop): Add sort_column, sort_direction fields.
* parse.cxx (parse_foreach_loop): Parse "+"/"-" suffix operators.
* stap.1.in, stapex.5.in: Document them.
* staptree.cxx (foreach_loop print, copy): Propagate them.
* translate.cxx (visit_foreach_loop): Support them.
* testsuite/parseok/fifteen.stp, parseko/thirteen.stp,
buildok/twentyone.stp: Test them.
2005-10-07 Frank Ch. Eigler <fche@elastic.org>
PR 1366.
* systemtap.samples/primes.*: Sort foreach gratuitiously.
|
|
|
|
|
|
| |
* stap.1.in: Document -b/-s options.
* main.cxx (usage): Clarify -b/-s blurbs.
* translator.cxx (translate_pass): Handle bulk_mode here instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
2005-10-06 Frank Ch. Eigler <fche@elastic.org>
PR 1132.
* systemtap.samples/symbols.*: New test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1182.
* main.cxx (main): Support -D macro-setting option.
* stap.1.in: Document it and related macros.
* buildrun.cxx (compile_pass): Emit macro definitions.
* translate.cxx (translate_pass): Guard limit macros with #ifdef.
Eliminate MAXCONCURRENCY macro.
* elaborate.h (systemtap_session): Add "macros" field.
* parse.cxx (parse_if_statement): Clear "elseblock" if needed.
2005-09-28 Frank Ch. Eigler <fche@elastic.org>
PR 1182.
* systemtap.samples/control_limits.*: New test.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
PR 1344
* translate.cxx: Call _stp_map_clear for "delete ARRAY" statement.
2005-09-14 Frank Ch. Eigler <fche@elastic.org>
* systemtap.samples/pfaults.stp: Complicate to test PR 1344.
|
|
|
|
|
|
|
| |
PR 1335
* translate.cxx (c_tmpcounter::visit_functioncall): Correct
recursion sequence.
* testsuite/buildok/nineteen.stp: New test case.
|
|
|
|
|
|
|
|
| |
* stap.1.in: Clarify absence of short-circuiting in && and ||.
* translate.cxx (emit_function): Improve "array locals" message.
* tapset/timestamp.stp: Add gettimeofday_us function. Correct
arithmetic typing in other functions.
* stapfuncs.5.in: Document new function.
|
|
|
|
|
|
|
|
|
| |
PR 1289
* translate.cxx (lex_cast_qstring): Correct "cast" of object
to string containing more than one word.
* tapset.cxx (lex_cast_qstring): Ditto.
(dwarf_derived_module::emit_probe_entries): Emit and use
a generic fault_handler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1172.
* staptree.h, staptree.cxx: Make all ::print*(), operator<<
functions take const staptree objects.
(literal_string::print): \-prefix double-quotes.
* translate.cxx (emit_common_header): Add context probe_point field.
Switch to atomic_t busy flags.
(emit_module_exit): Use atomic operations for busy flag.
(visit_*): Use lex_cast_qstring for last_stmt strings.
* tapsets.cxx (lex_cast_quoted): \-prefix double-quotes too.
(*::emit_probe_entries): Populate probe_point. Use atomic operations
for busy flag.
* tapset/context.stp (pp): New function.
* stapfuncs.5.in: Document it.
* testsuite/buildok/context_test.stp: Test it.
|
|
|
|
| |
* translate.cxx (visit_literal_string): \-prefix double-quotes.
|
|
|
|
|
|
|
|
| |
* translate.cxx (varlock): Use trylock only for write locks.
(translate_pass): Remove read_trylock macro hack.
(visit_foreach_loop): Remove protective read lock, until PR 1275.
(visit_*): Added many more "last_stmt"-setting expressions in the
output, to improve last_error message locality.
|
| |
|
|
|
|
|
|
|
|
|
| |
* translate.cxx (emit_probe): Add a call to _stp_print_flush
at the end of each probe.
(translate_pass): Define STP_NUM_STRINGS to be 1 for
a scratch string. Include current.c and stack.c. Don't
define KALLSYMS_LOOKUP_NAME or KALLSYMS_LOOKUP. Remove
references to next_fmt() and stp_dbug().
|
|
|
|
|
|
| |
* translate.cxx (visit_array_in, visit_arrayindex): Use write locks
even for array reads, until PR 1275.
(translate_pass): Add read_trylock -> write_trylock escalation.
|
|
|
|
|
|
| |
PR systemtap/1268
* translator (varlock): Add deadlock detection code.
(emit_common_header): Add a new MAXTRYLOCK configuration macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stapprobes.5.in, stapfuncs.5.in, stapex.5.in: New man pages.
* stap.1.in: Moved some content out.
* Makefile.am (man_MANS): Add new man pages.
* configure.ac (AC_CONFIG_FILES): Add them.
* systemtap.spec.in: Package them.
* Makefile.in, configure: Regenerated.
* buildrun.cxx (run_pass): Pass "-r" to stpd.
* translate.cxx (emit_common_header): Wrap try/catch around
variable decls, to improve exception particularity.
(visit_literal_number): Emit as unsigned literal, which is
actually a subtle correctness issue.
|
|
|
|
|
|
|
| |
* translate.cxx (visit_target): Make target variable exceptions
more informative.
(literal_stmt_for_local): Improve bad-type exception message.
* translate.cxx (emit_module_init): Include probe point in comments.
|
|
|
|
| |
* translate.cxx: Revert tmp initialization changes.
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.cxx (scan): Preserve basic C-ish escapes.
* translate.cxx (c_tmpcounter::declaring): New flag.
(c_tmpcounter::declare_or_init): New helper method.
(c_tmpcounter::visit_*): Use declare_or_init.
(c_unparser::emit_function): Run a tmpcounter to initialize tmps.
(c_unparser::emit_probe): Likewise.
(c_unparser::c_strcpy): Use strlcpy.
(c_unparser::c_strcat): Use strlcat.
|
|
|
|
|
| |
* translate.cxx (emit_global, emit_module_init): Use 2.6.9-compatible
rwlock initialization.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (*::emit_probe_entries): Treat NULL and "" last_errors
both as clean early returns, not errors.
* translate.cxx: Revamp last_error handling logic. Remove all
"goto out" paths from expression context.
(visit_statement): Handle last_error exit one nesting level at a time.
(visit_return_statement, visit_functioncall): Set/reset last_error="".
(c_tmpcounter::visit_for_loop): New routine.
(c_unparser::visit_foreach, visit_for_loop): Rewrite to properly
support continue/breaks, non-local exits, (foreach) locks.
(emit_global): Emit lock variable.
(varlock ctor, dtor): Lock/unlock global variable.
(varlock_w, varlock_r): New concrete subclasses. Update all users.
* tapset/builtin_logging.stp (exit): Don't set last_error.
* src/testsuite/buildok/sixteen.stp: New test.
* tapsets.cxx: Temporarily rolled back graydon's changes.
|