| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ideas from Frank Ch. Eigler:
- extending the hash.add() function to pass names along with the
hash-mix values, so that class hash can internally track the
hash-report string
- storing the reports themselves in the cache, beside the .ko / .c
files, and changing the cache-size-limit logic to delete
these .txt files upon garbage collection
* hash.h : New member parm_stream.
* hash.cxx (get_parms): New function to convert parms stream to string.
(hash::add): Aggregrate parms stream.
(create_hash_log): New function to log hash operation.
(find_*_hash): Log hash at the end of function.
* cache.cxx (clean_cache): Remove log when cache reaches limitation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To mitigate PR10424, we switched to building a separate tracequery
module for each tracepoint header, so a bad header wouldn't break all of
the others. However, with recent kernels that leads to ~18 make
commands, which adds up quickly in time. It's cached, so that's not too
bad, but as a developer who rebuilds stap frequently, it gets annoying.
If we're going to call 18 makes, it's worth it to start with one bigger
make that covers all the headers at once (like we used to). If that one
fails, we can still fall back to compiling individually.
FWIW, the failing ext4.h header was only created in 2.6.31, and was
fixed before 2.6.32, so the specific failure in PR10424 has a fairly
small window.
* buildrun.cxx (make_tracequery): Just take a single vector of headers.
* hash.cxx (find_tracequery_hash): Deal with multiple headers.
* tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto.
(tracepoint_builder::init_dw): Attempt all system headers together,
and if that fails, try again individually.
|
|
|
|
| |
* hash.cxx (find_script_hash): Add s.unprivileged.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are kernel modules that we generate for querying debuginfo, so
they need to use the same ARCH settings that we put in the main script
module.
* buildrun.cxx (make_tracequery, make_typequery_kmod): Add the arch and
kbuild flags to make_cmd.
* hash.cxx (find_stapconf_hash, find_tracequery_hash,
find_typequery_hash): The arch is in the base hash already, but add
the kbuild flags too.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the current monolithic tracepoint query module, a failure in any of
the discovered tracepoint headers means that you can't use any of the
others either. This patch creates a separate query module for each
header so they can pass or fail independently.
* buildrun.cxx (make_tracequery): take a single header name instead of
globbing for everything we can find.
* hash.cxx (find_tracequery_hash): name the header file we're hashing.
* tapsets.cxx (tracepoint_query::handle_query_func): make sure we don't
duplicate tracepoints found through different headers.
(tracepoint_builder::get_tracequery_module): get a header's module
(tracepoint_builder::init_dw): glob for all tracepoint headers, and
feed all their modules into dwflpp.
|
|
|
|
|
|
|
| |
The fact that a file _doesn't_ exist is significant, so adding such a
file to a computed hash should still influence the output.
* hash.cxx (hash::add_file): add bogus stat info for non-existent files
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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].
|
|
|
|
|
|
|
|
|
|
| |
* 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].
|
| |
|
|
|
|
|
|
|
|
| |
* NEWS: Note this change.
* hash.cxx (find_script_hash): Add s.skip_badvars into hash.
* translate.cxx (translate_pass): Emit STP_SKIP_BADVARS.
* runtime/loc2c-runtime.h (DEREF_FAULT, STORE_DEREF_FAULT): Provide
dummy implementation if STP_SKIP_BADVARS.
|
|
|
|
|
|
| |
It may be potentially expensive to fork-exec a git call to get the HEAD
revision, and it's not clear whether it's even needed. We can always
throw this back on if we find a meaningful usage scenario.
|
|
|
|
|
| |
To better support kernel developers who work out of a single source
tree, this adds the git HEAD revision to our caching hash.
|
|
|
|
|
|
|
|
|
|
| |
For kernel developers, it may be common practice to reuse the same
kernel build tree for several kernel variants. Our previous hashing
only considered the release version, architecture, and build path, which
may all remain constant for such a developer.
This change adds the file size and mtime of several kernel version files
to the hash, so it should be a bit more robust against collisions.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'origin/master':
PR5686: correct regression in semok/optimize.stp
trailing whitespace removal, as approved by emacs
fix global-var array index rendering
fix NEWS to refer to simpler context.stp tapset functions in auto-printing blurb
Document written but unread global variable automatic display.
2nd try
initial
Make _get_sock_addr return correct address in kernel before 2.6.16.
Automatically print written but unread globals
Make nodwf test passed when CONFIG_QUOTACTL unset
Uses STAPCONF_DPATH_PATH instead of a kernel version check.
Simplified "rpm" target a bit.
Moved tar archive creation step from "rpm" target to "dist-gzip" target.
remove support for "make dist" since git-archive does as well;
Examples html files moved into subdir.
2008-08-25 David Smith <dsmith@redhat.com>
ChangeLog Entries
Robustness improvements for the stap client/server
|
| |
| |
| |
| | |
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
GCC 4.3 compatibility patches from Debian.
* buildrun.cxx, hash.cxx, tapsets.cxx, translate.cxx: #include a few
more C++ headers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* hash.cxx (find_hash): Added two more options into the hash that
change the generated C file - '-M' (merge) and '-t' (benchmark
timing).
|
|
|
|
|
|
| |
* hash.cxx (find_hash): Fixed a caching bug. Bulk mode (relayfs)
status should be figured into the hash since it changes the
generated C code.
|
|
* 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.
|