p4-projects@freebsd.org
[Top] [All Lists]

PERFORCE change 129098 for review

Subject: PERFORCE change 129098 for review
From: John Birrell
Date: Thu, 15 Nov 2007 21:42:06 GMT
http://perforce.freebsd.org/chv.cgi?CH=129098

Change 129098 by jb@jb_freebsd1 on 2007/11/15 21:41:47

        IFopensolaris

Affected files ...

.. 
//depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c#3
 integrate
.. 
//depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.d#3
 integrate
.. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c#7 
integrate

Differences ...

==== 
//depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c#3
 (text+ko) ====

@@ -20,20 +20,21 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #pragma ident  "%Z%%M% %I%     %E% SMI"
 
-#include <sys/mman.h>
+#include <stdio.h>
+#include <sys/syscall.h>
 
 /*ARGSUSED*/
 int
 main(int argc, char **argv)
 {
        for (;;) {
-               (void) mmap(NULL, 1, 2, 3, -1, 0x12345678);
+               (void) syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678);
        }
 
        return (0);

==== 
//depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.d#3
 (text+ko) ====

@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -42,5 +42,5 @@
 tick-1s
 /i++ == 3/
 {
-       exit(0);
+       exit(1);
 }

==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c#7 
(text) ====

@@ -212,6 +212,8 @@
 static char *tmpname = NULL;
 static int dynsym;
 int debug_level = DEBUG_LEVEL;
+static size_t maxpgsize = 0x400000;
+
 
 void
 usage(void)
@@ -235,7 +237,7 @@
 bigheap(void)
 {
        size_t big, *size;
-       int sizes, i;
+       int sizes;
        struct memcntl_mha mha;
 
        /*
@@ -244,12 +246,16 @@
        if ((sizes = getpagesizes(NULL, 0)) == -1)
                return;
 
-       if ((size = alloca(sizeof (size_t) * sizes)) == NULL)
+       if (sizes == 1 || (size = alloca(sizeof (size_t) * sizes)) == NULL)
                return;
 
-       if (getpagesizes(size, sizes) == -1 || sizes == 1)
+       if (getpagesizes(size, sizes) == -1)
                return;
 
+       while (size[sizes - 1] > maxpgsize)
+               sizes--;
+
+       /* set big to the largest allowed page size */
        big = size[sizes - 1];
        if (big & (big - 1)) {
                /*
@@ -266,21 +272,13 @@
                return;
 
        /*
-        * Finally, set our heap to use the largest page size for which the
-        * MC_HAT_ADVISE doesn't return EAGAIN.
+        * set the preferred page size for the heap
         */
        mha.mha_cmd = MHA_MAPSIZE_BSSBRK;
        mha.mha_flags = 0;
+       mha.mha_pagesize = big;
 
-       for (i = sizes - 1; i >= 0; i--) {
-               mha.mha_pagesize = size[i];
-
-               if (memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t)&mha, 0, 0) != -1)
-                       break;
-
-               if (errno != EAGAIN)
-                       break;
-       }
+       (void) memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t)&mha, 0, 0);
 }
 #endif
 
_______________________________________________
p4-projects@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "p4-projects-unsubscribe@xxxxxxxxxxx"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 129098 for review, John Birrell <=