summaryrefslogtreecommitdiffstats
path: root/main.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Fix compile error caused by PATH_MAX in F9.Zhaolei2008-06-021-0/+1
|
* Fix the problem that kernel module compile failure when runtimeZhaolei2008-06-021-0/+10
| | | | directory is set to relative path(stap -R).
* Remove sa_restorer initialization.William Cohen2008-05-191-1/+0
|
* suppress "pass-2 failed" messages from "stap -l FOOBAR"; just produce empty ↵Frank Ch. Eigler2008-05-171-1/+1
| | | | output
* Ignores signals when removing the temporary directory.David Smith2008-05-151-4/+29
| | | | | | | | 2008-05-15 David Smith <dsmith@redhat.com> * main.cxx (setup_signals): New function. (main): Calls setup_signals() to setup signal handling. When removing the temporary directory, ignore signals.
* Merge commit 'origin/dwarfless'Jim Keniston2008-05-121-2/+69
|\ | | | | | | PR 4311 - Function boundary tracing without debuginfo: Phases 1 and 2
| * PR 4311 - Function boundary tracing without debuginfo: Phase IJim Keniston2008-04-181-2/+69
| | | | | | | | | | | | | | | | | | | | | | * tapsets.cxx: Major rework of dwflpp, dwarf_query, and related code to make do with elf info if dwarf info is absent, or (in the case of vmlinux) make do with a System.map-style symbol table if even the elf file is absent. * main.cxx: Use getopt_long instead of getopt. Added --kelf, --kmap, --ignore-vmlinux, and --ignore-dwarf. * hash.cxx, session.h, stap.1.in: Added --kelf, --kmap, --ignore-vmlinux, and --ignore-dwarf.
* | PR6492: make listing mode warning-freeFrank Ch. Eigler2008-05-071-0/+1
| |
* | PR6008: Increase the limitation of the buffer size to 4095MB.Masami Hiramatsu2008-04-301-2/+2
| |
* | PR6454: fix "stap -l" listing of space-laden probe point namesFrank Ch. Eigler2008-04-241-8/+12
| |
* | PR2949: listings mode (stap -l PROBE)Frank Ch. Eigler2008-04-101-62/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-04-10 Frank Ch. Eigler <fche@elastic.org> PR 2949. * session.h (listing_mode): New field. * main.cxx (main): Test it. Enjoy it. (usage): Document it. * stap.1.in, stapex.5.in: Ditto. * elaborate.cxx (print_error): Disable error messages in listing mode. 2008-04-10 Frank Ch. Eigler <fche@elastic.org> PR 2949 * systemtap.base/cmd_parse.exp: Add "-l" listing test.
* | PR6393: don't bother print build (configure) date any more, with reliable ↵Frank Ch. Eigler2008-04-101-2/+1
| | | | | | | | git ids
* | PR6393: git version tagging at build timeFrank Ch. Eigler2008-04-101-0/+2
|/ | | | | | | | | | | | 2008-04-10 Frank Ch. Eigler <fche@elastic.org> PR 6393. * git_version.sh: New file, copied from radeonhd. * configure.ac: No longer generate $builddir/SNAPSHOT. * Makefile.am: Generate $builddir/git_version.h. (EXTRA_DIST): Add git_version.h and git_version.sh. * main.cxx (version): Print generated GIT_MESSAGE therefrom. * Makefile.in, configure: Regenerated.
* 2008-02-29 Will Cohen <wcohen@redhat.com>wcohen2008-02-291-1/+1
| | | | * main.cxx (handle_interrupts): Make compatible with GCC 4.3.
* PR5045: clean up after interruptsfche2008-02-281-10/+37
| | | | | | | | | | | 2008-02-28 Frank Ch. Eigler <fche@elastic.org> PR5045 * session.h (pending_interrupts): New global. * main.cxx (handle_interrupts): New fn to handle SIGINT* etc. * elaborate.cxx, translate.cxx, tapsets.cxx, main.cxx (*): Insert pending_interrupts escape hatches inside potentially timetaking loops. * buildrun.cxx: Don't deal with signals.
* update copyright year in -v message toofche2008-01-301-2/+2
|
* Fix mkdtemp() umask issuefche2008-01-021-0/+2
| | | | | | | | | | | | | | | | | | | | | Even though the mkdtemp() man page indicates that the directory will be created with always 0700 permissions, it is actually affected by the process's umask. So, if you run stap with an unusual umask it can end up creating the temp dir with permissions that staprun can't handle e.g.: $> rpm -q systemtap systemtap-0.6-1.fc9 $> umask 0122 $> stap -e 'probe begin { println("foo") exit() }' ERROR: Error opening '/tmp/stapV4pBIb/stap_725b9bc541cef2618a5ccbc58bb64d15_287.ko': Permission denied Obvious solution is to briefly set the umask to zero in stap so as to ensure 0700 permissions. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* PR 5324kenistoj2007-11-141-0/+1
| | | | | * main.cxx: Restored initialization of need_uprobes flag, mistakenly backed out in PR 5270 fix.
* PR 5270kenistoj2007-11-131-20/+6
| | | | | | | | | | | | | * main.cxx: Restored pre-10-08 version: moved uprobes build to buildrun.cxx. * buildrun.cxx: Reworked uprobes build so that the resulting Module.symvers can be used in building the stap-generated module. If user isn't root, call verify_uprobes_uptodate() rather than trying (and failing) to rebuild uprobes.ko. * buildrun.h: uprobes_enabled() and make_uprobes() are no longer extern. * runtime/uprobes/Makefile: Added uprobes.ko target for use by verify_uprobes_uptodate().
* PR 5709kenistoj2007-10-081-6/+20
| | | | | | | | | | | | | | | | | | | | | | | * main.cxx: Add pass 4.5: make uprobes.ko in runtime/uprobes * buildrun.cxx: Add uprobes_enabled() and make_uprobes(). Factor run_make_cmd() out of compile_pass(). * buildrun.h: Add uprobes_enabled and make_uprobes decls. * tapsets.cxx: Do correct #include for modprobed uprobes.ko; set need_uprobes in pass 2. * session.h: Add need_uprobes * runtime/staprun/common.c: Add -u option -> need_uprobes * runtime/staprun/staprun_funcs.c: Generalize insert_module() to support inserting uprobes.ko. * runtime/staprun/staprun.c: Add enable_uprobes(). insert_module call becomes insert_stap_module(). * runtime/staprun/staprun.h: Reflect insert_module() and need_uprobes changes * runtime/uprobes/*.[c,h]: uprobes is built as a module, rather than included into the source of the stap-generated module. * runtime/uprobes/Makefile: Added
* PR1119: unused variable elision warningsfche2007-10-061-4/+10
| | | | | | | | | | | | | | | | | | 2007-10-05 Frank Ch. Eigler <fche@elastic.org> PR 1119 * elaborate.cxx (semantic_pass_opt[12]): Warn on elided variables/functions in user script. * session.h (suppress_warnings): New field. Change "timing" to plain old bool. * main.cxx (main): Configure warnings on by default. * stap.1.in: Document this. PR 1119. * systemtap.base/warnings.*: New test. * futexes.stp, sig_by_proc.stp, small_demos/rwtiming.stp: Fix elision warnings.
* Changes in configure scripts, Makefiles required for removing LKET fromsrikar2007-08-271-2/+0
| | | | systemtap (PR 4817)
* 2007-08-20 David Smith <dsmith@redhat.com>dsmith2007-08-201-0/+6
| | | | | | From Lai Jiangshan <laijs@cn.fujitsu.com> * main.cxx (main): Make sure the '-c' and '-x' options can't be specified together.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge from setuid-branch. Changes also by Martin Hunt <hunt@redhat.com>. * Makefile.am: Added staprun_funcs.c and cap.c to staprun_SOURCES. Added -lcap to staprun_LDADD. Removed stp_check reference. Added stapio program. Staprun is now setuid. * Makefile.in: Rebuilt. * configure.ac: Version increase to 0.6 and checks for libcap availability. Removed stp_check reference. * configure: Regenerated. * stp_check.in: Removed. * systemtap.spec.in: Version increase to 0.6-1 and added BuildReq for libcap-devl (and removed sudo requirement). Added %pre script to create new groups. Staprun is now setuid. * NEWS: Added info on new security model. * INTERNALS: Removed sudo reference. * README.security: New file. * main.cxx (main): Make sure module name isn't too long. * hash.cxx: Moved MODULE_NAME_LEN define to hash.h. * hash.h: Moved MODULE_NAME_LEN define here from hash.cxx. * buildrun.cxx (run_pass): No longer runs staprun with "sudo". * stap.1.in: Removed sudo references and added information about the stapdev/stapusr groups. * staprun.8.in: Added information about module detaching and attaching. Removed sudo references and added information about the stapdev/stapusr groups. Removed reference to staprun needing to be run as root. Removed reference to removed '-u USERNAME' option. * .cvsignore: Removed stp_check and added stapio and stap_merge.
* 2007-07-26 David Smith <dsmith@redhat.com>dsmith2007-07-261-2/+19
| | | | | | | PR 4295 * main.cxx (main): If '-m MODNAME' is used, the generated module is saved in the current directory. * stap.1.in: Updated '-m' description.
* 2007-07-11 Frank Ch. Eigler <fche@elastic.org>fche2007-07-111-0/+6
| | | | | | | * configure.ac: Don't AC_MSG_ERROR if don't HAVE_LIBSQLITE3. * coveragedb.cxx: Compile to nothing unless HAVE_LIBSQLITE3. * main.cxx: Print no error message on -q if HAVE_LIBSQLITE3. * configure: Regenerated, looks rosier with HAVE_LIBSQLITE3.
* 2007-06-26 William Cohen <wcohen@redhat.com>wcohen2007-06-261-1/+19
| | | | | | | | | | | | | | | | | | | | PR 4529 * coveragedb.cxx: New. * coveragedb.h: New. * Makefile.am: Add coveragedb.cxx and sqlite3 to build. * Makefile.in: Regenerated. * configure.ac: Add test for sqlite3 * configure: Regenerated. * systemtap.spec.in: Add dependencies for sqlite3/sqlite3-devel. * elaborate.h, elaborate.cxx (derived_probe::collect_derivation_chain): New. (alias_expansion_builder::build): Correct token location. (semantic_pass_opt[12): Track used and unused variables/functions. * session.h (tapset_compile_coverage, unused_globals, unused_probes, unused_functions): New fields. * staptree.h (unused_locals, probe_point::str): New member. * staptree.cxx: Ditto. * main.cxx: Add "-q" tapset coverage option and SYSTEMTAP_COVERAGE env.
* 2007-06-20 David Smith <dsmith@redhat.com>dsmith2007-06-201-0/+10
| | | | | | | * buildrun.cxx (compile_pass): Unset environment variables that could interfere with building the kernel module. Fixes PR 4664. * main.cxx (main): Unsets a few standard environment variables for safety.
* 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.