]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
Merge userspace DTrace support from head to stable/8:
authorrwatson <rwatson@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 28 Feb 2011 23:28:35 +0000 (23:28 +0000)
committerrwatson <rwatson@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 28 Feb 2011 23:28:35 +0000 (23:28 +0000)
commit49ed550123352266e1416e93c50d8b7a3b217eb8
tree1d71742efd3756c8498d0e78df5b28a227963536
parent5e9c6493953f3f56ce5d3be5d309f96ad13468ec
Merge userspace DTrace support from head to stable/8:

r209721:

  Merge from vendor-sys/opensolaris:
  * add fasttrap files

r209731:

  Introduce USD_{SET,GET}{BASE,LIMIT}. These help setting up the user
  segment descriptor hi and lo values. Idea from Solaris.

  Reviewed by:  kib

r209763:

  Fix style issues with the previous commit, namely
  use-tab-instead-of-space and don't use underscores in macro variables.

  Pointed out by:       bde

r210292:

  Fix typo in comment.

r210357:

  MFamd64:
    Add USD_GETBASE(), USD_SETBASE(), USD_GETLIMIT() and USD_SETLIMIT().

r210611:

  Bump the witness pendlist to 768 to accomodate the increased number of
  spinlocks.

r211553:

  Add sysname to struct opensolaris_utsname. This is needed by one DTrace
  test.

r211566:

  Add a sysname char * to struct opensolaris_utsname.

r211606:

  Add the FreeBSD definition for the fasttrap ioctls.

r211607:

  Add a function compatibility function dtrace_instr_size_isa() that on
  FreeBSD does the same as dtrace_dis_isize().

r211608:

  Kernel DTrace support for:
  o uregs  (sson@)
  o ustack (sson@)
  o /dev/dtrace/helper device (needed for USDT probes)

r211610:

  Add more compatibility structure members needed by the upcoming fasttrap
  DTrace device.

r211611:

  Destroy the helper device when unloading.

r211613:

  Fix style issues.

r211614:

  Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
  calling bzero.

r211615:

  Remove an elif and add an or-clause.

r211616:

  Add an extra comment to the SDT probes definition. This allows us to get
  use '-' in probe names, matching the probe names in Solaris.

  Add userland SDT probes definitions to sys/sdt.h.

r211617:

  Call the systrace_probe_func() when the error value.

r211618:

  Port this to FreeBSD. We miss some suword functions, so we use copyout.

r211738:

  Port the fasttrap provider to FreeBSD. This provider is responsible for
  injecting debugging probes in the userland programs and is the basis for
  the pid provider and the usdt provider.

r211744:

  MD fasttrap implementation.

r211745:

  Replace a pksignal() call with tdksignal().

  Pointed out by:       kib

r211746:

  Update for the recent location of the fasttrap code.

r211747:

  Replace structure assignments with explicity memcpy calls. This allows
  Clang to compile this file: it was using the builtin memcpy and we want
  to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

  Submitted by: Dimitry Andric <dimitry at andric.com>
  Reviewed by:  jhb

r211751:

  Add a trap code for DTrace induced traps.

r211752:

  Add two DTrace trap type values. Used by fasttrap.

r211753:

  Enable fasttrap and make dtraceall depend on fasttrap when building i386
  or amd64.

r211804:

  Call the necessary DTrace function pointers when we have different kinds
  of traps.

r211813:

  Add the necessary DTrace function pointers.

r211839:

  Sync DTrace bits with amd64 and fix the build.

r211924:

  Register an interrupt vector for DTrace return probes. There is some
  code missing in lapic to make sure that we don't overwrite this entry,
  but this will be done on a sequent commit.

r211925:

  Replace a memory barrier with a mutex barrier.

r211926:

  Add the path necessary to find fasttrap_isa.h to CFLAGS.

r211929:

  Remove debugging.

r212004:

  When DTrace is enabled, make sure we don't overwrite the IDT_DTRACE_RET
  entry with an IRQ for some hardware component.

  Reviewed by:  jhb

r212093:

  Make the /dev/dtrace/helper node have the mode 0660. This allows
  programs that refuse to run as root (pgsql) to install probes when their
  user is part of the wheel group.

r212357:

  Fix two bugs in DTrace:
  * when the process exits, remove the associated USDT probes
  * when the process forks, duplicate the USDT probes.

r212465:

  Avoid a LOR (sleepable after non-sleepable) in
  fasttrap_tracepoint_enable().

r212494:

  Revamp locking a bit. This fixes three problems:
  * processes now can't go away while we are inserting probes (fixes a panic)
  * if a trap happens, we won't be holding the process lock (fixes a hang)
  * fix a LOR between the process lock and the fasttrap bucket list lock

  Thanks to kib for pointing some problems.

r212568:

  Bump __FreeBSD_version to reflect the userland DTrace changes

Sponsored by:                   The FreeBSD Foundation
Userspace DTrace work by:       rpaulo

git-svn-id: svn://svn.freebsd.org/base/stable/8@219107 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
61 files changed:
sys/amd64/amd64/exception.S
sys/amd64/amd64/machdep.c
sys/amd64/amd64/trap.c
sys/amd64/include/segments.h
sys/amd64/include/trap.h
sys/boot/common/ufsread.c
sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
sys/cddl/compat/opensolaris/sys/misc.h
sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap.h
sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h [new file with mode: 0644]
sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c [new file with mode: 0644]
sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c [new file with mode: 0644]
sys/cddl/dev/dtrace/amd64/dtrace_isa.c
sys/cddl/dev/dtrace/amd64/instr_size.c
sys/cddl/dev/dtrace/amd64/regset.h [new file with mode: 0644]
sys/cddl/dev/dtrace/dtrace_cddl.h
sys/cddl/dev/dtrace/dtrace_ioctl.c
sys/cddl/dev/dtrace/dtrace_load.c
sys/cddl/dev/dtrace/dtrace_unload.c
sys/cddl/dev/dtrace/i386/dtrace_isa.c
sys/cddl/dev/dtrace/i386/instr_size.c
sys/cddl/dev/dtrace/i386/regset.h [new file with mode: 0644]
sys/cddl/dev/systrace/systrace.c
sys/i386/i386/exception.s
sys/i386/i386/machdep.c
sys/i386/i386/trap.c
sys/i386/include/segments.h
sys/i386/include/trap.h
sys/kern/kern_dtrace.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_priv.c
sys/kern/kern_proc.c
sys/kern/kern_sig.c
sys/kern/kern_timeout.c
sys/kern/subr_trap.c
sys/kern/subr_witness.c
sys/kern/vfs_cache.c
sys/kern/vfs_lookup.c
sys/kern/vfs_syscalls.c
sys/modules/dtrace/Makefile
sys/modules/dtrace/dtrace/Makefile
sys/modules/dtrace/dtraceall/dtraceall.c
sys/modules/dtrace/fasttrap/Makefile
sys/net/vnet.c
sys/opencrypto/deflate.c
sys/security/mac/mac_framework.c
sys/security/mac/mac_internal.h
sys/sys/dtrace_bsd.h
sys/sys/param.h
sys/sys/priv.h
sys/sys/sdt.h
sys/sys/signal.h
sys/sys/sysent.h
sys/tools/vnode_if.awk
sys/x86/x86/local_apic.c