| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tapset-procfs.cxx (procfs_derived_probe::procfs_derived_probe): Added
'maxsize_val' initialization.
(procfs_derived_probe::join_group): Updated '_stp_procfs_data'
definition and added STP_PROCFS_BUFSIZE.
(procfs_derived_probe_group::emit_module_decls): Emits structure to
contain procfs file buffers. Initializes '.bufsize' structure member.
(procfs_var_expanding_visitor::visit_target_symbol): Uses 'bufsize' for
maximum buffer size instead of using MAXSTRINGLEN.
(procfs_builder::build): Looks for '.maxsize(NNN)' parameter.
(register_tapset_procfs): Added '.maxsize(NNN)' parameter binding.
* runtime/procfs-probes.c (stap_procfs_probe): Converted 'buffer' to a
pointer and added 'bufsize' member.
* testsuite/semko/procfs13.stp: New testcase.
* testsuite/semko/procfs14.stp: Ditto.
* testsuite/semko/procfs15.stp: Ditto.
* testsuite/systemtap.base/procfs_maxsize.exp: Ditto.
* testsuite/systemtap.base/procfs.exp: Minor fix.
* stapprobes.3stap.in: Added '.maxsize(NNN)' documentation.
* stap.1.in: Added STP_PROCFS_BUFSIZE documentation.
|
|\ |
|
| |
| |
| |
| |
| | |
* configure.ac: Check for -lrpm with simple AC_CHECK_LIB.
* Makefile.am: Forget about @rpm_LIBS@
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unresolvable $variables
* staptree.cxx (target_symbol::chain): New function.
* staptree.h: Declare it.
* (*): Use it instead of hand-chaining to target_symbol->saved_conversion_error.
* tapset-mark.cxx (*::visit_target_symbol): Chain resolution error object,
do not throw.
* tapset-procfs.cxx (*::visit_target_symbol): Ditto.
* tapset-utrace.cxx (*::visit_target_symbol): Ditto.
* tapsets.cxx (*::visit_target_symbol): Ditto.
(*::visit_defined_op): Explain & enforce the above.
* testsuite/semok/thirtysix.stp: Expand.
* testsuite/systemtap.base/sdt_misc.exp: Bonus fix: make work with blddir != srcdir.
|
|
|
|
|
|
|
|
| |
We can compute results between two literals, we can reduce identity
elements, and reduce constants if the non-literal side has no side
effects.
* elaborate.cxx (const_folder::visit_binary_expression): Implement.
|
|
|
|
|
|
|
|
| |
The operand of a unary may be yet another unary. This is useful for
things like boolean normalization, !!x.
* parse.cxx (parser::parse_unary): Recurse the operand.
* testsuite/parseok/eleven.stp: Add chained unary operators.
|
|
|
|
|
|
|
|
|
| |
We can compute results between two literals, we can short-circuit some
literals on the left ("0&&x", "1||x"), and we can simplify literals on
the right if the left has no side effect ("x&&0", "x||1").
* elaborate.cxx (const_folder::visit_logical_or_expr): Implement.
(const_folder::visit_logical_and_expr): Implement.
|
|
|
|
|
|
|
|
|
|
| |
We can compute results between two literals, and we can also compute
comparisons to boundary numbers.
(We could also check boundary strings, "" and "\377\377...", but even
I am not THAT pedantic... yet...)
* elaborate.cxx (const_folder::visit_comparison): Implement.
|
|
|
|
|
|
| |
We can concat literal strings directly and discard empty strings.
* elaborate.cxx (const_folder::visit_concatenation): Implement.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 'master' of ssh://sources.redhat.com/git/systemtap:
PR10719 part 1: Partial constant folding
Simplify null_statement construction
Fixed PR 11269 by properly handling mmap syscall 'fd' argument.
Removed rvalue operator check.
PR 10690 (partial fix). Handle '.=' operator in procfs probes.
Conflicts:
tapsets.h
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This implements constant folding for if/for/foreach, unary expressions,
and ternary expressions. Binary expressions are TODO...
* elaborate.cxx (const_folder): New visitor to collapse constants.
(semantic_pass_const_fold): Drive everything through const_folder.
(semantic_pass_optimize1): Call it.
|
| |
| |
| |
| | |
It only needs a token*, so build that into the constructor.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* testsuite/systemtap.syscall/mmap.c (main): Added mprotect and mremap
testing (along with testing of anonymous maps).
* tapset/i386/syscalls.stp: In mmap probes, handle the fact that the
kernel gets an unsigned long 'fd', but the user-side passes a signed
int.
* tapset/i386/nd_syscalls.stp: Ditto.
* tapset/ia64/syscalls.stp: Ditto.
* tapset/powerpc/nd_syscalls.stp: Ditto.
* tapset/powerpc/syscalls.stp: Ditto.
* tapset/x86_64/nd_syscalls.stp: Ditto.
* tapset/x86_64/syscalls.stp: Ditto.
|
| |
| |
| |
| |
| | |
* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol):
Removed unneeded rvalue operator check.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* tapsets.h (var_expanding_visitor): Add 'valid_ops' and 'op' member
variables.
* tapsets.cxx (var_expanding_visitor::var_expanding_visitor): Set
'valid_ops' to '='. By default, var_expanding_visitor classes only
handle the '=' operator.
(var_expanding_visitor::visit_assignment): Remember what operator we're
handling. When an operator is found that isn't in the 'valid_ops' set,
error.
* tapset-procfs.cxx
(procfs_var_expanding_visitor::procfs_var_expanding_visitor): Add '.='
to the 'valid_ops' set.
(procfs_var_expanding_visitor::visit_target_symbol): Handle the '.='
operator when the target variable is an lvalue.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* staptree.h (defined_op): New class.
* all files: Extend all visitors as appropriate, mostly
dummy/pass-through implementation.
* parse.cxx (parse_target_symbol): New function, factored out
of parse_symbol().
(parse_define_op): New function.
* NEWS: Mention it.
* parse.h: Corresponding changes.
* tapsets.cxx (var_expanding_visitor::visit_defined_op):
Implement @defined() semantics.
(dwarf_var_expanding_visitor::visit_target_symbol): Adjust.
* tapset-utrace.c (visit_target_symbol_arg): Avoid crashes
on $argZZZ.
* tapsets.cxx (sdt_var_expanding_visitor): Ditto.
* semok/thirtysix.stp: New test.
|
| |
|
|
|
|
| |
* configure.ac: Don't bother with elfutils if $enable_translator = no.
|
|
|
|
|
|
|
|
|
|
|
| |
Later tests might trigger a cleanup and might set the global dir variable
leading to the syscall test.tcl trying to do an exec rm -rf on whatever
dir was set. So rename proc cleanup and global dir in syscall test.tcl to
something a bit less likely to clash.
* testsuite/systemtap.syscall/test.tcl: Rename proc cleanup to syscall_cleanup
and global dir to syscall_dir.
* testsuite/systemtap.syscall/test-debug.tcl: Likewise.
|
|
|
|
| |
* sdt_misc.exp: Make all semaphore references from the .so
|
|
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (hwbkpt_derivedc_probe_group): Lose max_... field.
Rename hwbkpt_probes_vector -> hwbkpt_probes.
(enroll): Instead set it here, emit normal suppressible warning if
exceeded.
(emit_*): Use newline(NN) etc. for proper indentation of generated code.
(emit_module_init): Defer most potential problems to
register_wide_hw_breakpoint() instead of preemptive errors.
* translate.cxx (emit_module_init): Assert 0 indentation more frequently.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* tapsets.cxx (hwbkpt_builder::build): Assert needed
kernel_configs here, instead of..
(register_standard_tapsets): ... here.
|
|
|
|
|
| |
* parse.cxx (lexer::scan): Glue adjacent strings together.
* testsuite/parseko/twentyseven.stp, semok/thirtyfive.stp: New tests.
|
|
|
|
|
| |
* main.cxx (main): exit() instead of printing usage for most errors.
Also support --help.
|
|
|
|
|
|
|
| |
* parse.cxx (eval_pp_conditional): If rhs and lhs are both CONFIG_...
identifiers try to convert them both to numbers or otherwise threat
them both as strings for eval_comparison.
* testsuite/semok/config_config.stp: New test.
|
|
|
|
|
|
| |
* parse.cxx (eval_pp_conditional): Handle r->type == tok_number when
l->type == tok_identifier.
* testsuite/semok/config_number.stp: New test.
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Server now generates a new certificate when old one expires.
- Certificates now valid for 1 year.
- ulimit for stap-server-connect now only set for stap-server
user and only when override variable is not set.
|
|
|
|
|
|
| |
The kernel has min/max/clamp macros to make range comparisons easier.
Clamp is a newer invention, but we can define it for older kernels in
terms of min and max.
|
|
|
|
|
|
|
|
| |
We were getting new hash collisions, because the new hash copy
constructor was restarting the md4 computation. Everything from
get_base_hash was thus lost.
* hash.h (hash::hash): Keep the md4 state when copying.
|
|
|
|
|
|
|
|
|
|
| |
Previously, our octal escapes used variable lengths, which can lead to
ambiguities. Also, 8-bit characters would only output the least digit.
* runtime/string.c (_stp_text_str): Always output 3-digit octal escapes,
and handle 8-bit chars more gracefully.
* testsuite/systemtap.string/text_str.stp: Include an 8-bit character.
* testsuite/systemtap.string/text_str.exp: Above + expect 3-digit octal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parallel install into lib-elfutils during the build seems to be fragile,
so explicitly install the libs with -j1.
* Makefile.am (stamp-elfutils): Add -j1 in for dir loop sub make.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* compile: Likewise.
* config.in: Likewise.
* configure: Likewise.
* doc/Makefile.in: Likewise.
* doc/SystemTap_Tapset_Reference/Makefile.in: Likewise.
* doc/beginners/Makefile.in: Likewise.
* grapher/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/aclocal.m4: Likewise.
* testsuite/configure: Likewise.
|
| |
|
|
|
|
| |
probe points.
|
|
|
|
| |
Also correct parsing of the --server option.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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().
|
| |
| |
| |
| |
| |
| |
| |
| | |
Since 2.6.33 sendfile can handle non-socket fds, so make the test
handle both success and failure.
* testsuite/systemtap.syscall/sendfile.c (main): Make buffer 22 bytes,
since 22 == EINVAL, test for 22 bytes send or -22 failure.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Test is simple, because print and sprint uses the same code for handling
@hist_* and it is not intended for playing with MAXSTRINGLEN, which is
required anyway for bigger histograms (the one generated here consists
of only 127 characters).
When PR10690 (need way to produce bigger procfs output) will be fixed,
then we should add another test for both PRs with normal histogram.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* testsuite/systemtap.syscall/test.tcl: Now uses global variable
'test_script' to find test script to run.
* testsuite/systemtap.syscall/syscall.exp: Sets test_script.
* testsuite/systemtap.syscall/nd_sys.stp: New test script. Copy of
sys.stp, but uses nd_syscall probes.
* testsuite/systemtap.syscall/nd_syscall.exp: New testcase. Copy of
syscall.exp, but uses nd_sys.stp test script.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some distributions might have backported the pipe fd leak patch and removed
the sys32_pipe kernel function even before 2.6.32. So make the probe alias
optional instead of relying on a version check.
* tapset/x86_64/syscalls.stp (syscall.pipe): Make alias optional.
(syscall.pipe.return): Likewise.
|