summaryrefslogtreecommitdiffstats
path: root/main.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 2006-12-16 Frank Ch. Eigler <fche@elastic.org>fche2006-12-161-1/+2
| | | | | | * main.cxx (main): Print version strings if verbose >=2 . * tapsets.cxx (common_probe_entryfn_prologue): Decorate an emitted local with __restrict__.
* 2006-12-08 Josh Stone <joshua.i.stone@intel.com>jistone2006-12-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR 3681. * staptree.h (struct vardecl): Add a literal 'init' member for the initialization value of globals. * staptree.cxx (vardecl::vardecl): Initialize 'init' to NULL. (vardecl::print): Print global init value during pass-1 output. * main.cxx (printscript): Print global init values during verbose pass-2 output. * parse.cxx (parser::parse_global): Set the initialization literal of global vardecls. * translate.cxx (var::init): Don't unconditionally override the value of numeric globals when the module_param isn't used. (c_unparser::emit_global_param): Write numeric module_params directly into the global variable, as an int64_t instead of long. (c_unparser::emit_global): Add initialization to global declarations. Don't create a temp module_param long for numeric globals anymore. runtime/ * runtime.h (param_set_int64_t, param_get_int64_t, param_check_int64_t): New functions to allow taking module parameters directly as int64_t values. testsuite/ * systemtap.base/global_init.exp, systemtap.base/global_init.stp: New test for checking the timeliness of global initialization.
* 2006-12-05 Frank Ch. Eigler <fche@redhat.com>fche2006-12-061-3/+6
| | | | | | PR 3648 * main.cxx (main): Tweak error message for tapset script execution. Also catch those clever rogues who use stdin.
* 2006-11-30 David Smith <dsmith@redhat.com>dsmith2006-11-301-0/+9
| | | | | | * main.cxx (printscript): Prints global embedded code. Not printing the global embedded code was causing bad caching behavior.
* 2006-11-19 Frank Ch. Eigler <fche@elastic.org>fche2006-11-191-3/+22
| | | | | * main.cxx (main): Signal parse error if a tapset script is given as the user script.
* 2006-11-08 Frank Ch. Eigler <fche@elastic.org>fche2006-11-081-12/+0
| | | | | | * util.h (lex_cast_qstring): Move def'n here. Also quote \. (stringify, lex_cast, lex_cast_hex): Move defn here. * buildrun.cxx, elaborate.cxx, main.cxx, staptree.cxx: Adapt.
* New dynamic module and symbol handling code.hunt2006-11-021-0/+1
|
* 2006-11-02 David Smith <dsmith@redhat.com>dsmith2006-11-021-0/+9
| | | | | | * main.cxx (main): Added '-r' check. If the user changes the kernel release to compile against, make sure pass 5 isn't performed (since the resulting module won't be installable).
* 2006-10-31 Frank Ch. Eigler <fche@redhat.com>fche2006-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Probe registration rework. Offline dwarf processing for better cross-instrumentation. * elaborate.h (derived_probe): Remove registration-related code generation API. Add new function sole_location(). (derived_probe_group): Reworked this and associated classes. * session.h (systemntap_session): Create individual per-category derived_probe_groups. * elaborate.cxx (derived_probe_group): Reworked. (alias_derived_probe): Switch to new derived_probe API. (semantic_pass_symbols): Ditto. * translate.cxx (mapvar init): Check for array initialization error. (emit_module_init): Handle such failures, at least in theory. (emit_module_exit): Switch to new derived_probe_group API. Call cpu_relax() during shutdown busywait. (emit_common_header): Elide context variables for elided handler fns. (c_unparser::emit_probe): Implement new, improved duplicate elimination technique for probe handlers. Leave two older ones behind as compile options for education. * tapsets.cxx (*): Reworked all probe registration code, moving it from derived_probes into derived_probe_groups. Shrunk output code. Temporarily disabled probe timing and perfmon/mark probes. (dwflpp): Use offline reporting, so that module matching and relocation is performed at run time. (dwarf_query): Remove flavour logic, now supplanted by other duplicate elimination code. (dwarf_derived_probe): Reworked construction, centralized module/section/offset computations. * tapsets.h (all_session_groups): New little helper. * main.cxx (main): For pass-2 message, print number of embeds too. * systemtap.spec.in: Add a "BuildRequires: dejagnu" for make check. * configure.ac: Bump version to 0.5.11. * configure: Regenerated.
* 2006-10-23 David Smith <dsmith@redhat.com>dsmith2006-10-231-57/+135
| | | | | | | | | | | | | | | | | | | | | | | | | * main.cxx (printscript): New function containing code moved from main(). (main): Added code to create cache directory, call function to generate hash, and see if we can use cached source/module. If pass 4 is actually run to produce a new module, we call add_to_cache() to cache the result. * session.h (struct systemtap_session): Added hash/cache session data. * cache.cxx: New file handling adding/getting files from the cache. * cache.h: New header file for cache.cxx. * hash.cxx: New file containing C++ wrapper for routines in mdfour.c and the find_hash function which computes the hash file name for an input script. * hash.h: New header file for hash.cxx. * mdfour.c: New file containing MD4 hash code. * mdfour.h: New header file for mdfour.c. * util.cxx: New file containing several utility functions used by the caching code. * util.h: New header file for util.cxx. * Makefile.am: Added new C/C++ files. * Makefile.in: Regenerated.
* 2006-09-27 Josh Stone <joshua.i.stone@intel.com>jistone2006-09-281-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * session.h (struct systemtap_session): Add kernel_base_release to store the kernel version without the -NNN suffix. * main.cxx (main): Generate and use kernel_base_release. * parse.cxx (eval_pp_conditional): Use kernel_base_release. * tapsets.cxx (profile_derived_probe::profile_derived_probe): Use kernel_base_release. * tapsets.cxx (timer_builder::build): Support a wide variety of timer varients -- jiffies, s/sec, ms/msec, us/usec, ns/nsec, and hz. Use hrtimers automatically on kernels that have it. (timer_builder::register_patterns): Bind all of the new timer varients in one easy place. (register_standard_tapsets): Call timer_builder::register_patterns. (struct hrtimer_builder): Removed since timer_builder is generic. * stapprobes.5.in: Document new timer.* functionality. * tapsets.cxx (hrtimer_derived_probe_group::emit_probes): Add a shared global for the actual hrtimer resolution, _stp_hrtimer_res. (hrtimer_derived_probe_group::emit_module): Init _stp_hrtimer_res. (hrtimer_derived_probe::emit_interval): Limit intervals at a minimum to the hrtimer's actual resolution. (hrtimer_derived_probe::emit_probe_entries): Forward timers based on previous expiration instead of restarting relative. testsuite/ * buildok/fourteen.stp: Test new timer functionality.
* Systemtap perfmon support to access the processors perfmon hardware.wcohen2006-09-121-0/+1
|
* 2006-08-28 David Smith <dsmith@redhat.com>dsmith2006-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * translate.cxx: Added inclusion of session.h. (translate_pass): Instead of asking each probe to emit itself, we ask the session's probes member variable to emit all the probes. * tapsets.cxx: Added inclusion of session.h. Added a register_probe member function to all derived_probe based classes. Added a derived_probe_group derived class for all probe types: (be_derived_probe_group): New class. (never_derived_probe_group): New class. (dwarf_derived_probe_group): New class. (timer_derived_probe_group): New class. (profile_derived_probe_group): New class. (mark_derived_probe_group): New class. (hrtimer_derived_probe_group): New class (derived_probe_group_container): New class. * elaborate.h: Removed inclusion of session.h since session.h now includes elaborate.h. (derived_probe): Added register_probe member function. (derived_probe_group): Added class definition. This is the base class of all of the derived probe groups - dwarf, timer, etc. (derived_probe_group_container): Added class definition. An instance of this class will be stored in the session and contain all the other probe groups. * elaborate.cxx (derived_probe_group::register_probe): Added derived_probe_group::register_probe stubs. (alias_derived_probe::register_probe): Added register_probe member function. (semantic_pass_symbols): After deriving a probe, the probes now register themselves with the session. * session.h: Includes elaborate.h to get derived_probe_group_container definition. systemtap_session class 'probes' member variable switched from a vector of derived probes to a derived_probe_group_container. * buildrun.cxx: Added inclusion of session.h since it was removed from elaborate.h. * main.cxx: Added inclusion of session.h since it was removed from elaborate.h. * parse.h: Added forward struct declarations. * staptree.h: Removed inclusion of session.h.
* 2006-08-23 Josh Stone <joshua.i.stone@intel.com>jistone2006-08-231-5/+4
| | | | | | | | | | PR 3093 From Eugeniy Meshcheryakov <eugen@debian.org>: * main.cxx (main): Use setenv instead of putenv, since gcc 4.2 doesn't like assigning string constants to char*. Also use const char* for result from getenv. * tapsets.cxx (dwflpp::setup): Copy string constant into a local array, to fix gcc 4.2 warning.
* main.cxx: add LKET's tapsets into stap's default tapsets search pathguanglei2006-07-171-1/+7
| | | | | | | | update lket man page to refect the new tapset search path syscalls.stp: make sys_acct, sys_add_key, sys_keyctl and sys_modify_ldt optional on ppc64 since they are weak symbol. ppc64/syscalls.stp: remove syscall.acct, syscall.add_key and syscall.umask since they are already defined in syscalls.stp
* 2006-06-02 David Smith <dsmith@redhat.com>dsmith2006-06-021-11/+22
| | | | | | | | | | | | | | | | * main.cxx (usage): Added exitcode parameter. (main): Improved a few error messages. Also, when an error is given, stap now always exits with a status of 1. * testsuite/buildok/cmdline01.stp: New test. * testsuite/parseko/cmdline01.stp: Ditto. * testsuite/parseko/cmdline02.stp: Ditto. * testsuite/parseko/cmdline03.stp: Ditto. * testsuite/parseko/cmdline04.stp: Ditto. * testsuite/parseko/cmdline05.stp: Ditto. * testsuite/parseko/cmdline06.stp: Ditto. * testsuite/parseok/cmdline01.stp: Ditto. * testsuite/parseok/cmdline02.stp: Ditto.
* -M option to control to do merge or not for bulk modeguanglei2006-05-091-1/+19
|
* "-t" option to collect information the number of times a probe runs andwcohen2006-05-021-1/+7
| | | | the average amount of time spent in the probe.
* 2006-04-18 Eugene Teo <eteo@redhat.com>fche2006-04-181-5/+9
| | | | | PR 1341 * main.cxx (main): Use TMPDIR instead of hard-coded /tmp.
* 2006-04-04 Roland McGrath <roland@redhat.com>roland2006-04-051-7/+8
| | | | * main.cxx (version): Use dwfl_version.
* 2006-03-03 Josh Stone <joshua.i.stone@intel.com>jistone2006-03-031-8/+11
| | | | | | PR 2390 * main.cxx (main): expand search path so that revision w.x.y.z searches w.x.y.z, w.x.y, and w.x.
* 2006-03-03 Josh Stone <joshua.i.stone@intel.com>jistone2006-03-031-4/+5
| | | | | | | | | * main.cxx (main): search forward for dashes in the kernel release, to work properly with release names with more than one dash. * parse.cxx (eval_pp_conditional): ditto * tapsets.cxx (profile_derived_probe::profile_derived_probe): ditto * safety/safety.py (StaticSafety::__build_search_suffixes): ditto, and add copyright & GPL tag
* 2006-02-23 Frank Ch. Eigler <fche@elastic.org>fche2006-02-231-6/+6
| | | | | | | | | | | | | | | PR 1304 * parse.cxx (lexer): Take systemtap_session argument. (lexer::scan): Support $1..$NNNN and @1...@NNNN expansion. * stap.1.in: Document this. * testsuite/semok/args.stp: New test. * translate.cxx (var::init, emit_global): Emit code to allow named module parameters to initialize global string/number scalars. * stap.1.in: Don't document this yet. PR 2334 * main.cxx (main): Clarify "-v" option repeatibility. * stap.1.in: Ditto.
* 2006-02-22 Frank Ch. Eigler <fche@elastic.org>fche2006-02-221-0/+4
| | | | | | | | | PR 2293. * tapsets.cxx (emit_probe_epilogue): Emit early local_irq_save(). (emit_probe_epilogue): ... and matching _restore(). * main.cxx (main): Emit a "hello, I'm starting" message before pass 5 in verbose mode.
* 2006-01-30 Frank Ch. Eigler <fche@elastic.org>fche2006-01-301-2/+19
| | | | * main.cxx (main): Also print elapsed real time for each pass.
* copyright year updatefche2006-01-281-1/+1
|
* 2006-01-27 Frank Ch. Eigler <fche@elastic.org>fche2006-01-281-8/+8
| | | | | | | | * main.cxx: Make "-v" (verbose) flag a counter. * stap.1.in: Document this. * session.h: Corresponding changes. * {elaborate,buildrun,tapsets,translate}.cxx: Update all uses of verbose flag to compare it to sensible level for value of message.
* 2006-01-27 Frank Ch. Eigler <fche@elastic.org>fche2006-01-281-5/+47
| | | | | | * main.cxx (main): In verbose mode, print user+sys times after each pass. * buildrun.cxx (compile_pass): Move success message back to main().
* 2006-01-24 Frank Ch. Eigler <fche@elastic.org>fche2006-01-241-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 2060 etc. * tapsets.cxx (visit_target_symbol): Tolerate failed resolution by letting target_symbol instance pass through to optimizer and type checker. * elaborate.cxx (semantic_pass_optimize): New family of functions and associated visitor classes. (visit_for_loop): Tolerate absent init/incr clauses. (semantic_pass): Invoke unless unoptimized (-u) option given. * main.cxx, session.h: Add support for flag. * staptree.cxx (visit_for_loop): Tolerate absent init/incr clauses. (traversing_visitor::visit_arrayindex): Visit the index expressions. (functioncall_traversing_visitor): New class. (varuse_tracking_visitor): New class. * staptree.h: Corresponding changes. * parse.cxx (parse_for_loop): Represent absent init/incr expressions with null statement pointer instead of optimized-out dummy numbers. * stap.1.in: Document optimization. * testsuite/{semko,transko}/*.stp: Added "-u" or other code to many tests to check bad code without optimizer elision. * testsuite/semok/optimize.stp: New test. * elaborate.cxx (unresolved, invalid, mismatch): Standardize error message wording. * stapfuncs.5.in: Tweak print/printf docs. * tapset/logging.stp: Remove redundant "print" auxiliary function, since it's a translator built-in. * testsuite/transok/five.stp: Extend test. * translate.cxx (emit_symbol_data): Put symbol table into a separate temporary header file, to make "-p3" output easier on the eyes. * buildrun.cxx (compile_pass): Eliminate test-mode support throughout. * main.cxx, session.h, translate.cxx: Ditto. * main.cxx (main): For last-pass=2 runs, print post-optimization ASTs.
* 2006-01-13 Frank Ch. Eigler <fche@elastic.org>fche2006-01-131-5/+14
| | | | | * main.cxx (main): Suppress "Try again with -v" message if already verbose.
* 2005-12-12 Kevin Stafford <krstaffo@us.ibm.com>kevinrs2005-12-121-6/+14
| | | | | * main.cxx (main): Added arch directory to the existing kernel-version-sensitive search path.
* 2005-11-24 Frank Ch. Eigler <fche@redhat.com>fche2005-11-241-0/+1
| | | | | | | | | 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.
* 2005-11-01 Frank Ch. Eigler <fche@elastic.org>fche2005-11-011-9/+11
| | | | | | | | | | | | | | | | | | | | PR 1425. * configure.ac: Look for rpm-devel headers and libs. * configure: Regenerated. * session.h: New file to contain systemtap_session decl. * staptree.h: Likewise evict statistics_decl. * elaborate.h: Corresponding changes. * main.cxx (usage): Elaborate. Re-enable "-r RELEASE" option. * parse.cxx (parser): Add systemtap_session& field. Update users. (scan_pp, eval_pp_conditional): New routines for preprocessing. (peek, next): Call it. (lexer::scan): Lex the preprocessor operators. (parser::parse): Include an extra level of exception catching for parse errors that occur during recovery. * parse.h: Corresponding changes. (parse_error): Allow explicit token parameter. * stap.1.in: Document preprocessing. * testsuite/parseok/fourteen.stp: New test.
* fixes part of PR1194 (passing -o option to stpd)trz2005-10-191-2/+2
|
* 2005-10-18 Frank Ch. Eigler <fche@redhat.com>fche2005-10-181-2/+14
| | | | | | | 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.
* 2005-10-06 Frank Ch. Eigler <fche@elastic.org>fche2005-10-061-6/+7
| | | | | | * stap.1.in: Document -b/-s options. * main.cxx (usage): Clarify -b/-s blurbs. * translator.cxx (translate_pass): Handle bulk_mode here instead.
* stap command-line option additions: -b (bulk mode), -s (buffer size)trz2005-10-051-1/+19
|
* 2005-09-28 Frank Ch. Eigler <fche@elastic.org>fche2005-09-281-1/+6
| | | | | | | | | | | | | | | | 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.
* 2005-09-07 Frank Ch. Eigler <fche@redhat.com>fche2005-09-071-1/+1
| | | | | * main.cxx (main): Choose getpid()-based module names. * tapsets.cxx: Make timer.jiffies' use of task_pt_regs __i386__-only.
* 2005-09-06 Martin Hunt <hunt@redhat.com>hunt2005-09-061-1/+13
| | | | | | | | | | | | * tapset/context.stp: Add function target(). * stapfuncs.5.in (target): Document it. * elaborate.h (struct systemtap_session): Add cmd and target_pid to the struct. * main.cxx (usage): Add secriptions of "-c" and "-x" options. (main): Set s.cmd and s.target_pid. * buildrun.cxx (stringify): Copy this utility func here too. (run_pass): Add new options to set cmd and pid to the stpd command line.
* nonefche2005-08-221-1/+0
|
* 2005-08-16 Frank Ch. Eigler <fche@elastic.org>fche2005-08-161-5/+6
| | | | * main.cxx: Don't print library parse trees if last_pass=1.
* 2005-08-12 Frank Ch. Eigler <fche@elastic.org>fche2005-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | PR systemtap/1122 et alii * parse.cxx (parse_literal): Parse and range-limit 64-bit numbers. (parse_unary): Correct precedence glitch. * staptree.h (literal_number): Store an int64_t. * staptree.cxx: Corresponding changes. * translate.cxx (check_dbz): Remove - insufficient. (emit_function): Define CONTEXT macro sibling for THIS. (c_typename): pe_long -> int64_t. (visit_literal_number): Format literal rigorously and uglily. (c_assignop, visit_binary_expression): Handle div/mod via new helper functions in runtime. * tapset/builtin_logging.stp: Add error, exit builtins. * testsuite/buildok/ten,eleven.stp: New tests. * testsuite/parse{ko,ok}/six.stp: Modify for larger numbers. * testsuite/transok/one.stp: Add more ";"s, maybe unnecessarily. 2005-08-12 Frank Ch. Eigler <fche@elastic.org> * arith.c: New file to contain arithmetic helper functions. * builtin_functions.h: Remove, unused. * runtime.h: Include it.
* 2005-08-10 Frank Ch. Eigler <fche@elastic.org>fche2005-08-101-6/+18
| | | | | | * tapsets.cxx: Correct hex/decimal misformatting of verbose messages. * main.cxx: Add formal "-h" and "-V" options. * stap.1.in: Document them.
* 2005-08-03 Frank Ch. Eigler <fche@redhat.com>fche2005-08-031-4/+5
| | | | | | | | * stap.1: More meat, all stub sections filled. * elaborate.cxx (visit_assignment): Add numerous missing cases. * parse.cxx: Parse ".=" operator. * testsuite/semok/sixteen.stp: Check them. * main.cxx (usage): Don't show incompletely supported options.
* 2005-07-29 Roland McGrath <roland@redhat.com>roland2005-07-291-6/+8
| | | | * main.cxx (main): Check return value of system.
* 2005-07-28 Frank Ch. Eigler <fche@redhat.com>fche2005-07-281-6/+4
| | | | | | | | | * stap.1: Beginnings of a man page. * Makefile.am: Install it. Comment out stpd LDADD goodies. * configure.ac: Futilely complain about non-stpd LIBS. * Makefile.in, configure.in: Regenerated. * main.cxx (usage): Remove ARGS from help text, as nothing is done with these yet.
* 2005-07-28 Frank Ch. Eigler <fche@redhat.com>fche2005-07-281-22/+26
| | | | | | | | | | | | | | | | | | | translator/1120 * main.cxx (main): Preset -R and -I options from environment variables (if set). Pass guru mode flags to parser. * parse.cxx (privileged): New parser operation flag. Update callers. (parse_embeddedcode): Throw an error if !privileged. (parse_functiondecl): Change signature. Prevent duplicates. (parse_globals): Ditto. * parse.h: Corresponding changes. * tapset/*.stp: Beginnings of real tapset library, to replace previous builtins. * tapsets.cxx: Greatly reduce verbose mode output. * Makefile.am: Install & dist it. * runtest.sh: Refer to it. * Makefile.in, aclocal.m4: Regenerated. * testsuite/*/*.stp: Set guru mode via /bin/sh if needed. * testusite/*/*ko.stp: Homogenize shell scripts.
* 2005-07-28 Frank Ch. Eigler <fche@redhat.com>fche2005-07-281-19/+61
| | | | | | | | | | | | translator/1120 translator/1123 * elaborate.cxx (semantic_pass_symbols): Print a more helpful error message around exceptions. * elaborate.h (systemtap_session): Add guru_mode field. * main.cxx (main): Initialize it to false. Add version-sensitive script library searching. Add more failure messages. * tapsets.cxx (dwflpp_assert): Add a decorative text parameter. Update callers.
* 2005-07-26 Frank Ch. Eigler <fche@redhat.com>fche2005-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | Support %{ embedded-c %} * staptree.h (embeddedcode): New statement subtype. Stub support in visitors. * staptree.cxx: Ditto. * parse.cxx: Parse %{ / %}. Accept "_" as identifier leading char. (parse_probe): Simplify calling convention. * elaborate.h: Store embedded code. * elaborate.cxx: Pass it. * translate.cxx: Transcribe it. Return some dropped module init/exit code. * Makefile.am: Add buildok/buildko tests. * Makefile.in: Regenerated. * main.cxx: Return EXIT_SUCCESS/FAILURE even for weird rc. * testsuite/parseok/nine.stp: Test _identifiers. * testsuite/transko/*.stp: Tweak to force -p3 rather than -p2 errors. * testsuite/semok/transko.stp: ... and keep it that way in the future. * testsuite/parse*/*: Some new tests for %{ %}. * testsuite/build*/*: New tests for -p4.