test/testlibrary/ctw/README

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 0
f90c822e73f8
child 7894
599c27e30262
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

     1 #
     2 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.
     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 #
    25 DESCRIPTION
    27 This is replacement for CompileTheWorld (CTW) written on java. Its purpose is
    28 to make possible the use of CTW in product builds.
    30 DEPENDENCES
    32 The tool depends on Whitebox API. Assumed, that the sources of whitebox are
    33 located in '../whitebox' directory.
    35 BUILDING
    37 Simple way to build, just type 'make'.
    39 Makefile uses environment variables 'ALT_BOOTDIR', 'BOOTDIR' as root-dir of jdk
    40 that will be used for compilation and creating jar.
    42 On successful building 'ctw.jar' will be created.
    44 RUNNING
    46 Since the tool uses WhiteBox API, options 'UnlockDiagnosticVMOptions' and
    47 'WhiteBoxAPI' should be specified, and 'wb.jar' should be added to
    48 boot-classpath:
    49   $ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar 
    51 Arguments can be paths to '.jar, '.zip', '.lst' files or directories with
    52 classes, that define which classes will be compiled:
    53   - '.jar', '.zip' files and directories are interpreted like in classpath
    54 (including '<dir>/*' syntax)
    55   - '.lst' files -- files with class names (in java notation) to compile.
    56 CTW will try to find these classes with default class loader, so they should
    57 be located in classpath.
    59 Without arguments it would work as old version of CTW: all classes in
    60 boot-classpath will be compiled, excluding classes in 'rt.jar' if 'rt.jar' isn't
    61 first in boot-classpath.
    63 Due CTW's flags also are not available in product builds, the tool uses
    64 properties with the same names:
    65   - 'CompileTheWorldPreloadClasses' -- type:boolean, default:true, description:
    66 Preload all classes used by a class before start loading
    67   - 'CompileTheWorldStartAt' -- type:long, default:1, description: First class
    68 to consider
    69   - 'CompileTheWorldStopAt' -- type:long, default:Long.MAX_VALUE, description:
    70 Last class to consider
    72 Also it uses additional properties:
    73   - 'sun.hotspot.tools.ctw.verbose' -- type:boolean, default:false,
    74 description: Verbose output, adds additional information about compilation
    75   - 'sun.hotspot.tools.ctw.logfile' -- type:string, default:null,
    76 description: Path to logfile, if it's null, cout will be used.
    78 EXAMPLES
    80 compile classes from 'rt.jar':
    81   $ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar ${JAVA_HOME}/jre/lib/rt.jar
    83 compile classes from all '.jar' in './testjars' directory:
    84   $ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar ./testjars/*
    86 compile classes from './build/classes' directory:
    87   $ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar ./build/classes
    89 compile only java.lang.String, java.lang.Object classes:
    90   $ echo java.lang.String > classes.lst
    91   $ echo java.lang.Object >> classes.lst
    92   $ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar classes.lst

mercurial