summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add prototypes for using the 2.6.26 probe_kernel_* functions.Josh Stone2008-05-271-0/+6
| | | | | | | | | For now, the autoconf for the new code is disabled, because it shows poorer performance than our existing dereferencing functions. This is probably because ours get inlined and optimized. The code is being committed so that we may re-evaluate its usefulness in the future. This addresses bugzilla 6432.
* PR6405: unwinder build compatibility with RHEL5Frank Ch. Eigler2008-04-151-1/+1
|
* Fixes for 2.6.25 pt_regs changes.Martin Hunt2008-04-091-2/+0
|
* 2008-03-14 Masami Hiramatsu <mhiramat@redhat.com>hiramatu2008-03-151-0/+1
| | | | | | | | | | | PR 3542 * buildrun.cxx (compile_pass): Add an autoconf to check the kernel supports batch unregistration. * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Add an array of probe pointers for batch unregistration. * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): Use unregister_k(ret)probes if it is supported. * runtime/autoconf-unregister-kprobes.c : New file.
* 2008-03-13 Frank Ch. Eigler <fche@elastic.org>fche2008-03-131-4/+6
| | | | | | PR 5928. * buildrun.cxx (compile_pass): Use EXTRA_CFLAGS for autoconf'd values instead of CFLAGS_<module>.o.
* PR5045: clean up after interruptsfche2008-02-281-4/+1
| | | | | | | | | | | 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.
* PR5787, PR2608: .statement(NUM) probing fixesfche2008-02-231-1/+1
| | | | | | | | | | | | | | | | | | | 2008-02-22 Frank Ch. Eigler <fche@elastic.org> PR5787, PR2608, .statement() * tapsets.cxx (query_dwarf_func): Process .statement(NUM) probes too. (query_cu): Ditto. (query_func_info): Bypass prologue searching for .statement() probes. (query_cu): Ditto. (build_blacklist): Remove unsightly empty first alternative in "^(|foo)$" regexps. Show them for -vvv. * buildrun.cxx (compile_pass): Don't turn on "gcc -Q" on until -vvvv. 2008-02-22 Frank Ch. Eigler <fche@elastic.org> * systemtap.base/stmtvars.exp: New test for PR 5787.
* 2008-02-07 Frank Ch. Eigler <fche@elastic.org>fche2008-02-071-2/+4
| | | | | * buildrun.cxx (run_make_cmd, compile_pass): Tweak kbuild parametrization to produce useful compile logs at -vv.
* From srinivasa@in.ibm.com, To make systemtap to work with register rename ↵srinivasa2008-01-181-0/+3
| | | | patch for x86/x86_64
* PR 5270kenistoj2007-11-131-17/+83
| | | | | | | | | | | | | * 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-19/+63
| | | | | | | | | | | | | | | | | | | | | | | * 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
* 2007-10-04 David Smith <dsmith@redhat.com>dsmith2007-10-041-6/+6
| | | | | * buildrun.cxx (compile_pass): Tweaked build system for the 2.6.23-rc8-mm2 kernel.
* 2007-09-24 Masami Hiramatsu <mhiramat@redhat.com>hiramatu2007-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | PR 3916 * buildrun.cxx (compile_pass): Add new autoconf options for checking time related APIs. * time.c (stp_time_t): Rename cpufreq to freq. (__stp_get_freq): Rename from __stp_estimate_cpufreq. Use tsc_khz or cpu_khz if it is available. Use itc_freq on ia64. (__stp_ktime_get_real_ts): New function to get current kernel time. (__stp_time_timer_callback): Call __stp_ktime_get_real_ts to get base time. (__stp_init_time): Ditto. (__stp_constant_freq): New function to check the processor has constant frequency timestamp counter. (_stp_kill_time): Don't use the cpufreq notifier if the processor has constant frequency timestamp counter. (_stp_init_time): Ditto. * autoconf-ktime-get-real.c : New file. * autoconf-constant-tsc.c: Ditto. * autoconf-tsc-khz.c: Ditto.
* 2007-08-20 Martin Hunt <hunt@redhat.com>hunt2007-08-201-1/+1
| | | | | | | | | PR2424 From Lai Jiangshan <laijs@cn.fujitsu.com> * util.cxx (cmdstr_quoted): New. Properly quote command string. * buildrun.cxx (run_pass): Call cmdstr_quoted().
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-06-20 David Smith <dsmith@redhat.com>dsmith2007-06-201-0/+12
| | | | | | | * 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-05-25 Frank Ch. Eigler <fche@redhat.com>fche2007-05-261-1/+0
| | | | | | | | | | | | PR 4255 teaser. * elaborate.cxx (has_null_param): New function. * elaborate.h: Declare it. * session.h: Include uprobe_derived_probes group. * tapsets.cxx (uprobe_*): New classes. (all_session_groups): List uprobes in list. (register_standard_tapset): Interpret process(#).statement(#).absolute and process(#).statement(#).absolute.return probe points.
* 2007-05-08 Martin Hunt <hunt@redhat.com>hunt2007-05-081-0/+1
| | | | | * buildrun.cxx (run_pass): Send proper verbosity level to staprun
* 2007-04-27 Frank Ch. Eigler <fche@elastic.org>fche2007-04-271-3/+7
| | | | | | | | | | | PR 4432. * buildrun.cxx (compile_pass): Tweak autoconf CFLAGS handling to avoid macro recursion but still get the needed -I directives. Add the inode-private autoconf test. 2007-04-27 Frank Ch. Eigler <fche@elastic.org> * autoconf-inode-private.c: New file from hunt.
* 2007-04-26 Frank Ch. Eigler <fche@elastic.org>fche2007-04-261-1/+1
| | | | | PR 4432. * buildrun.cxx (compile_pass): Add $(mflags-y) to stap_check_build.
* 2007-04-26 Frank Ch. Eigler <fche@elastic.org>fche2007-04-261-1/+1
| | | | | * buildrun.cxx (compile_pass): Correct placement of commented-out "set -x" make-macro-debugging snippet.
* 2007-04-04 Frank Ch. Eigler <fche@elastic.org>fche2007-04-041-0/+1
| | | | | | GCC 4.3 compatibility patches from Debian. * buildrun.cxx, hash.cxx, tapsets.cxx, translate.cxx: #include a few more C++ headers.
* 2007-03-19 Frank Ch. Eigler <fche@elastic.org>fche2007-03-191-1/+13
| | | | | | | | | | | * buildrun.cxx (compile_pass): Emit kbuild-time autoconf widgets to customize runtime or translator C code to actual kernel rather than kernel version string. Thanks to FC 2.6."20" for the nudge. * tapsets.cxx (hrtimer*emit_module): First client: HRTIMER_{MODE_}REL. 2007-03-19 Frank Ch. Eigler <fche@elastic.org> * autoconf-hrtimer-rel.c: New file.
* 2007-03-14 Martin Hunt <hunt@redhat.com>hunt2007-03-141-1/+1
| | | | | | | | | | | | | | | * Makefile.am (staprun_SOURCES): Sources now live in runtime/staprun. * makefile.in: Rebuilt. * staprun.8.in: Updated. * buildrun.cxx (run_pass): Use "-v" instead of not "-q" to be compatible with latest staprun. * translate.cxx (emit_module_exit): Print warning using _stp_printf so it shows up at the end of all output. (translate_pass): Replace STP_RELAYFS with STP_BULKMODE. Eliminate STP_RELAYFS_MERGE.
* wishlist item, commented outfche2006-12-181-0/+6
|
* 2006-11-08 Frank Ch. Eigler <fche@elastic.org>fche2006-11-081-32/+1
| | | | | | * 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.
* 2006-11-02 Frank Ch. Eigler <fche@elastic.org>fche2006-11-021-0/+2
| | | | | | | | | * Makefile.am: Install tapset/README too. * Makefile.in: Regenerated. 2006-11-02 Frank Ch. Eigler <fche@elastic.org> * README: Add a blurb against running these scripts directly.
* 2006-09-26 David Smith <dsmith@redhat.com>dsmith2006-09-261-10/+10
| | | | | | | | | | | | | | | | | | | | | * .cvsignore: Changed 'stpd' reference to 'staprun'. * INTERNALS: Ditto. * buildrun.cxx (run_pass): Ditto. * lket.5.in: Ditto. * stap.1.in: Ditto. * stapruncs.5.in: Ditto. * examples/small_demos/demo_script.txt: Ditto. * examples/small_demos/sys.stp: Ditto. * systemtap.spec.in: Created a new subpackage, "systemtap-runtime", that contains staprun. * Makefile.am: Renamed 'stpd' to 'staprun' and moved it to $(bindir). * Makefile.in: Regenerated from Makefile.am. * configure.ac: Incremented version number. * configure: Regenerated from configure.ac.
* 2006-09-18 Martin Hunt <hunt@redhat.com>hunt2006-09-181-1/+0
| | | | | | * buildrun.cxx (run_pass): Remove "-m" option to stpd. * translate.cxx (translate_pass): #define STP_RELAYFS_MERGE if appropriate.
* 2006-09-13 Martin Hunt <hunt@redhat.com>hunt2006-09-131-1/+0
| | | | * buildrun.cxx (run_pass): Remove "-r" option to stpd.
* 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-06-30 David Smith <dsmith@redhat.com>dsmith2006-06-301-1/+17
| | | | | | | | | | | | * tapsets.cxx (dwflpp::dwfl_assert): Added optional extra_msg parameter to be able to print out extra error message. (dwflpp::setup): Uses new 'extra_msg' parameter to dwfl_assert() to ask user to install kernel-debuginfo when dwfl_linux_kernel_report_kernel() or dwfl_linux_kernel_report_modules() fails (Bugzilla #2669). * buildrun.cxx (compile_pass): Checks to make sure module build directory exists before trying to run make there (Bugzilla #2669).
* -M option to control to do merge or not for bulk modeguanglei2006-05-091-0/+1
|
* 2006-04-21 Frank Ch. Eigler <fche@elastic.org>fche2006-04-211-2/+6
| | | | | | | | | | | | | | | | | PR 953 * elaborate.h (derived_probe): Add field "name". Stop passing "probe index" to other emit_* calls. (emit_probe_context_vars): New member function. * elaborate.cxx (derived_probe ctor): Generate unique name. * translate.cxx (*): Adapt to index->name. (emit_probe): Realize that probe locals only occur at nesting=0. * tapsets.cxx (*derived_probe::emit_*): Adapt to index->name. (mark_var_expanding_copy_visitor): New class to process $argN. (mark_derived_probe ctor): Call it. (mark_derived_probe::emit_probe_context_vars): Do it. * buildrun.cxx (compile_pass): Add more optional gcc verbosity. Add CFLAGS += -freorder-blocks. * testsuite/buildok/marker.stp: New test.
* Fix PR 2538trz2006-04-121-1/+1
|
* remove relayfs include pathtrz2006-03-161-1/+0
|
* 2006-03-06 Martin Hunt <hunt@redhat.com>hunt2006-03-061-1/+6
| | | | | * buildrun.cxx (run_pass): Add "-u username". * stapfuncs.5.in: Document system().
* 2006-01-27 Frank Ch. Eigler <fche@elastic.org>fche2006-01-281-4/+4
| | | | | | | | * 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/+0
| | | | | | * 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-93/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10 Frank Ch. Eigler <fche@redhat.com>fche2006-01-101-2/+9
| | | | | | | | | | | | | PR 2060. * buildrun.cxx (compile_pass): Add "V=1" to kbuild if verbose. * translate.cxx (translator_output): For output-file constructor, set an explicit output buffer. (emit_module_init, emit_module_exit): Reorganize output, to spit each individual probe registration/deregistration blurb into a separate function. * translate.h: Corresponding changes; set default buffer size to 8K. * translate.cxx, tapsets.cxx: Replace "endl" by buffer-friendly "\n" throughout code generation routines.
* 2005-12-08 Frank Ch. Eigler <fche@elastic.org>fche2005-12-081-15/+17
| | | | | | | | | | | | | | | PR 1937 * buildrun.cxx (run_pass): Pass new "-d PID" option to stpd. Set SIGHUP to SIG_IGN too. 2005-12-08 Frank Ch. Eigler <fche@elastic.org> PR 1937 * stpd.c (main): Support new "-d" option. (usage): Document it. * librelay.c (driver_poll): New function to react to death of driver process. (stp_main_loop): Call it if "-d PID" given. Treat SIGHUP like others.
* fixes part of PR1194 (passing -o option to stpd)trz2005-10-191-1/+2
|
* 2005-10-18 Frank Ch. Eigler <fche@redhat.com>fche2005-10-181-3/+3
| | | | | | | 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.
* stap command-line option additions: -b (bulk mode), -s (buffer size)trz2005-10-051-1/+4
|
* 2005-09-28 Frank Ch. Eigler <fche@elastic.org>fche2005-09-281-2/+27
| | | | | | | | | | | | | | | | 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-06 Martin Hunt <hunt@redhat.com>hunt2005-09-061-2/+18
| | | | | | | | | | | | * 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.
* 2005-08-29 Frank Ch. Eigler <fche@redhat.com>fche2005-08-301-0/+1
| | | | | | | | | | | | | | * 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.
* 2005-07-26 Martin Hunt <hunt@redhat.com>hunt2005-07-271-1/+1
| | | | | * buildrun.cxx (compile_pass): Add -Wno-unused to CFLAGS because usually a module doesn't use every function in the runtime.
* 2005-07-15 Frank Ch. Eigler <fche@redhat.com>fche2005-07-151-0/+1
| | | | | | * Makefile.am (install-data-local): Correct typo. * buildrun.cxx (compile_pass): Ditto. * main.cxx (main): Print errors if passes 4 or 5 fail.