summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* packaging: make -testsuite prereq /usr/bin/whichFrank Ch. Eigler2009-09-071-1/+1
|
* bz10475.exp: Use filp_open which has a constant const char argument for test.Mark Wielaard2009-09-071-4/+3
| | | | | | | | | For some reason the do_filp_open const char *pathname argument has changed its name between different kernel versions. Luckily filp_open has a cont char *filename argument that is constant between versions (the test needs a const char* argument to do an array operation on). * testsuite/semok/bz10475.stp: Use filp_open instead of do_filp_open.
* PR10613 sys32_ustat is renamed compat_sys_ustat in 2.6.30 kernel.Mark Wielaard2009-09-072-2/+25
| | | | | | | | | | Note that the new compat_sys_ustat is asmlinkage and has a differently named argument for the user struct. * tapset/syscalls2.stp (syscall.ustat32): Add compat_sys_ustat variant. (syscall.ustat.return): Likewise. * tapset/nd_syscalls2.stp (nd_syscall.ustat32): Likewise. (nd_syscall.ustat.return): Likewise.
* Fix build-id check for relocatable kernelEugeniy Meshcheryakov2009-09-072-3/+5
| | | | | | Save offset of build id relative to _stext instead of absolute address for kernel and apply relocations at run-time. This fixes Debian bug #545277 (http://bugs.debian.org/545277).
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-09-041-0/+1
|\
| * Get tcpdumplike.stp tested on "make check"William Cohen2009-09-041-0/+1
| |
* | rc = 0 should be return 0 for database not ownder by root.Dave Brolley2009-09-041-1/+1
| |
* | Check for bad address range or size in lookup_bad_addr.Dave Brolley2009-09-041-0/+4
|/
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-09-0317-185/+271
|\
| * Add --unprivileged to the module hashJosh Stone2009-09-031-0/+1
| | | | | | | | * hash.cxx (find_script_hash): Add s.unprivileged.
| * Merge branch 'master' of sourceware.org:/git/systemtapJosh Stone2009-09-039-57/+97
| |\
| * | Escape literal '.'s in regular expressionsJosh Stone2009-09-031-7/+7
| | | | | | | | | | | | * dwflpp.cxx (dwflpp::build_blacklist): Escape '.'s in filenames.
| * | Use a regexp for matching blacklist sectionsJosh Stone2009-09-032-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | We already use regexp for function/file blacklisting, so this just makes the section blacklisting consistent with the rest. * dwflpp.cxx (dwflpp::blacklisted_p): Use regexec instead of section==. (dwflpp::build_blacklist): Build blacklist_section too.
| * | Fetch the blacklist section only when neededJosh Stone2009-09-033-21/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only check blacklisting on kernel probes, so it's a waste to dig up the section name otherwise. * dwflpp.cxx (dwflpp::blacklisted_p): Lookup the section directly. (relocate_address::relocate_address): Don't do blacklisting here. * tapsets.cxx (dwarf_query::add_probe_point): Don't carry the blacklist section directly anymore.
| * | PR10573: Squash duplicate inline instancesJosh Stone2009-09-032-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C++, identical functions included in multiple CUs will get merged at link time into a single instance. We need to make sure that inlines within those merged functions are not probed multiple times. * tapsets.cxx (inline_instance_info::operator<): Used for set support. (dwarf_query::handle_query_module): Clear inline_dupes on each module. (query_dwarf_inline_instance): Squash this inline instance if it's already in the inline_dupes set.
| * | PR10572: Allow duplicate function names in a CUJosh Stone2009-09-023-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't assume that a given function name will only appear once in a CU. In C++, two functions may have the same name in different classes or namespaces, or even in the same scope with overloaded parameters. Even in C, the compiler may generate multiple copies of a single function with different optimizations. We now use a multimap for function names, so we shouldn't miss any. * dwflpp.h (cu_type_cache_t, mod_cu_type_cache_t): New typedef to keep a normal map for the global_alias_cache. (cu_function_cache_t): Use a multimap for function names. * dwflpp.cxx (dwflpp::iterate_over_functions): Walk over the range of exactly-matching functions. * tapsets.cxx (query_dwarf_func): Don't abort after seeing an exact match -- there could be more to come.
| * | Delete stuff that dwflpp newedJosh Stone2009-09-021-0/+17
| | | | | | | | | | | | * dwflpp.cxx (dwflpp::~dwflpp): Delete all of the caches.
| * | Provide backward-compatible unordered_map/setJosh Stone2009-09-022-20/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were defining our own stap_map with a ::type to let us use typedefs to use the new unordered_map if available, or hash_map otherwise. Since unordered_map is the future direction, I'm changing our code to use that directly. The backward-compatible version is a #define to hash_map, which has a compatible interface. While I'm at it, let's also define unordered_multimap, unordered_set, and unordered_multiset. * unordered.h: New. * dwflpp.h (stap_map): Removed. (cache typedefs): Use the unordered name now.
| * | Unify lex_cast* and avoid string copiesJosh Stone2009-09-0214-105/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Use task_euid when STAPCONF_TASK_UID is not defined.Dave Brolley2009-09-031-3/+17
| |/ |/|
* | Disallow kernel space memory access when unprivileged.Dave Brolley2009-09-032-24/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-09-03 Dave Brolley <brolley@redhat.com> * runtime/addr-map.c (lookup_addr_aux): Now takes size argument. Consider the size when looking for overlapping range with the map entries. (lookup_bad_addr): Now takes size argument. Disallow kernel space access when STP_PRIVILEGED is not defined. Pass size to lookup_addr_aux. <asm/processor.h>: #include it when STP_PRIVILEGED is not defined. (add_bad_addr_entry): Supply a size of 1 to calls to lookup_addr_aux. * runtime/loc2c-runtime.h (kread): Pass sizeof (*(ptr)) to lookup_bad_addr. (kwrite): Likewise. (deref): Pass size to lookup_bad_addr. (store_deref): Likewise.
* | Allow process begin/end probes for unprivileged users.Dave Brolley2009-09-036-22/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-09-03 Dave Brolley <brolley@redhat.com> * tapsets.cxx (visit_cast_op): Don't disallow unprivileged users. Annotate synthesized function with /* unprivileged */. * tapset-utrace.cxx (register_tapset_utrace): Call allow_unprivileged for process begin and end probes. * translate.cxx (translate_pass): Generate '#define STP_PRIVILEGED 1' unless --unprivileged was specified. * runtime/transport/transport.c: Don't define _stp_unprivileged_user. * runtime/task_finder.c (__stp_utrace_attach_match_filename): Check that _stp_uid equals the task euid when STP_PRIVILEGED is not defined. (stap_start_task_finder): Likewise. * runtime/staprun/staprun.c (insert_stap_module): Don't generate module option _stp_unprivileged_user.
* | PR10589 followup. More tapsets.cxx _stp_warn formatting fixlets.Mark Wielaard2009-09-031-4/+4
| | | | | | | | | | | | | | | | struct kretprobe nmissed an int, but struct kprobe nmissed an unsigned long. * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): Adjust _stp_warn format string for kprobe nmissed argument. (kprobe_derived_probe_group::emit_module_init): Likewise.
* | PR10552 followup, remove -M testcases.Mark Wielaard2009-09-031-5/+0
| | | | | | | | * testsuite/systemtap.base/cache.exp: Remove MERGE1 and MERGE2 (-M) tests.
* | PR10589 followup. tapsets.cxx _stp_warn formatting fixlets.Mark Wielaard2009-09-031-2/+2
|/ | | | | | * tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Cast _stp_warn arguments. (kprobe_derived_probe_group::emit_module_init): Likewise.
* Return, don't exit mysql.exp when unsupported.Mark Wielaard2009-09-021-1/+1
|
* PR10589: switch to kernel vscnprintf for _stp_{dbug,warn,error} calls in runtimeFrank Ch. Eigler2009-09-025-21/+24
| | | | | | | | | | | _stp_vscnprintf is only suitable for calls from the script, with slightly different conventions (64-bit ints/pointers, extra formatting directives). * runtime/runtime.h (_stp_{dbug,warn,error}): Add __attribute__ format(printf). * runtime/io.c (_stp_vlog): Ditto. Use vscnprintf(). * runtime/sym.c (_stp_module_check): Remove hexdumping (%.*M) of mismatching buildids. Switch to _stp_warn from printk (KERN_WARNING). * translate.cxx, runtime/unwind.c: Numerous print formatting tweaks.
* Add mysql.exp to test dtrace like support for mysql.Stan Cox2009-09-012-1/+345
| | | | * testsuite/systemtap.base/mysql.exp: New.
* PR10552: Removed references to the merge ('-M') option.David Smith2009-09-017-33/+3
| | | | | | | | | | | * 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.
* PR10581: Use ARCH for tracepoints and kernel typequeriesJosh Stone2009-09-012-1/+29
| | | | | | | | | | | | 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.
* Provide accurate error message for failed utrace probeWenji Huang2009-08-311-0/+2
| | | | * tapset-utrace.cxx(emit_module_init): Set probe_point.
* Use a header-cast in nd_syscall.sigaltstackJosh Stone2009-08-311-1/+2
| | | | | | | | | The nd_syscalls tapset is meant to run with no debuginfo, so using a @cast into a module type defeats the purpose. We should use a @cast with a header name instead, so debuginfo is generated. * tapset/i386/nd_syscalls.stp (nd_syscall.sigaltstack): Get the pt_regs type definition from "kernel<asm/ptrace.h>".
* Add virtual memory subsystem tracepoint examples.William Cohen2009-08-3112-0/+437
|
* Mirror the sys_sigaltstack fix in nd_syscallsJosh Stone2009-08-311-2/+2
| | | | | | | The argument fix in commit 77c26b4 needs to be made in nd_syscalls too, where the conditional kernel should be 2.6.30 instead of 2.6.29. * tapset/i386/nd_syscalls.stp (nd_syscall.sigaltstack): Check 2.6.30.
* Fix sys_sigaltstack ussp conditional.Mark Wielaard2009-08-291-1/+1
| | | | | | | | For i386 sys_sigaltstack changed argument params starting with kernel commit b12bda which was only included in 2.6.30, not in any 2.6.29 kernel. * tapset/i386/syscalls.stp (sys_sigaltstack): ussp conditional should be kernel_v < "2.6.30" for param change (from bx to regs).
* Tighten kernel.function alias_tapset.exp expect regexp to match precisely.Mark Wielaard2009-08-291-1/+1
|
* Fix overlapping statement probe error in warnings.stp.Mark Wielaard2009-08-291-1/+1
| | | | | | | | | | | | | Instead of generating a warning the current kernel.statement probe produced a warning on some 386 kernels that had optimized that particular line: semantic error: multiple addresses for fs/bio.c:282 (try fs/bio.c:278 or fs/bio.c:284) semantic error: no match while resolving probe point kernel.statement("bio_init@fs/bio.c+3") So do as told to just get the expected warnings for this probe. * testsuite/systemtap.base/warnings.stp (probea): Probe bio_init@fs/bio.c+5.
* Tighten alias_tapset.exp expect regexp to not gobble up multiple lines.Mark Wielaard2009-08-291-4/+4
|
* Cache inline instance lookupsJosh Stone2009-08-282-12/+52
| | | | | | | | | | | | | | | | | | | | We used to call dwarf_func_inline_instances to get the locations where inlines are used. This function has to iterate through nearly all DIEs to find instances, which is a lot of redundant work when we're probing multiple inline functions. Now we have our own dwarf iterator to cache all inline instances back to their origin. This only needs to be called once for each CU, and all further inlines are just a map lookup. Some quick benchmarks: stap -l Before After kernel.function("*") 25010ms 2110ms module("*").function("*") 86550ms 16920ms process("stap").function("*") 41330ms 580ms * dwflpp.cxx (dwflpp::cu_inl_function_caching_callback): Removed. (dwflpp::cache_inline_instances): New caching iterator. (dwflpp::iterate_over_inline_instances): Cache each CU once.
* Have dtrace use [wd] as the default dir when -o isn't given.Stan Cox2009-08-282-5/+5
| | | | | * dtrace.in: Generate the output file from basename of input filename. * dtrace.exp: Adjust the tests accordingly.
* stap-client will now always choose a compatible server even for phases 1-3.Dave Brolley2009-08-282-9/+8
| | | | Always start a local server needed by the test suite (make {install}check).
* Added test for pr10568.David Smith2009-08-283-0/+43
| | | | | | * testsuite/systemtap.base/alias_tapset.exp: New file. * testsuite/systemtap.base/alias_tapset.stp: Ditto. * testsuite/systemtap.base/alias_tapset/tapset_test.stp: Ditto.
* Add a NEWS blurb for || and && in the preprocessorJosh Stone2009-08-281-0/+3
|
* Use || and && in preprocessor's conditions in tapsets.Przemyslaw Pawelczyk2009-08-281-13/+3
| | | | Signed-off-by: Josh Stone <jistone@redhat.com>
* Support || and && in preprocessor's conditions.Przemyslaw Pawelczyk2009-08-285-17/+54
| | | | | | | | | | * parse.cxx (parser::scan_pp): Add || and &&. * stap.1.in: Document || and && in PREPROCESSING. * testsuite/parseok/twenty.stp: Test case. * testsuite/parseko/preprocess14.stp: Ditto. * testsuite/parseko/preprocess15.stp: Ditto. Signed-off-by: Josh Stone <jistone@redhat.com>
* Cross check stap_compile.exp stap run result with error messages seen.Mark Wielaard2009-08-281-1/+14
|
* Tighten stap_compile.exp regexp to not accidentially gobble up extra lines.Mark Wielaard2009-08-281-1/+1
|
* PR10568: Ensure that aliases pull in their tapsetJosh Stone2009-08-275-0/+48
| | | | | | | | | | | When a probe alias is resolved in a tapset, the contents of that tapset should be included in the compiled script, just as we do for global variables and functions. * elaborate.cxx (alias_expansion_builder::build): When an alias is instantiated, add its stapfile to the session files. * testsuite/systemtap.base/tapset_includes.exp: New test. * testsuite/systemtap.base/tapset/*.stp: Testing tapsets for above.
* xfail backtrace.exp as PR6961 backtrace from non-pt_regs probe contextMark Wielaard2009-08-271-0/+4
|
* Return, don't exit postgres.exp when unsupported.Mark Wielaard2009-08-271-1/+1
|