8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 package gc.testlibrary;
26
27 import jdk.test.lib.JDKToolLauncher;
28 import jdk.test.lib.OutputAnalyzer;
29 import sun.hotspot.WhiteBox;
30
31 import java.io.File;
32 import java.io.IOException;
33 import java.nio.file.Files;
34 import java.nio.file.Path;
35 import java.nio.file.Paths;
36
37 public class Helpers {
38
39 /**
40 * Size of a long field in bytes
41 */
42 public static final int SIZE_OF_LONG = 8;
43
44 // In case of 128 byte padding
45 private static final int MAX_PADDING_SIZE = 128;
46
47 /**
48 * According class file format theoretical amount of fields in class is u2 which is (256 * 256 - 1).
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 package gc.testlibrary;
26
27 import jdk.test.lib.JDKToolLauncher;
28 import jdk.test.lib.process.OutputAnalyzer;
29 import sun.hotspot.WhiteBox;
30
31 import java.io.File;
32 import java.io.IOException;
33 import java.nio.file.Files;
34 import java.nio.file.Path;
35 import java.nio.file.Paths;
36
37 public class Helpers {
38
39 /**
40 * Size of a long field in bytes
41 */
42 public static final int SIZE_OF_LONG = 8;
43
44 // In case of 128 byte padding
45 private static final int MAX_PADDING_SIZE = 128;
46
47 /**
48 * According class file format theoretical amount of fields in class is u2 which is (256 * 256 - 1).
|