svn commit: r248983 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/...

2013-04-01 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Apr  1 19:13:46 2013
New Revision: 248983
URL: http://svnweb.freebsd.org/changeset/base/248983

Log:
  Dtrace: enablings on defunct providers prevent providers from unregistering
  
  Merge change from illumos:
  
  1368 enablings on defunct providers prevent providers from unregistering
  
  We try to address some underlying differences between the Solaris
  and FreeBSD implementations: dtrace_attach() / dtrace_detach() are
  currently unimplemented in FreeBSD but the new code from illumos
  makes use of taskq so some adaptations were made to dtrace_open()
  and dtrace_close() to handle them appropriately.
  
  Illumos Revision: r13430:8e6add739e38
  
  Reference:
  https://www.illumos.org/issues/1368
  
  Reviewed by:  gnn
  Tested by:Fabian Keil
  Obtained from:Illumos
  MFC after:3 weeks

Added:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh
 - copied unchanged from r248981, 
vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh
  
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh
 - copied unchanged from r248981, 
vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh
 - copied unchanged from r248981, 
vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh
Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst
  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
  head/sys/modules/dtrace/dtrace/Makefile

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst 
Mon Apr  1 19:11:43 2013(r248982)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst 
Mon Apr  1 19:13:46 2013(r248983)
@@ -23,7 +23,6 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident%Z%%M% %I% %E% SMI
 
 # Exception list: names tests that are bypassed when running in Java
 # mode (relative to /opt/SUNWdtrt/tst)
@@ -52,14 +51,17 @@ common/usdt/tst.enabled.ksh
 common/usdt/tst.enabled2.ksh
 common/usdt/tst.entryreturn.ksh
 common/usdt/tst.fork.ksh
-common/usdt/tst.header.ksh
 common/usdt/tst.guess32.ksh
 common/usdt/tst.guess64.ksh
+common/usdt/tst.header.ksh
 common/usdt/tst.linkpriv.ksh
 common/usdt/tst.linkunpriv.ksh
 common/usdt/tst.multiple.ksh
 common/usdt/tst.nodtrace.ksh
+common/usdt/tst.noreap.ksh
+common/usdt/tst.noreapring.ksh
 common/usdt/tst.onlyenabled.ksh
+common/usdt/tst.reap.ksh
 common/usdt/tst.reeval.ksh
 common/usdt/tst.static.ksh
 common/usdt/tst.static2.ksh

Copied: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh 
(from r248981, 
vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh
Mon Apr  1 19:13:46 2013(r248983, copy of r248981, 
vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh)
@@ -0,0 +1,128 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the License).
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets [] replaced with your own identifying
+# information: Portions Copyright [] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2011, Joyent, Inc. All rights reserved.
+#
+
+if [ $# != 1 ]; then
+   echo expected one argument: ''dtrace-path''
+   exit 2
+fi
+
+dtrace=$1
+DIR=/var/tmp/dtest.$$
+
+mkdir $DIR
+cd $DIR
+
+cat  test.c EOF
+#include unistd.h
+#include sys/sdt.h
+
+int
+main(int argc, char **argv)
+{
+   DTRACE_PROBE(test_prov, probe1);
+}
+EOF
+
+cat  prov.d EOF
+provider test_prov {
+   probe probe1();
+};
+EOF
+
+gcc -c test.c
+if [ $? -ne 0 ]; then
+   print -u2 failed to compile test.c
+   exit 1
+fi
+$dtrace -G -32 -s prov.d test.o
+if [ $? -ne 0 ]; then
+   print -u2 failed to create DOF
+  

Re: svn commit: r248983 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl

2013-04-01 Thread Andriy Gapon
on 01/04/2013 22:13 Pedro F. Giffuni said the following:
 Dtrace: enablings on defunct providers prevent providers from unregistering

Unfortunately, we have some much larger problems in this area of the FreeBSD 
port.

-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r248983 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl

2013-04-01 Thread Pedro Giffuni

 Da: Andriy Gapon
 
on 01/04/2013 22:13 Pedro F. Giffuni said the following:
 Dtrace: enablings on defunct providers prevent providers from unregistering

Unfortunately, we have some much larger problems in this area of the FreeBSD 
port.


It does help to be in sync with illumos though.

The change seems to be required by this feature:

http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/


Regards,

Pedro.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org