summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve some runtime struct layoutsJosh Stone2009-10-193-4/+4
| | | | | | | | | | | | | | Guided by pahole, I've shaved off a few padding bytes here and there. New sizes on x86_64: stap_task_finder_target 192 -> 184 stap_itrace_probe 216 -> 208 stap_utrace_probe 328 -> 312 stap_uprobe_tf 200 -> 192 stap_uprobe_spec 48 -> 40 I only changed field layouts, not types or names, so this should be perfectly safe. (FLW)
* bemoan that _stp_*printf can't be protected with gcc attribute printfFrank Ch. Eigler2009-10-191-1/+5
|
* fix 32-bit compatibility for @hist_log printingWenji Huang2009-10-191-1/+1
| | | | | * stat-common.c (_stp_stat_print_histogram_buf): Fix HIST_PRINTF parameter passing.
* PR10799: warn on possibly uintended local-vs-global namespace collisionFrank Ch. Eigler2009-10-195-12/+35
| | | | | | | | | * elaborate.cxx (find_var): Take extra token parameter. Look for cross-file global variable resolution, signal a warning. * testsuite/systemtap.examples/io/traceio2.stp: Fix it. * testsuite/systemtap.syscall/sys.stp: Fix it. * NEWS: Document it.
* provide error message token/context if loc2c doesn'tFrank Ch. Eigler2009-10-191-0/+1
| | | | | * tapsets.cxx (visit_target_symbol): When catching semantic_error, fill in token value if unset. Can happen for loc2c DIE() msgs.
* Avoid lockdep warnings.Srikar Dronamraju2009-10-192-14/+34
| | | | | | | | | | | | | | | | | | | | uprobe_fork_uproc() runs with parent_uproc->rwsem locked. However uprobe_mk_process() that gets called within uprobe_fork_uproc() also locks child_uproc->rwsem after initializing it. Lockdep report confuses this to acquiring a lock that already has been acquired and suggests using sub-classes. The alternatives we have are: 1. use classes level to distinguish different uproc structures. 2. unlock parent_uproc->rwsem before we call uprobe_fork_uproc(). 3. dont try locking child_uproc->rwsem; since we are protected by uproc_mutex as well as parent_uproc->rwsem; We use the last approach. Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> ---
* PR10331: build fix for older nss reduxFrank Ch. Eigler2009-10-161-3/+2
| | | | | | | | Reported by Wenji, these SEC_* symbols were enums rather than macros, so instead of individual #ifdefs ... * stapsslerr.h: use NSS_{VMAJOR/VMINOR/VPATCH} to detect 3.12.4 or later for the two recent error symbols.
* Fix transok/tval-opt.stp testcase. Pick diffent function and non-empty block.Mark Wielaard2009-10-151-1/+2
| | | | | | | | | | | | This testcase succeeded just because the value being set couldn't be found. So the error message being compared was the same. Set -o pipefail to catch that case. On vta compiled kernels it failed because the optimizer turned { statement } into statement. So pick a function and argument which location can always be found and add an extra 'next' statement so the block isn't folded. * testsuite/transok/tval-opt.stp: Set -o pipefail. Add 'next' to make sure block isn't empty. Use "do_filp_open" and "mode".
* Updated checking for grapher dependencies.David Smith2009-10-158-269/+588
| | | | | | | | | | | | * configure.ac: Made sure nss includes will error even if only 1 header isn't usable. Added grapher dependencies gtkmm and boost headers. * Makefile.in: Regenerated. * config.in: Ditto. * configure: Ditto. * doc/Makefile.in: Ditto. * doc/SystemTap_Tapset_Reference/Makefile.in: Ditto. * grapher/Makefile.am: Use libglade CFLAGS/LIBS. * grapher/Makefile.in: Regenerated.
* PR10331: build fix for older nssFrank Ch. Eigler2009-10-151-0/+4
| | | | | | | * stapsslerr.h: #ifdef-conditionalize a few of the error codes, apparently defined some time after NSS 3.12.2. Reported-By: Wenji Huang <wenji.huang@oracle.com>
* Add boost-devel build requirement for the grapher.David Smith2009-10-151-0/+5
|
* Fix $$targets in dwarf probesJosh Stone2009-10-141-1/+1
| | | | | | My print_format refactoring in d5e178c1 missed an improperly-named token, an sprint that should be sprintf. Since the token value is now significant, that name needs to be correct.
* PR10331: more ssl error textFrank Ch. Eigler2009-10-141-0/+42
| | | | | | * stapsslerr.h: Added a few blurbs from mozilla sources. Added mozilla copyright/license header block, which lets us use this under GPLv2.
* PR10331: improve nss error message handlingFrank Ch. Eigler2009-10-146-72/+331
| | | | | | | | | * stapsslerr.h: New file containing NSS* error number to string mappings. Originally from mozilla NSS documentation, also seen in other GPLv2 software. * nsscommon.c (nssError): Print error number, and text from <stapsslerr.h>. * stap-{client,server}-connect.c (errWarn): Standardize on nssError(). * Makefile.am (nss binaries): Also link in nsscommon.c.
* Report experssion stack slot use back from loc2c.Roland McGrath2009-10-144-9/+23
|
* check for module-building Makefile more clearlyFrank Ch. Eigler2009-10-141-6/+5
| | | | | * buildrun.cxx (compile_pass): stat the Makefile, not just the build/ directory.
* Merge branch 'master' of ssh://sourceware.org/git/systemtapTim Moore2009-10-141-0/+2
|\
| * Add DTRACE_PROBE10.Mark Wielaard2009-10-141-0/+2
| | | | | | | | | | | | We already had STAP_PROBE10, but not DTRACE_PROBE10 yet. * includes/sys/sdt.h: Declare DTRACE_PROBE10 as STAP_PROBE10.
* | cleanup of graph data parser, using Boost functions where usefulTim Moore2009-10-143-36/+34
|/ | | | | | * grapher/StapParser.cxx (commaSplit): Use Boost string split function (findTaggedValue): Return bool instead of position (ioCallback): Avoid using hard-coded string lengths
* Merge branch 'master' of ssh://wenji@sources.redhat.com/git/systemtapWenji Huang2009-10-1411-164/+138
|\
| * Merge branch 'master' of sourceware.org:/git/systemtapJosh Stone2009-10-133-19/+18
| |\
| * | Consolidate print_format creationJosh Stone2009-10-137-98/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We almost had a factory in print_format::parse_print, so let's take that the rest of the way. This way we don't have so much duplication in initializing the print flags. * staptree.cxx (print_format::parse_print): Replaced with... (print_format::create): New factory to parse and create print_formats. * elaborate.cxx (add_global_var_display): Use this factory. * parse.cxx (parser::parse_symbol): Ditto. * tapset-mark.cxx (mark_var_expanding_visitor::visit_target_symbol_context): Ditto. * tapset-utrace.cxx (utrace_var_expanding_visitor::visit_target_symbol_arg): Ditto. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_context): Ditto. (tracepoint_var_expanding_visitor::visit_target_symbol_context) Ditto.
| * | Refactor some of the histogram printingJosh Stone2009-10-131-56/+29
| | | | | | | | | | | | | | | | | | | | | * runtime/stat-common.c (reprint_buf): Removed. (_stp_stat_print_histogram_buf): Use a local HIST_PRINTF macro to abstract the buffer management. Also convert reprint_buf calls to either %* formats or simple for-loops.
| * | Add buildok tests for sprint[ln](@hist_*)Josh Stone2009-10-131-0/+4
| | |
| * | PR10257: Add support for sprint[ln](@hist_*).Przemyslaw Pawelczyk2009-10-133-35/+64
| | | | | | | | | | | | | | | | | | | | | | | | * parse.cxx (parser::parse_symbol): Add sprint[ln] to @hist_* hack. * runtime/stat-common.c: Replace reprint with new reprint_buf, add more generic _stp_stat_print_histogram_buf and call it from the older one. Also correct some formatting issues. * translate.cxx (c_unparser::visit_print_format): Add sprint case.
| * | PR5434: Fix syscall.nfsservctl.Przemyslaw Pawelczyk2009-10-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Use proper $vars according to CONFIG_NFSD and CONFIG_COMPAT in syscall.nfsservctl and mask it out along with return probe if CONFIG_NFSD != "[ym]" && CONFIG_COMPAT != "y". * tapset/syscalls2.stp (syscall.nfsservctl): Fix it.
* | | PR10746: update test cases related to probe process.*Wenji Huang2009-10-144-7/+20
| |/ |/| | | | | | | | | | | | | * testsuite/semok/utrace01.stp: Switch by CONFIG_UTRACE. * testsuite/systemtap.base/bz10294.stp: Ditto. * testsuite/systemtap.base/bz6905.stp: Ditto. * testsuite/systemtap.base/statement.exp: Mark untested if non-utrace kernel.
* | runtime shutdown errors: simplify, improve error specificityFrank Ch. Eigler2009-10-133-19/+18
|/ | | | | | | | * transport/control.c (*_cmd): Return -Ecodes rather than "-1" from file_operations callbacks. * staprun/ctl.c (init_ctl_channel): Return distinct error codes. * staprun/staprun.c (remove_module): Skip connection attempt to .ctl file; just do delete_module() with O_NONBLOCK.
* Let semko/utrace.stp fail even with CONFIG_UTRACE=yJosh Stone2009-10-131-1/+1
|
* Add a test for CONFIG_FOO wildcardsJosh Stone2009-10-131-0/+25
|
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-10-131-60/+54
|\
| * PR10761: pass -v's to final "staprun -d" if appropriateFrank Ch. Eigler2009-10-131-60/+54
| | | | | | | | | | * mainloop.c (cleanup_and_exit): Remove non-BUG9788_WORKAROUND branch. Remove execlp branch. Pass -v to staprun-d if verbose.
* | Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-10-1351-778/+2069
|\|
| * PR 10575. Improves running target commands.David Smith2009-10-131-18/+43
| | | | | | | | | | | | | | * runtime/staprun/mainloop.c (signal_usr1): Renamed from signal_dontcare. Sets a new variable, usr1_interrupt. (start_cmd): Avoids pause() race condition by switching to blocking SIGUSR1, then waiting on SIGUSR1 with sigsuspend().
| * parse: fix CONFIG_ matching typoFrank Ch. Eigler2009-10-131-1/+1
| | | | | | | | * parse.cxx (eval_pp_conditional): Flip rhs and lhs args for fnmatch().
| * Add the .call modifier to syscall entry probes.Przemyslaw Pawelczyk2009-10-122-704/+704
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inline functions do not have an indentifiable return point and require kernel built using VTA-enabled gcc to get tracking of variables. OTOH syscall functions are very rarely inlined (depending on the compiler mood), therefore filtering probes to include only non-inlined functions ensures consistent behavior between different kernels. This removes the problem of inaccessible variables in inlined syscalls that is described in comments #6-9 to PR5890 and gives us the status quo w.r.t. syscall probing, because before the commit solving PR10572 (b7478964) inline instances were masked anyway by non-inline ones. You can check whether you have inlined syscalls using following command: $ stap -l 'kernel.function("sys_*"),kernel.function("compat_sys_*")' \ 2>&1 -vvv | awk '/^selected inline/{print $5}' * tapset/syscalls.stp: Add .call to all entry probes. * tapset/syscalls2.stp: Ditto.
| * Add task_time tapset, functions to query time resource usage of current task.Mark Wielaard2009-10-093-0/+119
| | | | | | | | | | | | | | * tapset/task_time.stp: New tapset. * testsuite/buildok/task_test.stp: Add new task_time functions. * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add new section on Task Time Tapset. Include tapset/task_time.stp.
| * tapset/proc_mem.stp: Document function parameters.Mark Wielaard2009-10-091-0/+2
| |
| * PR10746: improve error message on utrace-less kernelsFrank Ch. Eigler2009-10-084-0/+11
| | | | | | | | | | | | | | * tapset-itrace.exp (itrace_derived_probe ctor): Fail if !CONFIG_UTRACE. * tapset-utrace.exp (utrace_derived_probe ctor): Fail if !CONFIG_UTRACE. * tapsets.cxx (dwarf_builder::build): Fail process.* if !CONFIG_UTRACE. * testsuite/semko/utrace.stp: New test.
| * examples: regen indexesFrank Ch. Eigler2009-10-085-2/+37
| |
| * examples: add mbrwatch sampleFrank Ch. Eigler2009-10-082-0/+15
| |
| * testsuite: robustify check_* invocation of examples metaFrank Ch. Eigler2009-10-0815-18/+22
| | | | | | | | | | | | | | | | | | testsuite/systemtap.examples/ * check.exp (extract_tag): Log extracted tags. Tolerate embedded '$'. (run_command): Pass through commands to sh -c without eval quoting. * README: Document "sh -c"-ness of check_* tags. * *.meta: Fix quoting, add a few check_support predicates.
| * This script (tcp_trace) can be used to trace tcp connection parameters and ↵David J. Wilder2009-10-087-0/+817
| | | | | | | | state changes. This work was original inspired by Stephen Hemminger's TCP cwnd snooper (net/ipv4/tcp_probe.c). Tcp_trace is a helpful tool for troubleshooting connection performance issues.
| * PR10702: preprocessor conditional for kernel CONFIG_fooFrank Ch. Eigler2009-10-088-7/+80
| | | | | | | | | | | | | | | | * 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.
| * build: fix !HAVE_NSS caseFrank Ch. Eigler2009-10-071-2/+1
| | | | | | | | | | * staprun_funcs.c (assert_permissions): Move "check_signature_rc" variable inside #if HAVE_NSS.
| * Merge commit 'origin/master'Tim Moore2009-10-0732-334/+1224
| |\
| | * Remove the global derived_probe->semaphore mapJosh Stone2009-10-065-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead just make the semaphore address a member of derived_probe. * session.h (systemtap_session): Remove the map sdt_semaphore_addr. * elaborate.h (derived_probe): Add sdt_semaphore_addr directly. * tapsets.cxx (sdt_query::record_semaphore): Write the addr directly. (uprobe_derived_probe_group::emit_module_decls): Read it directly. * tapset-utrace.cxx (utrace_derived_probe_group::emit_probe_decl): Ditto
| * | Added man page for stapgraphTim Moore2009-10-075-13/+205
| | | | | | | | | | | | * grapher/stapgraph.1.in: new file
* | | Ensure that unprivileged-authorized probe point functions are hashed differentlyDave Brolley2009-10-137-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than non-authorized ones for the purpose of removing duplicates. 2009-10-13 Dave Brolley <brolley@redhat.com> * elaborate.h (print_dupe_stamp_unprivileged): New static method of derived_probe. (print_dupe_stamp_unprivileged_process_owner): Likewise. * elaborate.cxx (print_dupe_stamp_unprivileged): New static method of derived_probe. (print_dupe_stamp_unprivileged_process_owner): Likewise. * tapset-been.cxx (print_dupe_stamp): New virtual method of be_derived_p robe and never_derived_probe. * tapset-utrace.cxx (print_dupe_stamp): New virtual method of utrace_der ived_probe * tapset-itrace.cxx (itrace_derived_probe::emit_unprivileged_assertion): Removed. (itrace_builder::check_unprivileged): Removed. * tapsets.cxx (print_dupe_stamp): New virtual method of uprobe_derived_p robe
* | | Generate safety net assertions in probe function not authorized for ↵Dave Brolley2009-10-098-91/+164
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unprivileged users. 2009-10-08 Dave Brolley <brolley@redhat.com> * elaborate.h (emit_unprivileged_assertion): New virtual method of deriv ed_probe. (emit_process_owner_assertion): New static method of derived_probe. (check_unprivileged): New virtual method of derived_probe_builder. (match_node::unprivileged_ok): Removed. (match_node::allow_unprivileged): Removed. (match_node::unprivileged_allowed): Removed. * elaborate.cxx (translate.h): #include it. (emit_unprivileged_assertion): New virtual method of derived_probe. (emit_process_owner_assertion): New static method of derived_probe. (check_unprivileged): New virtual method of derived_probe_builder. (match_node::unprivileged_ok): Removed. (match_node::allow_unprivileged): Removed. (match_node::unprivileged_allowed): Removed. (find_and_build): Don't check for unprivileged restrictions here. Call t he builder's check_unprivileged method. (alias_expansion_builder::check_unprivileged): New virtual method. * tapset-been.cxx (be_derived_probe::emit_unprivileged_assertion): New v irtual method. (be_builder::check_unprivileged): Likewise. (never_derived_probe::emit_unprivileged_assertion): Likewise. (never_builder::check_unprivileged): Likewise. (register_tapset_been): Don't call allow_unprivileged. * tapset-itrace.cxx (itrace_derived_probe::emit_unprivileged_assertion): New virtual method. (itrace_builder::check_unprivileged): Likewise. (register_tapset_itrace): Don't call allow_unprivileged. * tapset-utrace.cxx (utrace_derived_probe::emit_unprivileged_assertion): New virtual method. (utrace_builder::check_unprivileged): Likewise. (register_tapset_utrace): Don't call allow_unprivileged. * tapset-timer.cxx (timer_derived_probe::emit_unprivileged_assertion): N ew virtual method. (timer_builder::check_unprivileged): Likewise. (register_tapset_timers): Don't call allow_unprivileged. * tapsets.cxx (uprobe_derived_probe::emit_unprivileged_assertion): New v irtual method. (uprobe_builder::check_unprivileged): Likewise. (register_standard_tapsets): Don't call allow_unprivileged. (register_statement_variants): Remove unprivileged_ok_p parameter. Don't call allow_unprivileged. (register_function_variants): Likewise. (register_function_and_statement_variants): Likewise. (register_patterns): Don't call allow_unprivileged. * translate.cxx (emit_probe): Call v->emit_unprivileged_assertion.