annotate make/linux/makefiles/cscope.make @ 1994:6cd6d394f280

7001033: assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed()) 7002546: regression on SpecJbb2005 on 7b118 comparing to 7b117 on small heaps Summary: Relaxed assertion checking related to incremental_collection_failed flag to allow for ExplicitGCInvokesConcurrent behaviour where we do not want a failing scavenge to bail to a stop-world collection. Parameterized incremental_collection_will_fail() so we can selectively use, or not use, as appropriate, the statistical prediction at specific use sites. This essentially reverts the scavenge bail-out logic to what it was prior to some recent changes that had inadvertently started using the statistical prediction which can be noisy in the presence of bursty loads. Added some associated verbose non-product debugging messages. Reviewed-by: johnc, tonyp
author ysr
date Tue, 07 Dec 2010 21:55:53 -0800
parents c18cbe5936b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
2 # Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 #
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 #
a61af66fc99e Initial load
duke
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 #
a61af66fc99e Initial load
duke
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 #
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
20 # or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
21 # questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
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 # The cscope.out file is made in the current directory and spans the entire
a61af66fc99e Initial load
duke
parents:
diff changeset
27 # source tree.
a61af66fc99e Initial load
duke
parents:
diff changeset
28 #
a61af66fc99e Initial load
duke
parents:
diff changeset
29 # Things to note:
a61af66fc99e Initial load
duke
parents:
diff changeset
30 # 1. We use relative names for cscope.
a61af66fc99e Initial load
duke
parents:
diff changeset
31 # 2. We *don't* remove the old cscope.out file, because cscope is smart
a61af66fc99e Initial load
duke
parents:
diff changeset
32 # enough to only build what has changed. It can be confused, however,
a61af66fc99e Initial load
duke
parents:
diff changeset
33 # if files are renamed or removed, so it may be necessary to manually
a61af66fc99e Initial load
duke
parents:
diff changeset
34 # remove cscope.out if a lot of reorganization has occurred.
a61af66fc99e Initial load
duke
parents:
diff changeset
35 #
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 include $(GAMMADIR)/make/scm.make
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 NAWK = awk
a61af66fc99e Initial load
duke
parents:
diff changeset
40 RM = rm -f
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
41 HG = hg
0
a61af66fc99e Initial load
duke
parents:
diff changeset
42 CS_TOP = ../..
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 CSDIRS = $(CS_TOP)/src $(CS_TOP)/build
a61af66fc99e Initial load
duke
parents:
diff changeset
45 CSINCS = $(CSDIRS:%=-I%)
a61af66fc99e Initial load
duke
parents:
diff changeset
46
a61af66fc99e Initial load
duke
parents:
diff changeset
47 CSCOPE = cscope
a61af66fc99e Initial load
duke
parents:
diff changeset
48 CSCOPE_FLAGS = -b
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50 # Allow .java files to be added from the environment (CSCLASSES=yes).
a61af66fc99e Initial load
duke
parents:
diff changeset
51 ifdef CSCLASSES
a61af66fc99e Initial load
duke
parents:
diff changeset
52 ADDCLASSES= -o -name '*.java'
a61af66fc99e Initial load
duke
parents:
diff changeset
53 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
54
a61af66fc99e Initial load
duke
parents:
diff changeset
55 # Adding CClassHeaders also pushes the file count of a full workspace up about
a61af66fc99e Initial load
duke
parents:
diff changeset
56 # 200 files (these files also don't exist in a new workspace, and thus will
a61af66fc99e Initial load
duke
parents:
diff changeset
57 # cause the recreation of the database as they get created, which might seem
a61af66fc99e Initial load
duke
parents:
diff changeset
58 # a little confusing). Thus allow these files to be added from the environment
a61af66fc99e Initial load
duke
parents:
diff changeset
59 # (CSHEADERS=yes).
a61af66fc99e Initial load
duke
parents:
diff changeset
60 ifndef CSHEADERS
a61af66fc99e Initial load
duke
parents:
diff changeset
61 RMCCHEADERS= -o -name CClassHeaders
a61af66fc99e Initial load
duke
parents:
diff changeset
62 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 # Use CS_GENERATED=x to include auto-generated files in the build directories.
a61af66fc99e Initial load
duke
parents:
diff changeset
65 ifdef CS_GENERATED
a61af66fc99e Initial load
duke
parents:
diff changeset
66 CS_ADD_GENERATED = -o -name '*.incl'
a61af66fc99e Initial load
duke
parents:
diff changeset
67 else
a61af66fc99e Initial load
duke
parents:
diff changeset
68 CS_PRUNE_GENERATED = -o -name '${OS}_*_core' -o -name '${OS}_*_compiler?'
a61af66fc99e Initial load
duke
parents:
diff changeset
69 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
70
a61af66fc99e Initial load
duke
parents:
diff changeset
71 # OS-specific files for other systems are excluded by default. Use CS_OS=yes
a61af66fc99e Initial load
duke
parents:
diff changeset
72 # to include platform-specific files for other platforms.
a61af66fc99e Initial load
duke
parents:
diff changeset
73 ifndef CS_OS
a61af66fc99e Initial load
duke
parents:
diff changeset
74 CS_OS = linux macos solaris win32
a61af66fc99e Initial load
duke
parents:
diff changeset
75 CS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
a61af66fc99e Initial load
duke
parents:
diff changeset
76 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
77
a61af66fc99e Initial load
duke
parents:
diff changeset
78 # Processor-specific files for other processors are excluded by default. Use
a61af66fc99e Initial load
duke
parents:
diff changeset
79 # CS_CPU=x to include platform-specific files for other platforms.
a61af66fc99e Initial load
duke
parents:
diff changeset
80 ifndef CS_CPU
a61af66fc99e Initial load
duke
parents:
diff changeset
81 CS_CPU = i486 sparc amd64 ia64
a61af66fc99e Initial load
duke
parents:
diff changeset
82 CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
a61af66fc99e Initial load
duke
parents:
diff changeset
83 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 # What files should we include? A simple rule might be just those files under
a61af66fc99e Initial load
duke
parents:
diff changeset
86 # SCCS control, however this would miss files we create like the opcodes and
a61af66fc99e Initial load
duke
parents:
diff changeset
87 # CClassHeaders. The following attempts to find everything that is *useful*.
a61af66fc99e Initial load
duke
parents:
diff changeset
88 # (.del files are created by sccsrm, demo directories contain many .java files
a61af66fc99e Initial load
duke
parents:
diff changeset
89 # that probably aren't useful for development, and the pkgarchive may contain
a61af66fc99e Initial load
duke
parents:
diff changeset
90 # duplicates of files within the source hierarchy).
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 # Directories to exclude.
a61af66fc99e Initial load
duke
parents:
diff changeset
93 CS_PRUNE_STD = $(SCM_DIRS) \
a61af66fc99e Initial load
duke
parents:
diff changeset
94 -o -name '.del-*' \
a61af66fc99e Initial load
duke
parents:
diff changeset
95 -o -name '*demo' \
a61af66fc99e Initial load
duke
parents:
diff changeset
96 -o -name pkgarchive
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 CS_PRUNE = $(CS_PRUNE_STD) \
a61af66fc99e Initial load
duke
parents:
diff changeset
99 $(CS_PRUNE_OS) \
a61af66fc99e Initial load
duke
parents:
diff changeset
100 $(CS_PRUNE_CPU) \
a61af66fc99e Initial load
duke
parents:
diff changeset
101 $(CS_PRUNE_GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
102 $(RMCCHEADERS)
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 # File names to include.
a61af66fc99e Initial load
duke
parents:
diff changeset
105 CSFILENAMES = -name '*.[ch]pp' \
a61af66fc99e Initial load
duke
parents:
diff changeset
106 -o -name '*.[Ccshlxy]' \
a61af66fc99e Initial load
duke
parents:
diff changeset
107 $(CS_ADD_GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
108 -o -name '*.il' \
a61af66fc99e Initial load
duke
parents:
diff changeset
109 -o -name '*.cc' \
a61af66fc99e Initial load
duke
parents:
diff changeset
110 -o -name '*[Mm]akefile*' \
a61af66fc99e Initial load
duke
parents:
diff changeset
111 -o -name '*.gmk' \
a61af66fc99e Initial load
duke
parents:
diff changeset
112 -o -name '*.make' \
a61af66fc99e Initial load
duke
parents:
diff changeset
113 -o -name '*.ad' \
a61af66fc99e Initial load
duke
parents:
diff changeset
114 $(ADDCLASSES)
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 .PRECIOUS: cscope.out
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 cscope cscope.out: cscope.files FORCE
a61af66fc99e Initial load
duke
parents:
diff changeset
119 $(CSCOPE) $(CSCOPE_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 # The .raw file is reordered here in an attempt to make cscope display the most
a61af66fc99e Initial load
duke
parents:
diff changeset
122 # relevant files first.
a61af66fc99e Initial load
duke
parents:
diff changeset
123 cscope.files: .cscope.files.raw
a61af66fc99e Initial load
duke
parents:
diff changeset
124 echo "$(CSINCS)" > $@
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
125 -egrep -v "\.java|\/make\/" $< >> $@
0
a61af66fc99e Initial load
duke
parents:
diff changeset
126 -fgrep ".java" $< >> $@
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
127 -fgrep "/make/" $< >> $@
0
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 .cscope.files.raw: .nametable.files
a61af66fc99e Initial load
duke
parents:
diff changeset
130 -find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o \
a61af66fc99e Initial load
duke
parents:
diff changeset
131 -type f \( $(CSFILENAMES) \) -print > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 cscope.clean: nametable.clean
a61af66fc99e Initial load
duke
parents:
diff changeset
134 -$(RM) cscope.out cscope.files .cscope.files.raw
a61af66fc99e Initial load
duke
parents:
diff changeset
135
a61af66fc99e Initial load
duke
parents:
diff changeset
136 TAGS: cscope.files FORCE
a61af66fc99e Initial load
duke
parents:
diff changeset
137 egrep -v '^-|^$$' $< | etags --members -
a61af66fc99e Initial load
duke
parents:
diff changeset
138
a61af66fc99e Initial load
duke
parents:
diff changeset
139 TAGS.clean: nametable.clean
a61af66fc99e Initial load
duke
parents:
diff changeset
140 -$(RM) TAGS
a61af66fc99e Initial load
duke
parents:
diff changeset
141
a61af66fc99e Initial load
duke
parents:
diff changeset
142 # .nametable.files and .nametable.files.tmp are used to determine if any files
a61af66fc99e Initial load
duke
parents:
diff changeset
143 # were added to/deleted from/renamed in the workspace. If not, then there's
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
144 # normally no need to rebuild the cscope database. To force a rebuild of
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
145 # the cscope database: gmake nametable.clean.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
146 .nametable.files: .nametable.files.tmp
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
147 ( cmp -s $@ $< ) || ( cp $< $@ )
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
148 -$(RM) $<
0
a61af66fc99e Initial load
duke
parents:
diff changeset
149
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
150 # `hg status' is slightly faster than `hg fstatus'. Both are
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
151 # quite a bit slower on an NFS mounted file system, so this is
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
152 # really geared towards repos on local file systems.
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
153 .nametable.files.tmp:
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
154 -$(HG) fstatus -acmn > $@
0
a61af66fc99e Initial load
duke
parents:
diff changeset
155 nametable.clean:
a61af66fc99e Initial load
duke
parents:
diff changeset
156 -$(RM) .nametable.files .nametable.files.tmp
a61af66fc99e Initial load
duke
parents:
diff changeset
157
a61af66fc99e Initial load
duke
parents:
diff changeset
158 FORCE:
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 .PHONY: cscope cscope.clean TAGS.clean nametable.clean FORCE