| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
When we start seeing tapsets provided by third parties, any errors in
their files should not be fatal to us. Since we don't really know which
tapsets are our own, this leniency applies to all.
* main.cxx (main): Warn on tapset errors, but continue unless -W.
* testsuite/parseko/bad_tapset/foo.stp: New bogus tapset.
* testsuite/parseko/bad_tapset.stp: Check that "-W -I bad_tapset" fails.
* testsuite/parseok/bad_tapset.stp: Check that "-I bad_tapset" succeeds.
* testsuite/parseok/all_tapsets.stp: Check -W with the default tapsets.
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SDT and label probes are not really final probe types themselves, but
rather they get translated into some other final type. This patch
preserves this relationship as if SDT and label probes were dynamically
generated aliases.
* elaborate.cxx (probe::create_alias): New, fake an alias_derived_probe.
* tapsets.cxx (query_label): Append the label name as an alias.
(sdt_query::handle_query_module): Let convert_location do the alias.
(sdt_query::convert_location): Translate the location using an alias.
* main.cxx (printscript): Elaborate the derivation debug dump.
|
|
|
|
|
| |
Inspired by the Python equivalents, these new utility functions just
make it a little cleaner to match at the beginning or end of a string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* main.cxx (main): Reorganize the end of pass-2 a bit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
their installation of kernel devel
|
|
|
|
|
|
|
|
| |
* session.h
* NEWS: Discuss it.
* main.cxx: Parse it.
* session.h (num_errors): Provide it.
* semok/fortyeight.stp, semok/thirtyseven.stp: Test it.
|
|
|
|
|
| |
* main.cxx (main): exit() instead of printing usage for most errors.
Also support --help.
|
|
|
|
|
|
|
| |
Change regexp match to "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$".
* main.cxx (main): case 'D' allow optional single minus sign after equal
in assert_regexp_match().
|
| |
|
|
|
|
|
|
|
| |
* util.h, util.cxx (assert_match_regexp): New function.
* main.cxx (main): Constrain -R, -r, -a, -D, -S, -q, -B flags.
* stap-serverd (listen): Harden stap-server-connect with ulimit/loop.
* testsuite/systemtap.server/{client,server}_args.exp: Revised.
|
|
|
|
|
|
|
|
| |
building
* session.h (omit_werror): New flag.
* buildrun.cxx (compile_pass): Use it.
* main.cxx (main): Set it.
|
|
|
|
|
|
| |
Switch to list<string> from set<string> for collecting
available $var lists. Use O(N**2) list-uniqueifier
that preserves initial ordering.
|
|
|
|
|
|
|
|
|
|
|
| |
* main.cxx (main): Always downgrade client-provided -p5 to -p4.
* stap-client (unpack_response): Sanitize stdout due to same.
* stap-server-connect.c: Eliminate a bunch of globals.
(handle_connection): Make things locals instead. Base tmp files
on $TMPDIR.
(spawn_and_wait): New helper function.
(handleRequest): New monster function to inline rest of old
stap-server-request.
|
|
|
|
|
| |
* main.cxx (getmemusage): On rawhide systems, 'getpagesize()' has been
deprecated. Substitute 'sysconf(_SC_PAGESIZE)'.
|
|
|
|
| |
* main.cxx (checkOptions): Inline into main(), abeam other option checks.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using relative (non-canonical) paths for user modules one would get
a confusing WARNING: missing unwind/symbol data for module 'bin/test'.
Also unless the path started with '/' the task_finder wouldn't start.
By checking that the given file can be made absolute (canonicalized)
both issues are resolved and the user module will be correctly identified
at both translation and runtime.
* main.cxx (main): case 'd' try canonicalize_file_name() the argument
first to identify user modules.
|
|
|
|
|
|
|
| |
* elaborate.h: Remove printargs and add getargs.
* tapset-mark.cxx (mark_derived_probe): Ditto.
* tapsets.cxx (dwarf_derived_probe,tracepoint_derived_probe): Ditto.
* main.cxx (printscript): Make intersection before printing.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
Makes it easier to see which probe queries use lots of memory.
* main.cxx (getmemusage): New function.
(main): Use new function printing passes in verbose mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every single copy_file call we had was converting strings to char*,
printing the same error message, and optionally printing the same
verbose string. Let's canonicalize that.
* util.cxx (copy_file): Take string filenames, add a verbose flag, and
consolidate the message printing.
* cache.cxx (add_to_cache): Pass strings and remove message printing.
(get_from_cache): Ditto.
* main.cxx (main): Ditto.
* tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto.
(dwarf_cast_expanding_visitor::filter_special_modules): Ditto.
|
|
|
|
| |
Gneral work on options in the client and server.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* modsign.cxx (init_cert_db_path): Use 'system' call.
(sign_module): Renamed to 'main'. This is now an independant program.
Check for arguments. Return 1 on error.
* buildrun.cxx (modsign.h): Don't #include it.
(compile_pass): Don't sign the module.
* main.cxx (main): Don't copy the module signature.
* cache.cxx (add_to_cache): Don't cache the module signature.
* Makefile.am (bin_PROGRAMS): Add stap-sign-module.
(stap_SOURCES): Remove modsign.cxx and nsscommon.c.
(stap_sign_module_SOURCES): New variable.
(stap_sign_module_CPPFLAGS): New variable.
(stap_sign_module_LDFLAGS): New variable.
(stap_sign_module_LDADD): New variable.
* stap-server (initialization): Initialize unprivileged.
(parse_options): Handle --unprivileged.
(create_response): Call stap-sign-module if --unprivileged was
specified.
* systemtap.spec: Add stap-sign-module to stap-server.
* Makefile.in: Regenerated.
* doc/Makefile.in: Regenerated.
* doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated.
* grapher/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* testsuite/aclocal.m4: Likewise.
* configure: Likewise.
* testsuite/configure: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We always use lex_cast either to string or from string, so I made that
explicit, and got rid of some string copies in the process. There was
also stringify(), which was redundant to lex_cast<string>.
We also always used lex_cast_hex to string, so that's now hard-coded and
again eliminated a string copy.
For lex_cast_qstring<string>, there's no need to write the streamify the
input, so a specialization now operates directly on the input.
Hopefully this is a bit cleaner, and I do measure it to be a little
faster on scripts with many probes.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* main.cxx (main): Perform equivalent sed by hand on uname()->machine.
* stap.1.in: Clarify -a ARCH slightly.
* tapsets.cxx (validate_module_elf): Accept "arm*"for EM_ARM.
* tapset/**, testsuite/**: Removed/collapsed "i386"/"i686" branches,
renamed "ppc64"->"powerpc" and "s390x"->"s390".
|
|
|
|
|
| |
* main.cxx (main): Initialize s.architecture to value as if
from `uname -i`. Specifically, squash i?86 -> i386.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
... otherwise the new stuff can get cleaned before use.
* cache.cxx (add_to_cache): Do clean_cache() first, not last.
|
|
|
|
|
|
|
| |
* util.cxx (stap_system): Take extra verbosity value. Standardize
error handling / tracing.
* util.h: Corresponding changes.
* buildrun.cxx, main.cxx, modsign.cxx: Update callers.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* main.cxx (main): For "-d /path" arguments, enable task finder.
* runtime/sym.h (_stp_module): Add *vmcb member.
* task_finder{.cxx,.h} (emit_vma_callback_probe_decl): Zap.
* tapset-itrace.cxx, tapset-utrace.cxx: Use unwindsyms_modules
instead.
* tapsets.cxx (uprobe::emit_module_decls): Ditto.
* translate.cxx (emit_module_init): Emit task finder registrations
for vmcb's associated with _stp_modules.
(dump_unwindsyms): Associate vmcbs with user-space unwindsyms entries.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
cache.cxx
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* cache.cxx (add_to_cache,clean_cache): add static markers
* main.cxx (main): likewise
* runtime/staprun/common.c (send_request): likewise
* runtime/staprun/mainloop.c (stp_main_loop): likewise
* runtime/staprun/staprun.c (remove_module): likewise
* runtime/staprun/staprun.h: include sdt.h
* runtime/staprun/staprun_funcs.c (insert_module): likewise
* util.cxx (stap_system): likewise
* tapset/stap_staticmarkers.stp: new file
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
main.cxx
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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].
|
| |
| |
| |
| |
| |
| |
| | |
* main.cxx (main): Default gcc_flags to kernel opt-level (empty).
* buildrun.cxx (compile_pass): Add -freorder-blocks back, document choices.
* stap.1.in: Document new default opt-level.
* testsuite/systemtap.base/cache.exp: Adjust for new caching results.
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
main.cxx
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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].
|
| | |
|
| | |
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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".
|