< prev index next >

test/hotspot/jtreg/serviceability/jvmti/CanGenerateAllClassHook/CanGenerateAllClassHook.java

Print this page
rev 50752 : 8205605: [testbug][aix] Various test adaption to aix pecularities.


  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  * @test
  26  * @bug 8161605
  27  * @summary Tests that jvmtiEnv::GetPotentialCapabilities reports
  28  *          can_generate_all_class_hook_events capability with CDS (-Xshare:on)
  29  *          at ONLOAD and LIVE phases

  30  * @library /test/lib
  31  * @compile CanGenerateAllClassHook.java
  32  * @run main/othervm/native CanGenerateAllClassHook
  33  */
  34 
  35 import jdk.test.lib.cds.CDSTestUtils;
  36 import jdk.test.lib.process.OutputAnalyzer;
  37 import jdk.test.lib.process.ProcessTools;
  38 import java.io.File;
  39 import java.io.IOException;
  40 
  41 /*
  42  * The simplest way to test is to use system classes.jsa,
  43  * but we cannot rely on tested JRE/JDK has it.
  44  * So the test runs 2 java processes -
  45  * 1st to generate custom shared archive file:
  46  *     java -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=<jsa_file> -Xshare:dump
  47  * and 2nd to perform the actual testing using generated shared archive:
  48  *     java -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=<jsa_file> -Xshare:on
  49   *         -agentlib:<agent> CanGenerateAllClassHook




  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  * @test
  26  * @bug 8161605
  27  * @summary Tests that jvmtiEnv::GetPotentialCapabilities reports
  28  *          can_generate_all_class_hook_events capability with CDS (-Xshare:on)
  29  *          at ONLOAD and LIVE phases
  30  * @requires vm.cds
  31  * @library /test/lib
  32  * @compile CanGenerateAllClassHook.java
  33  * @run main/othervm/native CanGenerateAllClassHook
  34  */
  35 
  36 import jdk.test.lib.cds.CDSTestUtils;
  37 import jdk.test.lib.process.OutputAnalyzer;
  38 import jdk.test.lib.process.ProcessTools;
  39 import java.io.File;
  40 import java.io.IOException;
  41 
  42 /*
  43  * The simplest way to test is to use system classes.jsa,
  44  * but we cannot rely on tested JRE/JDK has it.
  45  * So the test runs 2 java processes -
  46  * 1st to generate custom shared archive file:
  47  *     java -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=<jsa_file> -Xshare:dump
  48  * and 2nd to perform the actual testing using generated shared archive:
  49  *     java -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=<jsa_file> -Xshare:on
  50   *         -agentlib:<agent> CanGenerateAllClassHook


< prev index next >