From owner-p4-projects@FreeBSD.ORG Thu Nov 15 21:42:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E34D716A421; Thu, 15 Nov 2007 21:42:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8922616A41B for ; Thu, 15 Nov 2007 21:42:06 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 77E3113C459 for ; Thu, 15 Nov 2007 21:42:06 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lAFLg6Lp017555 for ; Thu, 15 Nov 2007 21:42:06 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lAFLg6mx017552 for perforce@freebsd.org; Thu, 15 Nov 2007 21:42:06 GMT (envelope-from jb@freebsd.org) Date: Thu, 15 Nov 2007 21:42:06 GMT Message-Id: <200711152142.lAFLg6mx017552@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 129098 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2007 21:42:07 -0000 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 +#include +#include /*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