[Midnightbsd-cvs] src [9150] trunk/sys/cddl/dev/dtrace/amd64: sync with freebsd 9.2

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Oct 13 21:59:54 EDT 2016


Revision: 9150
          http://svnweb.midnightbsd.org/src/?rev=9150
Author:   laffer1
Date:     2016-10-13 21:59:54 -0400 (Thu, 13 Oct 2016)
Log Message:
-----------
sync with freebsd 9.2

Modified Paths:
--------------
    trunk/sys/cddl/dev/dtrace/amd64/dis_tables.c
    trunk/sys/cddl/dev/dtrace/amd64/dis_tables.h
    trunk/sys/cddl/dev/dtrace/amd64/dtrace_asm.S
    trunk/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
    trunk/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
    trunk/sys/cddl/dev/dtrace/amd64/instr_size.c
    trunk/sys/cddl/dev/dtrace/amd64/regset.h

Modified: trunk/sys/cddl/dev/dtrace/amd64/dis_tables.c
===================================================================
--- trunk/sys/cddl/dev/dtrace/amd64/dis_tables.c	2016-10-14 01:59:43 UTC (rev 9149)
+++ trunk/sys/cddl/dev/dtrace/amd64/dis_tables.c	2016-10-14 01:59:54 UTC (rev 9150)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * CDDL HEADER START
  *
@@ -18,7 +19,7 @@
  *
  * CDDL HEADER END
  *
- * $MidnightBSD$
+ * $FreeBSD: release/9.2.0/sys/cddl/dev/dtrace/amd64/dis_tables.c 238503 2012-07-15 20:38:02Z avg $
  */
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.

Modified: trunk/sys/cddl/dev/dtrace/amd64/dis_tables.h
===================================================================
--- trunk/sys/cddl/dev/dtrace/amd64/dis_tables.h	2016-10-14 01:59:43 UTC (rev 9149)
+++ trunk/sys/cddl/dev/dtrace/amd64/dis_tables.h	2016-10-14 01:59:54 UTC (rev 9150)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * CDDL HEADER START
  *
@@ -18,7 +19,7 @@
  *
  * CDDL HEADER END
  *
- * $MidnightBSD$
+ * $FreeBSD: release/9.2.0/sys/cddl/dev/dtrace/amd64/dis_tables.h 179237 2008-05-23 05:59:42Z jb $
  */
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.

Modified: trunk/sys/cddl/dev/dtrace/amd64/dtrace_asm.S
===================================================================
--- trunk/sys/cddl/dev/dtrace/amd64/dtrace_asm.S	2016-10-14 01:59:43 UTC (rev 9149)
+++ trunk/sys/cddl/dev/dtrace/amd64/dtrace_asm.S	2016-10-14 01:59:54 UTC (rev 9150)
@@ -20,7 +20,7 @@
  *
  * Portions Copyright 2008 John Birrell <jb at freebsd.org>
  *
- * $MidnightBSD$
+ * $FreeBSD: release/9.2.0/sys/cddl/dev/dtrace/amd64/dtrace_asm.S 179237 2008-05-23 05:59:42Z jb $
  *
  */
 /*

Modified: trunk/sys/cddl/dev/dtrace/amd64/dtrace_isa.c
===================================================================
--- trunk/sys/cddl/dev/dtrace/amd64/dtrace_isa.c	2016-10-14 01:59:43 UTC (rev 9149)
+++ trunk/sys/cddl/dev/dtrace/amd64/dtrace_isa.c	2016-10-14 01:59:54 UTC (rev 9150)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * CDDL HEADER START
  *
@@ -19,7 +20,7 @@
  *
  * CDDL HEADER END
  *
- * $MidnightBSD$
+ * $FreeBSD: release/9.2.0/sys/cddl/dev/dtrace/amd64/dtrace_isa.c 252858 2013-07-06 02:49:56Z markj $
  */
 /*
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
@@ -398,7 +399,7 @@
 	}
 
 	arg -= (inreg + 1);
-	stack = (uintptr_t *)&fp[1];
+	stack = (uintptr_t *)fp + 2;
 
 load:
 	DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);

Modified: trunk/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
===================================================================
--- trunk/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	2016-10-14 01:59:43 UTC (rev 9149)
+++ trunk/sys/cddl/dev/dtrace/amd64/dtrace_subr.c	2016-10-14 01:59:54 UTC (rev 9150)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * CDDL HEADER START
  *
@@ -19,7 +20,7 @@
  *
  * CDDL HEADER END
  *
- * $MidnightBSD$
+ * $FreeBSD: release/9.2.0/sys/cddl/dev/dtrace/amd64/dtrace_subr.c 251666 2013-06-12 20:08:30Z gnn $
  *
  */
 /*
@@ -27,6 +28,10 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright (c) 2011, Joyent, Inc. All rights reserved.
+ */
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/types.h>
@@ -299,14 +304,15 @@
 	}
 
 	/*
-	 * If we've executed the original instruction, but haven't performed
-	 * the jmp back to t->t_dtrace_npc or the clean up of any registers
-	 * used to emulate %rip-relative instructions in 64-bit mode, do that
-	 * here and take the signal right away. We detect this condition by
-	 * seeing if the program counter is the range [scrpc + isz, astpc).
+	 * If we have executed the original instruction, but we have performed
+	 * neither the jmp back to t->t_dtrace_npc nor the clean up of any
+	 * registers used to emulate %rip-relative instructions in 64-bit mode,
+	 * we'll save ourselves some effort by doing that here and taking the
+	 * signal right away.  We detect this condition by seeing if the program
+	 * counter is the range [scrpc + isz, astpc).
 	 */
-	if (t->t_dtrace_astpc - rp->r_pc <
-	    t->t_dtrace_astpc - t->t_dtrace_scrpc - isz) {
+	if (rp->r_pc >= t->t_dtrace_scrpc + isz &&
+	    rp->r_pc < t->t_dtrace_astpc) {
 #ifdef __amd64
 		/*
 		 * If there is a scratch register and we're on the

Modified: trunk/sys/cddl/dev/dtrace/amd64/instr_size.c
===================================================================
--- trunk/sys/cddl/dev/dtrace/amd64/instr_size.c	2016-10-14 01:59:43 UTC (rev 9149)
+++ trunk/sys/cddl/dev/dtrace/amd64/instr_size.c	2016-10-14 01:59:54 UTC (rev 9150)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * CDDL HEADER START
  *
@@ -19,7 +20,7 @@
  *
  * CDDL HEADER END
  *
- * $MidnightBSD$
+ * $FreeBSD: release/9.2.0/sys/cddl/dev/dtrace/amd64/instr_size.c 211607 2010-08-22 10:40:15Z rpaulo $
  */
 /*
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.

Modified: trunk/sys/cddl/dev/dtrace/amd64/regset.h
===================================================================
--- trunk/sys/cddl/dev/dtrace/amd64/regset.h	2016-10-14 01:59:43 UTC (rev 9149)
+++ trunk/sys/cddl/dev/dtrace/amd64/regset.h	2016-10-14 01:59:54 UTC (rev 9150)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * CDDL HEADER START
  *
@@ -19,7 +20,7 @@
  *
  * CDDL HEADER END
  *
- * $MidnightBSD$ 
+ * $FreeBSD: release/9.2.0/sys/cddl/dev/dtrace/amd64/regset.h 211608 2010-08-22 10:53:32Z rpaulo $ 
  */
 /*
  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.



More information about the Midnightbsd-cvs mailing list