head	1.4;
access;
symbols
	RELENG_8_4:1.4.0.2
	RELENG_9_1_0_RELEASE:1.3.2.1.4.2
	RELENG_9_1:1.3.2.1.0.4
	RELENG_9_1_BP:1.3.2.1
	RELENG_8_3_0_RELEASE:1.1.4.2.2.1
	RELENG_8_3:1.1.4.2.0.2
	RELENG_8_3_BP:1.1.4.2
	RELENG_9_0_0_RELEASE:1.3.2.1.2.1
	RELENG_9_0:1.3.2.1.0.2
	RELENG_9_0_BP:1.3.2.1
	RELENG_9:1.3.0.2
	RELENG_9_BP:1.3
	RELENG_7_4_0_RELEASE:1.1.2.1.8.1
	RELENG_8_2_0_RELEASE:1.1.4.1.6.1
	RELENG_7_4:1.1.2.1.0.8
	RELENG_7_4_BP:1.1.2.1
	RELENG_8_2:1.1.4.1.0.6
	RELENG_8_2_BP:1.1.4.1
	RELENG_8_1_0_RELEASE:1.1.4.1.4.1
	RELENG_8_1:1.1.4.1.0.4
	RELENG_8_1_BP:1.1.4.1
	RELENG_7_3_0_RELEASE:1.1.2.1.6.1
	RELENG_7_3:1.1.2.1.0.6
	RELENG_7_3_BP:1.1.2.1
	RELENG_8_0_0_RELEASE:1.1.4.1.2.1
	RELENG_8_0:1.1.4.1.0.2
	RELENG_8_0_BP:1.1.4.1
	RELENG_8:1.1.0.4
	RELENG_8_BP:1.1
	RELENG_7_2_0_RELEASE:1.1.2.1.4.1
	RELENG_7_2:1.1.2.1.0.4
	RELENG_7_2_BP:1.1.2.1
	RELENG_7_1_0_RELEASE:1.1.2.1.2.1
	RELENG_7_1:1.1.2.1.0.2
	RELENG_7_1_BP:1.1.2.1
	RELENG_7:1.1.0.2;
locks; strict;
comment	@# @;


1.4
date	2012.11.17.01.52.54;	author svnexp;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2010.08.24.12.18.39;	author rpaulo;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2010.08.23.06.13.29;	author imp;	state Exp;
branches;
next	1.1;

1.1
date	2008.05.17.02.31.18;	author jb;	state Exp;
branches
	1.1.2.1
	1.1.4.1;
next	;

1.4.2.1
date	2012.11.17.01.52.54;	author svnexp;	state dead;
branches;
next	1.4.2.2;

1.4.2.2
date	2013.03.28.13.05.19;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.3.2.1.2.1
	1.3.2.1.4.1;
next	1.3.2.2;

1.3.2.2
date	2012.11.17.11.37.16;	author svnexp;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2013.08.23.15.01.43;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.3.2.1.2.2;

1.3.2.1.2.2
date	2012.11.17.08.37.13;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.3.2.1.4.2;

1.3.2.1.4.2
date	2012.11.17.08.48.04;	author svnexp;	state Exp;
branches;
next	;

1.1.2.1
date	2008.08.27.04.41.15;	author jb;	state Exp;
branches
	1.1.2.1.2.1
	1.1.2.1.4.1
	1.1.2.1.6.1
	1.1.2.1.8.1;
next	1.1.2.2;

1.1.2.2
date	2012.11.17.08.06.46;	author svnexp;	state Exp;
branches;
next	;

1.1.2.1.2.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.1.2.1.4.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.1.2.1.6.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.1.2.1.8.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.1.2.1.8.2;

1.1.2.1.8.2
date	2012.11.17.08.17.26;	author svnexp;	state Exp;
branches;
next	;

1.1.4.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.1.4.1.2.1
	1.1.4.1.4.1
	1.1.4.1.6.1;
next	1.1.4.2;

1.1.4.2
date	2011.02.28.23.28.35;	author rwatson;	state Exp;
branches
	1.1.4.2.2.1;
next	1.1.4.3;

1.1.4.3
date	2012.11.17.10.36.56;	author svnexp;	state Exp;
branches;
next	1.1.4.4;

1.1.4.4
date	2013.08.23.14.24.39;	author svnexp;	state Exp;
branches;
next	;

1.1.4.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.1.4.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.1.4.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.1.4.2.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.1.4.2.2.2;

1.1.4.2.2.2
date	2012.11.17.08.25.32;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/sys/modules/dtrace/fasttrap/Makefile 211746 2010-08-24 12:18:39Z rpaulo $

.PATH:	${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace

KMOD=		fasttrap
SRCS=		fasttrap.c fasttrap_isa.c opt_compat.h
SRCS+=		vnode_if.h

CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
		-I${.CURDIR}/../../..

.if ${MACHINE_CPUARCH} == "amd64" ||  ${MACHINE_CPUARCH} == "i386"
CFLAGS+=	-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel
.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel/dtrace
.endif

CFLAGS+=	-DSMP -DDEBUG

.include <bsd.kmod.mk>
@


1.4.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:05:19 +0000
@
text
@d1 20
@


1.4.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 20
# $FreeBSD: releng/8.4/sys/modules/dtrace/fasttrap/Makefile 219107 2011-02-28 23:28:35Z rwatson $

.PATH:	${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace

KMOD=		fasttrap
SRCS=		fasttrap.c fasttrap_isa.c opt_compat.h
SRCS+=		vnode_if.h

CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
		-I${.CURDIR}/../../..

.if ${MACHINE_ARCH} == "amd64" ||  ${MACHINE_ARCH} == "i386"
CFLAGS+=	-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel
.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel/dtrace
.endif

CFLAGS+=	-DSMP -DDEBUG

.include <bsd.kmod.mk>
@


1.3
log
@SVN rev 211746 on 2010-08-24 12:18:39Z by rpaulo

Update for the recent location of the fasttrap code.

Sponsored by:	The FreeBSD Foundation
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.3.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.3.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/dtrace/fasttrap/Makefile 211746 2010-08-24 12:18:39Z rpaulo $
@


1.3.2.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/254704
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/dtrace/fasttrap/Makefile 254704 2013-08-23 14:17:45Z avg $
d18 1
a18 1
CFLAGS+=	-DSMP
a20 3

CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
CWARNFLAGS+=	-Wno-unused
@


1.3.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.3.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/modules/dtrace/fasttrap/Makefile 211746 2010-08-24 12:18:39Z rpaulo $
@


1.3.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.3.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/modules/dtrace/fasttrap/Makefile 211746 2010-08-24 12:18:39Z rpaulo $
@


1.2
log
@SVN rev 211690 on 2010-08-23 06:13:29Z by imp

MFtbemd:

Use MACHINE_CPUARCH in preference to MACHINE_ARCH.  The former is the
source code location of the machine, the latter the binary output.  In
general, we want to use MACHINE_CPUARCH instead of MACHINE_ARCH unless
we're tesitng for a specific target.  The isn't even moot for
i386/amd64 where there's momemntum towards a MACHINE_CPUARCH == x86,
although a specific cleanup for that likely would be needed...
@
text
@d3 1
a3 1
.PATH: ${.CURDIR}/../../../cddl/dev/fasttrap
d6 1
a6 1
SRCS=		fasttrap.c
d15 1
@


1.1
log
@Add the DTrace kernel module makefiles.
@
text
@d13 1
a13 1
.if ${MACHINE_ARCH} == "amd64" ||  ${MACHINE_ARCH} == "i386"
@


1.1.4.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.1.4.2
log
@SVN rev 219107 on 2011-02-28 23:28:35Z by rwatson

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
@
text
@d3 1
a3 1
.PATH:	${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace
d6 1
a6 1
SRCS=		fasttrap.c fasttrap_isa.c opt_compat.h
a14 1
.PATH:		${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel/dtrace
@


1.1.4.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/modules/dtrace/fasttrap/Makefile 219107 2011-02-28 23:28:35Z rwatson $
@


1.1.4.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/254705
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/modules/dtrace/fasttrap/Makefile 254705 2013-08-23 14:18:24Z avg $
d18 1
a18 1
CFLAGS+=	-DSMP
a20 3

CFLAGS+=	-include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h
CWARNFLAGS+=	-Wno-unused
@


1.1.4.2.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.1.4.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sys/modules/dtrace/fasttrap/Makefile 219107 2011-02-28 23:28:35Z rwatson $
@


1.1.4.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.1.4.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.1.4.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.1.2.1
log
@SVN rev 182231 on 2008-08-27 04:41:15Z by jb

MFC

DTrace support.

Note that this defaults the 'make buildkernel' to build with CTF data so
that the release kernel and modules are DTrace-able.
@
text
@@


1.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/sys/modules/dtrace/fasttrap/Makefile 182231 2008-08-27 04:41:15Z jb $
@


1.1.2.1.8.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.1.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/sys/modules/dtrace/fasttrap/Makefile 182231 2008-08-27 04:41:15Z jb $
@


1.1.2.1.6.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.1.2.1.4.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.1.2.1.2.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


