annotate make/solaris/makefiles/adjust-mflags.sh @ 807:d44bdab1c03d

6843694: G1: assert(index < _vs.committed_size(),"bad index"), g1BlockOffsetTable.inline.hpp:55 Summary: For heaps larger than 32Gb, the number of heap regions overflows the data type used to hold the region index in the SparsePRT structure. Changed the region indexes, card indexes, and RSet hash table buckets to ints and added some size overflow guarantees. Reviewed-by: ysr, tonyp
author johnc
date Thu, 11 Jun 2009 17:19:33 -0700
parents d1605aabd0a1
children c18cbe5936b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #! /bin/sh
a61af66fc99e Initial load
duke
parents:
diff changeset
2 #
196
d1605aabd0a1 6719955: Update copyright year
xdono
parents: 91
diff changeset
3 # Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
5 #
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
8 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
9 #
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
14 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
15 #
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
19 #
a61af66fc99e Initial load
duke
parents:
diff changeset
20 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
21 # CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
22 # have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24 #
a61af66fc99e Initial load
duke
parents:
diff changeset
25
a61af66fc99e Initial load
duke
parents:
diff changeset
26 # This script is used only from top.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
27 # The macro $(MFLAGS-adjusted) calls this script to
a61af66fc99e Initial load
duke
parents:
diff changeset
28 # adjust the "-j" arguments to take into account
a61af66fc99e Initial load
duke
parents:
diff changeset
29 # the HOTSPOT_BUILD_JOBS variable. The default
a61af66fc99e Initial load
duke
parents:
diff changeset
30 # handling of the "-j" argument by gnumake does
a61af66fc99e Initial load
duke
parents:
diff changeset
31 # not meet our needs, so we must adjust it ourselves.
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 # This argument adjustment applies to two recursive
a61af66fc99e Initial load
duke
parents:
diff changeset
34 # calls to "$(MAKE) $(MFLAGS-adjusted)" in top.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
35 # One invokes adlc.make, and the other invokes vm.make.
a61af66fc99e Initial load
duke
parents:
diff changeset
36 # The adjustment propagates the desired concurrency
a61af66fc99e Initial load
duke
parents:
diff changeset
37 # level down to the sub-make (of the adlc or vm).
a61af66fc99e Initial load
duke
parents:
diff changeset
38 # The default behavior of gnumake is to run all
a61af66fc99e Initial load
duke
parents:
diff changeset
39 # sub-makes without concurrency ("-j1").
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 # Also, we use a make variable rather than an explicit
a61af66fc99e Initial load
duke
parents:
diff changeset
42 # "-j<N>" argument to control this setting, so that
a61af66fc99e Initial load
duke
parents:
diff changeset
43 # the concurrency setting (which must be tuned separately
a61af66fc99e Initial load
duke
parents:
diff changeset
44 # for each MP system) can be set via an environment variable.
a61af66fc99e Initial load
duke
parents:
diff changeset
45 # The recommended setting is 1.5x to 2x the number of available
a61af66fc99e Initial load
duke
parents:
diff changeset
46 # CPUs on the MP system, which is large enough to keep the CPUs
a61af66fc99e Initial load
duke
parents:
diff changeset
47 # busy (even though some jobs may be I/O bound) but not too large,
a61af66fc99e Initial load
duke
parents:
diff changeset
48 # we may presume, to overflow the system's swap space.
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50 set -eu
a61af66fc99e Initial load
duke
parents:
diff changeset
51
a61af66fc99e Initial load
duke
parents:
diff changeset
52 default_build_jobs=4
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 case $# in
a61af66fc99e Initial load
duke
parents:
diff changeset
55 [12]) true;;
a61af66fc99e Initial load
duke
parents:
diff changeset
56 *) >&2 echo "Usage: $0 ${MFLAGS} ${HOTSPOT_BUILD_JOBS}"; exit 2;;
a61af66fc99e Initial load
duke
parents:
diff changeset
57 esac
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59 MFLAGS=$1
a61af66fc99e Initial load
duke
parents:
diff changeset
60 HOTSPOT_BUILD_JOBS=${2-}
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 # Normalize any -jN argument to the form " -j${HBJ}"
a61af66fc99e Initial load
duke
parents:
diff changeset
63 MFLAGS=`
a61af66fc99e Initial load
duke
parents:
diff changeset
64 echo "$MFLAGS" \
a61af66fc99e Initial load
duke
parents:
diff changeset
65 | sed '
a61af66fc99e Initial load
duke
parents:
diff changeset
66 s/^-/ -/
a61af66fc99e Initial load
duke
parents:
diff changeset
67 s/ -\([^ ][^ ]*\)j/ -\1 -j/
a61af66fc99e Initial load
duke
parents:
diff changeset
68 s/ -j[0-9][0-9]*/ -j/
a61af66fc99e Initial load
duke
parents:
diff changeset
69 s/ -j\([^ ]\)/ -j -\1/
a61af66fc99e Initial load
duke
parents:
diff changeset
70 s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/
a61af66fc99e Initial load
duke
parents:
diff changeset
71 ' `
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 case ${HOTSPOT_BUILD_JOBS} in \
a61af66fc99e Initial load
duke
parents:
diff changeset
74
a61af66fc99e Initial load
duke
parents:
diff changeset
75 '') case ${MFLAGS} in
a61af66fc99e Initial load
duke
parents:
diff changeset
76 *\ -j*)
a61af66fc99e Initial load
duke
parents:
diff changeset
77 >&2 echo "# Note: -jN is ineffective for setting parallelism in this makefile."
a61af66fc99e Initial load
duke
parents:
diff changeset
78 >&2 echo "# please set HOTSPOT_BUILD_JOBS=${default_build_jobs} in the command line or environment."
a61af66fc99e Initial load
duke
parents:
diff changeset
79 esac;;
a61af66fc99e Initial load
duke
parents:
diff changeset
80
a61af66fc99e Initial load
duke
parents:
diff changeset
81 ?*) case ${MFLAGS} in
a61af66fc99e Initial load
duke
parents:
diff changeset
82 *\ -j*) true;;
a61af66fc99e Initial load
duke
parents:
diff changeset
83 *) MFLAGS="-j${HOTSPOT_BUILD_JOBS} ${MFLAGS}";;
a61af66fc99e Initial load
duke
parents:
diff changeset
84 esac;;
a61af66fc99e Initial load
duke
parents:
diff changeset
85 esac
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 echo "${MFLAGS}"