comparison test/testlibrary/whitebox/sun/hotspot/WhiteBox.java @ 20635:643d6baecfe1

8062247: [TESTBUG] Allow WhiteBox test to access JVM offsets Reviewed-by: coleenp, iklam, mseledtsov Contributed-by: yumin.qi@oracle.com
author minqi
date Fri, 07 Nov 2014 12:48:09 -0800
parents 80260967f994
children 887a7cedb892
comparison
equal deleted inserted replaced
20633:d44a81242b1e 20635:643d6baecfe1
206 .map(f -> f.apply(name)) 206 .map(f -> f.apply(name))
207 .filter(x -> x != null) 207 .filter(x -> x != null)
208 .findAny() 208 .findAny()
209 .orElse(null); 209 .orElse(null);
210 } 210 }
211 public native int getOffsetForName0(String name);
212 public int getOffsetForName(String name) throws Exception {
213 int offset = getOffsetForName0(name);
214 if (offset == -1) {
215 throw new RuntimeException(name + " not found");
216 }
217 return offset;
218 }
219
211 } 220 }