summaryrefslogtreecommitdiffstats
path: root/main.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 2007-06-14 Frank Ch. Eigler <fche@elastic.org>fche2007-06-141-4/+4
| | | | | | | * translate.cxx (emit_module_init): Emit translator/elfutils version numbers together. * main.cxx (version): Ditto. (main): Skip printing tapset directories where no sources were found.
* -t help message wording tweakfche2007-05-131-1/+1
|
* 2007-03-30 Frank Ch. Eigler <fche@redhat.com>fche2007-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR 1570 * NEWS: Document probe handler language change re. inline functions. * stapprobes.5.in: Likewise. * tapsets.cxx: Many changes to simplify caches and implement new handling of inline functions, removed of stubs for future probes. * elaborate.cxx (derived_probe printsig_nested): New function. * elaborate.h: Declare it. * main.cxx (usage): Clarify "-r" meaning. (main): Tweak related "-p 4" message. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570. * memory.stp, scheduler.stp, signal.stp, LKET/signal.stp: Adapt to .inline -> .function change. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570 * */*.stp: Adapt to .inline -> .function change. * lib/stap_run.exp, stap_run2.exp, stap_run_binary.exp: Shorten pass/fail dejagnu log lines. * systemtap.syscall/sys.stp, test.tcl: Make slightly more compatible and failure more verbose.
* 2007-03-29 David Smith <dsmith@redhat.com>dsmith2007-03-291-0/+32
| | | | | | | PR 4281 * main.cxx (main): Validates '-m NAME' option. Chops off '.ko' if present. Makes sure name isn't empty. Makes sure name is only composed of characters [_a-zA-Z0-9].
* 2007-03-14 Martin Hunt <hunt@redhat.com>hunt2007-03-141-2/+1
| | | | | | | * main.cxx (usage): Remove "-M" and edit description of "-b". * stap.1.in: Remove "-M" option and edit description of "-b". Edit description of "-o".
* 2007-02-09 Frank Ch. Eigler <fche@elastic.org>fche2007-02-091-1/+15
| | | | | | | | | | | | | | | | PR 3965 * configure.ac: Add --enable-prologue option. * configure, config.in: Regenerated. * session.h (prologue_searching): New field. * main.cxx (main): Parse new "-P" option. Initialize based on autoconf flag. * stap.1.in, NEWS: Document it. * hash.cxx (find_hash): Include it in computation. * tapsets.cxx (query_func_info, query_cu): Respect it. 2007-02-09 Frank Ch. Eigler <fche@elastic.org> * systemtap.base/prologue.*: New test case.
* 2007-01-29 Frank Ch. Eigler <fche@elastic.org>fche2007-01-291-12/+14
| | | | | | | | | * main.cxx (main): For successful last_pass=4, print compiled module name. * cache.cxx (get_from_cache): Ditto. 2007-01-29 Frank Ch. Eigler <fche@elastic.org> * systemtap.base/cache.exp (stap_compile): Accept new -p4 output.
* 2007-01-18 Frank Ch. Eigler <fche@elastic.org>fche2007-01-181-1/+1
| | | | | | * main.cxx (version): Add (C) 2007. * translate.cxx (emit_module_init): Add a KERN_DEBUG printk at module startup time to aid debugging and auditing.
* 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.