185 if (!m.find()) {
186 throw new RuntimeException("Pattern \"" + p + "\" not found in the output");
187 }
188 aotCacheBase = Long.valueOf(m.group(1), 16);
189 aotCacheShift = Integer.valueOf(m.group(2));
190 // Parse current CompressedOops settings
191 line = list.get(i+5);
192 m = p.matcher(line);
193 if (!m.find()) {
194 throw new RuntimeException("Pattern \"" + p + "\" not found in the output");
195 }
196 currentBase = Long.valueOf(m.group(1), 16);
197 currentShift = Integer.valueOf(m.group(2));
198 break;
199 }
200 }
201 if (aotCacheShift == -1 || currentShift == -1 || aotCacheBase == -1 || currentBase == -1) {
202 throw new RuntimeException("Failed to find CompressedOops settings");
203 }
204 if (aotCacheShift != currentShift) {
205 out.shouldContain("AOT Code Cache disabled: it was created with different CompressedOops::shift()");
206 } else if ((aotCacheBase == 0 || currentBase == 0) && (aotCacheBase != currentBase)) {
207 out.shouldContain("AOTStubCaching is disabled: incompatible CompressedOops::base()");
208 } else {
209 out.shouldMatch("Read \\d+ entries table at offset \\d+ from AOT Code Cache");
210 }
211 }
212 }
213 }
214 }
|
185 if (!m.find()) {
186 throw new RuntimeException("Pattern \"" + p + "\" not found in the output");
187 }
188 aotCacheBase = Long.valueOf(m.group(1), 16);
189 aotCacheShift = Integer.valueOf(m.group(2));
190 // Parse current CompressedOops settings
191 line = list.get(i+5);
192 m = p.matcher(line);
193 if (!m.find()) {
194 throw new RuntimeException("Pattern \"" + p + "\" not found in the output");
195 }
196 currentBase = Long.valueOf(m.group(1), 16);
197 currentShift = Integer.valueOf(m.group(2));
198 break;
199 }
200 }
201 if (aotCacheShift == -1 || currentShift == -1 || aotCacheBase == -1 || currentBase == -1) {
202 throw new RuntimeException("Failed to find CompressedOops settings");
203 }
204 if (aotCacheShift != currentShift) {
205 out.shouldContain("AOT Stub/Adapter Cache disabled: it was created with different CompressedOops::shift()");
206 } else if ((aotCacheBase == 0 || currentBase == 0) && (aotCacheBase != currentBase)) {
207 out.shouldContain("AOT Stub/Adapter Cache disabled: incompatible CompressedOops::base()");
208 } else {
209 out.shouldMatch("Read \\d+ entries table at offset \\d+ from AOT Code Cache");
210 }
211 }
212 }
213 }
214 }
|