summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* PR10594: Provide a cached dwarf_getscopes_dieJosh Stone2009-09-103-20/+121
| | | | | | | | | | | | | | | This avoids repeated DIE traversal by caching all parents on the first call, so future calls are just a simple walk up parent links. * dwflpp.cxx (dwflpp::getscopes_die): New cached function that mimics libdw's dwarf_getscopes_die using cached parent links. (dwflpp::cache_die_parents): New function to build the parent cache. (dwflpp::~dwflpp): Clean up the parent caches. (dwflpp::iterate_over_labels): Use the cached getscopes_die. (dwflpp::find_variable_and_frame_base): Ditto. * tapsets.cxx (dwarf_derived_probe::saveargs): Ditto. (uprobe_derived_probe::saveargs): Ditto. (dwarf_var_expanding_visitor::visit_target_symbol_context): Ditto.
* Update marker probe information in Language Reference.Robb Romans2009-09-091-18/+38
| | | | Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
* Add pointer typecasting information to Language Reference.Robb Romans2009-09-091-1/+66
|
* Add error probe information.Robb Romans2009-09-091-8/+27
|
* PR10602 prime: runtime: shrink stack frame of _stp_do_relocation().Frank Ch. Eigler2009-09-091-1/+1
| | | | * transport/symbols.c (_stp_do_relocation): Make msg static.
* examples: regenerate index filesFrank Ch. Eigler2009-09-094-1/+50
|
* PR10602: improved fix for REG_IP lvalueFrank Ch. Eigler2009-09-092-48/+26
| | | | | | | | | * runtime/regs.h (SET_REG_IP): Define. (REG_IP_LVALUE): Undefine. * tapsets.cxx (*::emit_module_decls): Use SET_REG_IP() instead of old LVALUE? conditional. Written by jkenisto & jistone.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDavid Smith2009-09-091-2/+4
|\
| * Fix relay_old implementation of fsize_max and fnum_max.Masami Hiramatsu2009-09-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With old relayfs, out_fd is used only when non-bulk mode. However, open_oldoutfile and open_relayfs_files open files with fopen and set only percpu_tmpfile. This will cause a problem with -S option, that out_fd will be closed when the file size reaches fsize_max and new fd will be opened only on percpu_tmpfile. So, out_fd should be synchronized with percpu_tmpfile. * runtime/staprun/relay_old.c (open_oldoutfile): Set fd of output file to out_fd[cpu]. (open_relayfs_files): Ditto.
* | Removed unneeded casts.David Smith2009-09-091-5/+5
|/ | | | | | | * runtime/transport/ring_buffer.c (_stp_event_to_user): Removed unneeded cast. (_stp_data_write_reserve): Ditto. (_stp_data_write_commit): Ditto.
* PR10524: brag in NEWSFrank Ch. Eigler2009-09-091-0/+3
|
* PR10604: check availability for example test casesWenji Huang2009-09-089-10/+38
| | | | | | | | | | | | * testsuite/systemtap.examples/check.exp: Handle with test_support. * testsuite/systemtap.examples/io/iostat-scsi.meta: Add meta-tag test_support. * testsuite/systemtap.examples/memory/mmanonpage.meta: Ditto. * testsuite/systemtap.examples/memory/mmfilepage.meta: Ditto. * testsuite/systemtap.examples/memory/mmreclaim.meta: Ditto. * testsuite/systemtap.examples/memory/mmwriteback.meta: Ditto. * testsuite/systemtap.examples/network/autofs4.meta: Ditto. * testsuite/systemtap.examples/network/dropwatch.meta: Ditto. * testsuite/systemtap.examples/process/schedtimes.meta: Ditto.
* PR10617: make "make uninstall" workFrank Ch. Eigler2009-09-082-5/+3
| | | | | * Makefile.am (uninstall-local): Don't rm libexecdir but remove doc/exmaples. * Makefile.in: Regenerated.
* PR10524: reduce massive-uprobe script modules' .data consumptionFrank Ch. Eigler2009-09-085-127/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | The general approach is to rip out task_finder_tgt's from all over the place (including the unwindsym vmcbs, and the stap_uprobe_specs), and instead have a small handful of them: one for all unwindsyms, and one per abstract probed process (PID or NAME). These are in turn shared by all new stap_unwind_specs by index. Before: probe process("./stap").function("*") -rw-r--r--. 1 fche users 11775283 2009-09-08 20:26 /var/tmp/fche/systemtap/cache/96/stap_96c0479d674db55ec98d8a8750a790e7_7989596.ko text data bss dec hex filename 445158 8351944 4306472 13103574 c7f1d6 /var/tmp/fche/systemtap/cache/96/stap_96c0479d674db55ec98d8a8750a790e7_7989596.ko After: (Note how data shrank, though text gained a bit in const-init-data.) -rw-r--r--. 1 fche users 4021569 2009-09-08 20:27 /var/tmp/fche/systemtap/cache/e4/stap_e46e88634efd850b1586e81c231c239a_8058419.ko text data bss dec hex filename 1896511 2192 4324808 6223511 5ef697 /var/tmp/fche/systemtap/cache/e4/stap_e46e88634efd850b1586e81c231c239a_8058419.ko * tapsets.cxx (uprobe_derived_probe_group): Rewrite emit_module_decls, and adjust emit_module_init. * runtime/sym.c (_stp_sym_init): Initialize unwindsyms-shared vmcb. * runtime/sym.h (_stp_module): Remove *vmcb field. * translate.cxx (emit_module_init, dump_unwindsyms): Adapt. * translate.h (assert_0_indent): Flush output before possibly assert-failing.
* fix typo: KERN_ERROR -> KERN_ERR from last commitFrank Ch. Eigler2009-09-081-1/+1
|
* PR10575: emit KERN_ERRORs on transport control message failuresFrank Ch. Eigler2009-09-081-0/+3
| | | | | | | | Suspecting that some kernel->user control messages may be getting lost, let's more robustly log these occurrences. * runtime/transport/control.c (_stp_ctl_send): printk(KERN_ERROR) instead of ignoring errors.
* task_finder diagnostics: standardize on STP_DEBUG_PRINTKFrank Ch. Eigler2009-09-081-8/+0
| | | | * io.c (DEBUG_TASK_FINDER_PRINTK): Remove conditional.
* task_finder diagnostics: emit start_task_finder dbug message at end of fn.Frank Ch. Eigler2009-09-081-2/+1
| | | | | | * task_finder.c (stap_start_task_finder): Emit _stp_dbug message at end rather at beginning, so printed utrace-engine attach counts reflect status at end of initialization rather than at beginning.
* runtime diagnostics: remove ANSI goo, add -DSTAP_DEBUG_PRINTK option.Frank Ch. Eigler2009-09-081-1/+8
| | | | | | * runtime/io.c (_stp_vlog): Don't put ansi highlighting into debugging messages. #if STAP_DEBUG_PRINTK, direct all diagnostics to appropriate printk channel instead of runtime trace buffer.
* Test user markers set in a shared object.Stan Cox2009-09-081-3/+55
| | | | * sdt_misc: Add -shared section.
* documentation: tweak package description strings for -client / -server pkgsFrank Ch. Eigler2009-09-081-6/+7
|
* Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-09-082-8/+16
|\
| * Clean up iostat-scsi.stp and add to the regular testing.William Cohen2009-09-082-8/+16
| |
* | Warn if the pid specified by -x does not belong to an unprivileged user.Dave Brolley2009-09-081-1/+1
|/
* testsuite: reduce verbosity of (deprecated?) nodwf07.stp testFrank Ch. Eigler2009-09-081-1/+1
| | | | | * testsuite/semko/nodwf07.stp: Add >/dev/null at end, since stap -p2 for this script generates turbomucho text.
* HACKING: add brief git usage blurbFrank Ch. Eigler2009-09-081-0/+12
|
* testsuite: fix buildok test permissionsFrank Ch. Eigler2009-09-083-0/+0
|
* packaging: make -client and -system prereq zip & unzipFrank Ch. Eigler2009-09-081-0/+2
|
* PR4186 cont'd: Squash both EM_PPC and EM_PPC64 to powerpc.Mark Wielaard2009-09-081-4/+1
| | | | | * tapsets.cxx (validate_module_elf): Set expect_machine = "powerpc" for both EM_PPC and EM_PPC64 to match session architecture set in main.
* 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.