summaryrefslogtreecommitdiffstats
path: root/session.h
Commit message (Collapse)AuthorAgeFilesLines
* PR909: store kernel exported symbols in session objectFrank Ch. Eigler2010-03-181-1/+2
| | | | | | | * session.h (kernel_exports): New field. * main.cxx (parse_kernel_exports): Fill it. * tapset-perfmon.cxx (perf_builder::build): Check it for our pal perf_event_create_kernel_counter.
* Start of perf tapset parsingWill Cohen2010-03-171-0/+2
|
* Remove the old performance monitoring code.Will Cohen2010-03-171-3/+0
|
* PR11246 cont'd: Add options for cache controlJosh Stone2010-03-021-6/+7
| | | | | | | | | | | | | | | | --disable-cache : turn off all caching --clean-cache : clean up stale entries and then quit --poison-cache : force regeneration of items that would have hit the cache These are undocumented for now, until we decide whether they are generally useful. * main.cxx (main): Parse the new options. * session.h (systemtap_session): Add poison_cache; document the others. * clean.cxx (clean_cache): No longer static. (get_stapconf_from_cache, get_script_from_cache): Respect poison. * tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto. (dwarf_cast_expanding_visitor::filter_special_modules): Ditto.
* PR11246 cont'd: Separate script/stapconf cachingJosh Stone2010-03-021-0/+2
| | | | | | | | | | | I'm separating the caching and creation logic for stapconf, so it can be conditionalized on s.use_cache instead of s.use_script_cache. * session.h (systemtap_session): Store base_hash for better reuse. * hash.cxx (get_base_hash): Get the base from the session, or build it. (find_hash): Split into separate script/stapconf versions. * cache.cxx (add_to_cache, get_from_cache): Ditto. * main.cxx (main): Adapt caller, and delay stapconf until pass-4.
* PR11246: Add more granular cache controlJosh Stone2010-03-021-0/+1
| | | | | | | | | | | | | | There are some module options that require us to disable caching for the script, but before now this had a global effect. There are some cache objects, like tracepoint and @cast query modules, which we would like to cache even when the script itself needs to be uncached. * session.h (systemtap_session): New use_script_cache flag. * main.cxx (main): -m & -k can just disable the script cache. Failure to create the cache directories still disables all caching. * hash.cxx (create_hashdir): Failure disables all caching. * cache.cxx (add_to_cache): Failure only toggles the script caching. If the stapconf fails though, we don't need to block the .ko reuse.
* PR11075: -W option to turn warnings into errorsFrank Ch. Eigler2010-02-251-1/+2
| | | | | | | | * session.h * NEWS: Discuss it. * main.cxx: Parse it. * session.h (num_errors): Provide it. * semok/fortyeight.stp, semok/thirtyseven.stp: Test it.
* undocumented, obfuscated, *evil* option to suppress -Werror during module ↵Przemysław Pawełczyk2010-02-061-0/+1
| | | | | | | | building * session.h (omit_werror): New flag. * buildrun.cxx (compile_pass): Use it. * main.cxx (main): Set it.
* Hardware Breakpoints for x86 / x86_64, based on mainline kernel. [Changes : ↵Prerna Saxena2010-01-291-0/+2
| | | | Part 2]
* Rework filtering of client options. Add testsuite.Dave Brolley2010-01-111-8/+0
|
* Filter options for unprivileged use after --stap-client is seen.Dave Brolley2010-01-111-0/+8
|
* PR10702: preprocessor conditional for kernel CONFIG_fooFrank Ch. Eigler2009-10-081-0/+1
| | | | | | | | * session.h (kernel_config[]): New session field. * main.cxx (parse_kernel_config): Populate it. * parse.cxx (eval_comparison): Use it. * testsuite/buildok/utrace.stp, testsuite/parseok/kconfig.stp: New tests. * NEWS, stap.1.in, doc/langref.tex: Mention it.
* Remove the global derived_probe->semaphore mapJosh Stone2009-10-061-4/+0
| | | | | | | | | | Instead just make the semaphore address a member of derived_probe. * session.h (systemtap_session): Remove the map sdt_semaphore_addr. * elaborate.h (derived_probe): Add sdt_semaphore_addr directly. * tapsets.cxx (sdt_query::record_semaphore): Write the addr directly. (uprobe_derived_probe_group::emit_module_decls): Read it directly. * tapset-utrace.cxx (utrace_derived_probe_group::emit_probe_decl): Ditto
* Map std semaphores from probe->addrJosh Stone2009-09-171-1/+1
| | | | | | | | | | | | | Each probe needs to know the associated semaphore address, rather than the other way around. * session.h (sdt_semaphore_addr): Reverse the key-value types. * tapsets.cxx (record_semaphore): Take an index to only record the semaphore for newly added results. (sdt_query::handle_query_module): Adjust accordingly. (uprobe_derived_probe_group::emit_module_decls): Now it's a simple map lookup for sdt_sem_address. * tapset-utrace.cxx (utrace_derived_probe_group::emit_probe_decl): Ditto.
* * sdt.h (STAP_SEMAPHORE): New. Add guard to utrace probe points.Stan Cox2009-09-161-0/+4
| | | | | | | | | | | | | | * itrace.h (__access_process_vm): Moved from here... * runtime/access_process_vm.h: New. ...to here. * translate.cxx (translate_pass): Include access_process_vm.h * session.h (sdt_semaphore_addr): New. * tapsets.cxx (sdt_query::record_semaphore): New. Record sdt_semaphore_addr. (uprobe_derived_probe_group::emit_module_decls): Allow for uprobe guard variable to be set and unset. (uprobe_derived_probe_group::emit_module_decls): Likewise. (uprobe_derived_probe_group::emit_module_exit): Likewise. * tapset-utrace.cxx (utrace_derived_probe_group::emit_probe_decl): Likewise. (utrace_derived_probe_group::emit_module_decls): Likewise. (utrace_derived_probe_group::emit_module_exit): Likewise.
* PR10552: Removed references to the merge ('-M') option.David Smith2009-09-011-1/+0
| | | | | | | | | | | * hash.cxx (find_script_hash): Removed unused merge option. * main.cxx (checkOptions): Removed merge option checks. (main): Removed merge option. * session.h: Ditto. * initscript/README.initscript: Removed reference to '-M' option. * initscript/systemtap.in (stap_getopt): Ditto. * testsuite/parseko/cmdline01.stp: Removed merge option test. * testsuite/parseko/cmdline05.stp: Ditto.
* PR4186: cross-architecture probe buildingFrank Ch. Eigler2009-08-241-0/+1
| | | | | | | | | | | * main.cxx (main): Add 'a:' and 'B:' options. * session.h (kbuildflags): New place to store -B args. * testsuite/systemtap.base/cmd_parse.exp: Test them lightly. * buildrun.cxx (run_make_cmd): Use "--no-print-directory" rather than ">/dev/null" in kbuild invocations. Pass '-a' and '-B' flags along. * hash.cxx (find_script_hash): Add them. * NEWS, stap.1.in: Mention this.
* Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-08-041-0/+1
|\ | | | | | | | | | | Conflicts: cache.cxx
| * Use a real session flag for -LJosh Stone2009-07-291-0/+1
| | | | | | | | | | | | | | | | | | Rather than relying on 'unoptimized' to tell us that the listing mode should print the variables too, this adds an explicit listing_mode_vars. * session.h (systemtap_session): Add listing_mode_vars * main.cxx (main): Set s.listing_mode_vars appropriately. (printscript): Use the new flag for deciding whether to print locals
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-231-1/+0
|\|
| * Return hash module values directly as stringsJosh Stone2009-07-201-1/+0
| | | | | | | | | | | | | | | | * session.h (systemtap_session): remove tracequery_path * hash.cxx (find_tracequery_hash, find_typequery_hash): return strings * tapsets.cxx (dwarf_cast_expanding_visitor::filter_special_modules): get the hashed path from the return value instead of a parameter (tracepoint_builder::init_dw): ditto, and don't stuff it in session
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-141-3/+0
|\| | | | | | | | | | | Conflicts: main.cxx
| * Remove -O[0123s] gcc optimization flags for gcc pass 4 speedups again.Mark Wielaard2009-07-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We cannot guarantee that (un)optimized code compiles and/or generates fully functional code, so don't tempt the user to try it out. * session.h (struct systemtap_session): Remove gcc_flags string field. * hash.cxx (find_script_hash): Don't add gcc_flags. * main.cxx (usage): Remove -O[0123s] documentation. (main): Don't use gcc_flags. * buildrun.cxx (compile_pass): Don't add gcc_flags to EXTRA_CFLAGS. * stap1.in: Remove -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Remove tests for -O[0123s].
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-131-0/+3
|\| | | | | | | | | | | Conflicts: main.cxx
| * Add -O[0123s] gcc optimization flags for gcc pass 4 speedup.Mark Wielaard2009-07-111-0/+3
| | | | | | | | | | | | | | | | | | | | * session.h (struct systemtap_session): Add gcc_flags string field. * main.cxx (usage): Document -O[0123s]. (main): Default gcc_flags to -O0. Add O:: to getopt_long. Handle case 'O' to set gcc_flags. * buildrun.cxx (compile_pass): Add gcc_flags to EXTRA_CFLAGS. * stap1.in: Add -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Add tests for -O[0123s].
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-05-271-0/+2
|\|
| * Suggest rpms to install using debuginfo-install.William Cohen2009-05-271-0/+2
| | | | | | | | | | | | | | | | | | The patch makes use of the RPM libraries to determine which rpm supplied the executable and from that information suggest a command to install the appropriate debuginfo rpm. This is enabled using the "--with-rpm" option for configure. Can be explicitly disabled with "--without-rpm".
| * Module signing and verification using a separate file for the module signature.Dave Brolley2009-05-041-0/+1
| |
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-211-0/+2
|\|
| * From Prerna Saxena: Add the kprobe.function probe familyAnanth N Mavinakayanahalli2009-04-211-0/+2
| |
* | 2009-04-02 Dave Brolley <brolley@redhat.com>Dave Brolley2009-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stap-serverd (initialization): Create client certificate database if it does not exist. * stap-server (call_stap): Don't pass --sign-module to stap. * session.h (unprivileged): New member of systemtap_session. * modsign.cxx (init_cert_db_path, check_cert_db_path): New functions. (sign_module): Call check_cert_db_path. * main.cxx (usage): Document --signing-cert and --unprivileged. (runner): Set default signing certificate path. Initialize s.unprivileged. (LONG_OPT_SIGN_MODULE): Renamed to LONG_OPT_SIGNING_CERT. (LONG_OPT_UNPRIVILEGED): #define it. (long_options): Add --signing-cert and --unprivileged. (runner): Allow multiple --signing-cert options. Use the last specified. Don't reset unless the new setting is valid. Handle LONG_OPT_UNPRIVILEGED.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-301-4/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: aclocal.m4 configure testsuite/aclocal.m4 Also: 2009-03-30 Dave Brolley <brolley@redhat.com> * nsscommon.c (nssError): Handle SEC_ERROR_BAD_SIGNATURE. 2009-03-30 Dave Brolley <brolley@redhat.com> * modverify.c (verify_it): Print a message if the module may have been tampered with.
| * initialize skip_badvars=0. rererenag developers in session.h to do so in ↵Frank Ch. Eigler2009-03-271-4/+21
| | | | | | | | the future
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-231-0/+2
|\|
| * Cache the tracepoint query resultsJosh Stone2009-03-201-0/+1
| | | | | | | | | | | | | | To use tracepoints, we build a "tracequery" module that compiles debuginfo for all available tracepoints in the user's kernel. That's a bit of a cumbersome step to do during pass-2 though. This change adds tracequery caching so we only need to compile it once.
| * PR6930: stap: supports on-file flight recorder optionsMasami Hiramatsu2009-03-201-0/+1
| | | | | | | | | | | | | | Add on-file flight recorder options (the combination of -F and -o, and -S option) to stap command, and change manpages and NEWS. - Both of -F and -o is specified, stap passes -D option to staprun. - stap just passes -S option to staprun.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-161-0/+7
|\| | | | | | | | | | | | | | | | | Conflicts: Makefile.in main.cxx stap-find-servers stap-start-server
| * PR 7071: Optional $context variables fixRajan Arora2009-03-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Substitute erroneous target symbol with literal 0 if session level flag, skip_badvars is set. * session.h (struct systemtap_session): New flag: skip_badvars. * main.cxx: Command line argument --skip-badvars added. * stap.1.in: Entry for new option --skip-badvars. * NEWS: Added blurb for new option now available. * testsuite/semok/badvar.stp: Test case to check added functionality.
| * tracepoint probes: clear session derived_probe_groups pointer in ctor to ↵Frank Ch. Eigler2009-03-081-0/+2
| | | | | | | | avoid SEGV
| * Build tracequery to scan for tracepointsJosh Stone2009-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | * session.h (systemtap_session): add tracepoint_derived_probes * buildrun.cxx (make_tracequery): New - builds a kernel module that hijacks the tracepoint declarations, so we can query debuginfo. * buildrun.h: declare above * tapsets.cxx (tracepoint_builder): New builder for tracepoint probes. For now it just handles the initialization to build the tracequery kernel module.
* | 2009-03-12 Dave Brolley <brolley@redhat.com>Dave Brolley2009-03-121-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * util.cxx (remove_file_or_dir): New function. * util.h (remove_file_or_dir): New function. * systemtap.spec (stap): Add stap-env, stap-gen-cert, stap-authorize-cert, and stap-authorize-signing-cert. (stap-client): Remove stap-find-or-start-server, stap-add-server-cert. Add stap-authorize-server-cert. (stap-server): Add stap-find-servers, stap-find-or-start-server, stap-authorize-server-cert. Remove stap-gen-server-cert. * stap-find-servers: Source stap-env. Use $stap_avahi_service_tag. (initialization): Set timeout to 10. (find_servers): Run avahi-browse in the background and wait for it. Use a temp file for the output of avahi-browse. Kill avahi-browse if the timeout expires. (match_server): Set read timeout. (fatal): New function. * stap-find-or-start-server: Source stap-env. Use $stap_exec_prefix. Always exit with 0. * stap-start-server: Source stap-env. Check for the server PID as a running process and for avahi-publish-service running as a child in order to verify that the server is ready. * stap-add-server-cert: Renamed to stap-authorize-server-cert. Source stap-env. Call stap-authorize-cert. * stap-client: Source stap-env. Use $stap_user_ssl_db and $stap_root_ssl_db. Use $stap_tmpdir_prefix_client, $stap_tmpdir_prefix_server. Use $stap_exec_prefix. (configuration): Removed. (staprun_running): Removed. (interrupt): Don't kill staprun. * stap-server: Source stap-env. Use $stap_user_ssl_db and $stap_root_ssl_db. Use $stap_tmpdir_prefix_client, $stap_tmpdir_prefix_server. Use $stap_exec_prefix. (configuration): Removed. * session.h (systemtap_session): Add cert_db_path. * runtime/staprun/staprun_funcs.c (config.h): #include it. (modverify.h): #include it. (check_signature): New function. (check_groups): New function extracted from check_permissions. (check_permissions): Call check_groups and check_signature. * runtime/staprun/mainloop.c (cleanup_and_exit): Pass modpath to staprun, not modname. * main.cxx (main): Initialize cert_db_path. Handle LONG_OPT_SIGN_MODULE. Save the module signature if the module was signed and is being saved. (LONG_OPT_SIGN_MODULE): #define it. (long_options): Add --sign-module. * cache.cxx (config.h): #include it. (add_to_cache): Add the module signature file to the cache if the module has been signed. * buildrun.cxx (modsign.h): #include it. (compile_pass): Call sign_module, if requested. * configure.ac: Define HAVE_NSS if NSS libraries are available. * Makefile.am (AM_CPPFLAGS): Add -DSYSCONFDIR. (bin_SCRIPTS): Add stap-env, stap-gen-cert, stap-authorize-cert, stap-authorize-signing-cert, stap-authorize-server-cert. Remove stap-gen-server-cert, stap-add-server-cert. (stap_SOURCES): Add nsscommon.c, modsign.cxx (stap_CPPFLAGS): Add $(nss_CFLAGS), $(nspr_CFLAGS). (stap_LDADD): Add -lnss3. (staprun_SOURCES): Add nsscommon.c. * modsign.cxx: New file. * modsign.h: New file. * nsscommon.c: New file. * nsscommon.h: New file. * runtime/staprun/modverify.c: New file. * runtime/staprun/modverify.h: New file. * stap-authorize-cert: New file. * stap-authorize-signing-cert: New file. * stap-env: New file. * Makefile.in: Regenerated. * aclocal.m4: Regenerated. * config.in: Regenerated. * configure: Regenerated. * doc/Makefile.in: Regenerated. * doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * testsuite/aclocal.m4: Regenerated.
* Bump copyright years to 2009Josh Stone2009-02-181-1/+1
|
* Enable session-wide code filteringJosh Stone2009-02-181-0/+5
| | | | | | | | | | This will be used to hook to dwarf_builder to all functions and probes so it can attempt @cast expansion. * session.h (systemtap_session): Add a vector of update_visitors that will act as filters for all probes and functions. * elaborate.cxx (semantic_pass_symbols): Run probes and functions through each registered code filter.
* Clean up the autoconf cachingJosh Stone2009-02-071-0/+1
| | | | | | | | | | | | | | | | | This makes the stapconf caching process quite a bit more transparent. The options are now cached in a header file as #defines, and this header file is a normal build dependency instead of calling so many make $(shell ...) commands. * buildrun.cxx (compile_pass): Pull in autoconf options in a header of #defines rather than -DXXX, and make that header a build dependency. * buildrun.cxx (output_autoconf): New function to consolidate the computation of each autoconf test. * cache.cxx (add_to_cache, get_from_cache, clean_cache): Start treating the stapconf header as a first-class cached item. * cache.h: Move definitions of things only needed in cache.cxx * hash.cxx (find_stapconf_hash): Generate stapconf_name as a .h now. * main.cxx (main): Default the stapconf_name based on getpid().
* Save kernel autoconf options in a cache fileJosh Stone2009-02-061-0/+1
| | | | | | | | | | We're getting enough autoconf tests now that it's a significant chunk of the build time. Adding this cache shaves several seconds off for me. * hash.cxx (find_hash): Compute a separate script-independent hash for caching autoconf values, saved in session.stapconf_path. * buildrun.cxx (compile_pass): Tweak the Makefile to read/save the autoconf values in the cache directory
* Add Vim modelines for GNU style in stapJosh Stone2009-01-281-0/+2
|
* BZ 5892: Add stap -B to sic systemtap at an alternate kernel build treeRajan Arora2008-12-011-0/+1
|
* PR6925: --vp (per-pass verbosity) optionFrank Ch. Eigler2008-11-181-0/+1
|
* Minor changes to cache.cxx (cache_clean).Kent Sebastian2008-10-171-1/+0
|
* Functions implementing cache limiting.Kent Sebastian2008-10-101-0/+1
|