| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* buildrun.cxx (output_cpu_khz): Replace with generalized
output_exportconf().
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Sometimes you need multiple headers to fully describe a type, so we now
permit them to be listed together, e.g. "kernel<foo.h><bar.h>".
* buildrun.cxx (make_typequery): Split the input string into a vector.
(make_typequery_kmod, make_typequery_umod): Use the vector of headers.
* testsuite/semok/cast.stp: Add a multi-header case.
* stap.1.in, NEWS: Document it.
|
|
|
|
|
|
|
|
| |
building
* session.h (omit_werror): New flag.
* buildrun.cxx (compile_pass): Use it.
* main.cxx (main): Set it.
|
|
|
|
|
|
| |
* buildrun.cxx (output_cpu_khz): New function to check cpu_khz.
(compile_pass): Invoke function output_cpu_khz.
* runtime/time.c : Use STAPCONF_CPU_KHZ.
|
|
|
|
| |
* buildrun.cxx (compile_pass): Disable module signing goo.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
group owner of the uprobes buld directory to build uprobes.ko.
- When building uprobes.ko, make all generated files writable by the group
owner of the uprobes build directory.
- Don't change the group owner of the uprobes build directory during
'make install'
|
|
|
|
|
| |
Ensure uprobes install directory has group 'stap-server'.
Rename igid_in to in_group.
|
| |
|
|
|
|
|
| |
This is just a workaround for PR10821, and should be reverted when that
bug is fixed.
|
|
|
|
|
| |
* buildrun.cxx (compile_pass): Add the warning to limit the frame size
even lower than the Kbuild default (only works for gcc 4.4+).
|
|
|
|
|
| |
* buildrun.cxx (compile_pass): stat the Makefile, not just the build/
directory.
|
|
|
|
|
|
|
|
| |
The final module build uses -Werror, so tracequery should as well to
catch problems as early as possible. Some ext4 errors have crept in
again (PR10703).
* buildrun.cxx (make_tracequery): Add -Werror to EXTRA_CFLAGS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
* tapset/logging.stp (ftrace): New function.
(*): Add kerneldoc to other functions.
* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Process logging.stp.
* stapfuncs.3stap.in: Remove "LOGGING" section, now redundant.
* runtime/autoconf-trace-printk.c: New autoconf test.
* buildrun.cxx (compile_pass): Build it.
* NEWS: Mention it.
* testsuite/buildok/logging.stp: Test it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* buildrun.cxx (run_make_cmd): Add back >/dev/null for older kernels.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adapts to patches such as:
diff -urNp linux-2.6.29.6/include/linux/module.h linux-2.6.29.6/include/linux/module.h
--- linux-2.6.29.6/include/linux/module.h 2009-07-02 19:41:20.000000000 -0400
+++ linux-2.6.29.6/include/linux/module.h 2009-07-30 17:59:26.175602427 -0400
@@ -278,16 +278,16 @@ struct module
int (*init)(void);
/* If this is non-NULL, vfree after init() returns */
- void *module_init;
+ void *module_init_rx, *module_init_rw;
/* Here is the actual code + data, vfree'd on unload. */
- void *module_core;
+ void *module_core_rx, *module_core_rw;
/* Here are the sizes of the init and core sections */
- unsigned int init_size, core_size;
+ unsigned int init_size_rw, core_size_rw;
/* The size of the executable code in each section. */
- unsigned int init_text_size, core_text_size;
+ unsigned int init_size_rx, core_size_rx;
* runtime/autoconf-grsecurity.c: New test.
* buildrun.cxx: Try it.
* runtime/print.c: Use it.
|
|
|
|
|
|
|
| |
* util.cxx (stap_system): Take extra verbosity value. Standardize
error handling / tracing.
* util.h: Corresponding changes.
* buildrun.cxx, main.cxx, modsign.cxx: Update callers.
|
|
|
|
|
|
| |
... since a pass-4 compilation error is just as bad as pass-2 error.
* buildrun.cxx (run_make_cmd): Remove "2>&1".
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* runtime/itrace.c (usr_itrace_init): Changed prototype to take a
task_struct instead of a pid.
* tapset-itrace.cxx (emit_module_decls): Updated usr_itrace_init() call.
* runtime/autoconf-find-task-pid.c: Removed, since only user_itrace_init()
was using it.
* buildrun.cxx (compile_pass): Removed autoconf-find-task-pid.c test.
|
|\|
| |
| |
| |
| |
| | |
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].
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* buildrun.cxx (compile_pass): Checks for ring_buffer api change.
* runtime/autoconf-ring_buffer-flags.c: New file.
* runtime/transport/ring_buffer.c (tracing_wait_pipe): No longer
schedules, just returns. The timer function will handle it later.
(_stp_data_write_reserve): Handles ring_buffer api change. Added
overwrite processing. If we're full, delete an event to make room.
(_stp_data_write_commit): Handles ring_buffer api change.
(__stp_relay_wakeup_timer): New function.
(__stp_relay_timer_start): Ditto.
(__stp_relay_timer_stop): Ditto.
(_stp_transport_data_fs_start): Calls __stp_relay_timer_start().
(_stp_transport_data_fs_stop): Calls __stp_relay_timer_stop().
(_stp_transport_data_fs_overwrite): Sets overwrite flag.
|
|/
|
|
|
|
| |
Don't generate an error message for unsigned modules.
Make sure module signature exists before attempting to copy to the cache.
Allow timer p[robes for unprivileged users.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
* buildrun.cxx (run_make_cmd, kernel_built_uprobes,
copy_uprobes_symbols, run_pass, make_typequery_umod):
Print strerror after a failed stap_system() if verbose.
|
|/ |
|
|
|
|
|
|
|
| |
Some of the tracepoints are actually being called in inlines in the
common headers (e.g. trace_kmalloc), which is causing errors about
implicit function declarations. We don't care about ever running the
code in the tracequery module, so I'm just suppressing that error.
|
|
|
|
|
|
|
| |
At one point that macro was needed to get all of the tracepoints on the
tip tree, but now it's causing us to get duplicate stapprobe_X
definitions. AFAICS, we're now getting all tracepoints even without
MULTI_READ, so I'm pulling that workaround out.
|
| |
|
|
|
|
|
|
|
| |
The special syntax to generate a module for type information is now:
- "kernel<path/to/header.h>" to use the kernel's build environment
- "<path/to/header.h>" to use no special build environment, and so use
gcc's default parameters only (for user mode).
|
| |
|
|
|
|
|
|
|
| |
Kernel modules will actually build just fine with none of the module
boilerplate code. We don't care about ever actually loading the
tracequery module that we make, so don't bother emitting code we don't
need.
|
|
|
|
|
|
|
|
| |
- Define TRACE_HEADER_MULTI_READ to allow re-pulling headers that were
already included indirectly elsewhere.
- Some tracepoint headers were moved down to include/trace/events/,
so add that to our glob paths.
- Add ftrace.h as a header that we should never include.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-04-09 David Smith <dsmith@redhat.com>
* buildrun.cxx (compile_pass): Compile autoconf test for
<asm/syscall.h>.
* runtime/autoconf-asm-syscall.c: New "autoconf" test the presence
of <asm/syscall.h>.
* runtime/syscall.h: If <asm/syscall.h> exists, use it.
Otherwise, use our private copy of the functions for each
architecture.
(syscall_get_nr): Renamed from __stp_user_syscall_nr().
(syscall_get_return_value): Renamed from
__stp_user_syscall_return_value().
(syscall_get_arguments): Renamed from __stp_user_syscall_arg().
* runtime/task_finder.c
(__stp_utrace_task_finder_target_syscall_exit): Uses new syscall.h
functions.
* tapset/utrace.stp: Ditto.
|
|
|
|
|
|
|
|
| |
Our module builds always have a 0% ccache hit rate, because the compiler
commands always include the randomized tmpdir. Thus, I'm setting
CCACHE_DISABLE=1 so ccache never saves these one-use objects.
(Besides, we already have our own caching in place for this stuff...)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We hereby no longer try to manipulate process groups in any way. We
don't set a private process group, and we never kill() our entire group
either. Instead of using system(), we now have a stap_system() which
saves the child PID, so when we get a terminating signal we can pass it
along to the child.
Signals sent through the TTY have always worked, since the TTY sends it
to the entire pgrp. However, if we're running as part of a wrapper
script or GUI, which may not have a separate process group for stap, we
still would like to allow "kill -TERM $STAPPID" to terminate stap
nicely.
There's still a short window of failure in the time that staprun is
active, because we can't kill a setuid process from a user process.
Once staprun drops privileges and execs to stapio though, everything
should work fine.
|
|
|
|
|
|
|
|
|
| |
* buildrun.cxx (compile_pass): Add autoconf-x86-gs.c.
* tapset/i686/registers.stp (_stp_register_regs): Update offsets.
(test_x86_gs): Auxiliary function.
* runtime/autoconf-x86-gs.c : New file.
* testsuite/systemtap.base/x86_gs.exp : New test case.
* testsuite/systemtap.base/x86_gs.stp : Ditto.
|