test/hotspot/jtreg/runtime/7167069/PrintAsFlag.java
author prr
Thu, 26 Jul 2018 10:00:40 -0700
changeset 51251 0a7a0a6dfa22
parent 47216 71c04702a3d5
child 59053 ba6c248cae19
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12598
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     1
/*
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     4
 *
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     8
 *
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    13
 * accompanied this code).
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    14
 *
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    18
 *
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    21
 * questions.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    22
 */
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    23
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    24
/*
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    25
 * Note that in the run command below the only important flag is PrintCommandLineFlags.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    26
 * The others are just flags of all types; bool, intx, uintx, uint64_t, double and ccstr.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    27
 *
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    28
 * @test PrintAsFlag
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    29
 * @summary verify that Flag::print_as_flag() works correctly. This is used by "jinfo -flag" and -XX:+PrintCommandLineFlags.
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    30
 * @run main/othervm -XX:+PrintCommandLineFlags -XX:-ShowMessageBoxOnError -XX:BiasedLockingStartupDelay=4000 -XX:ParallelGCThreads=4 -XX:MaxRAM=1G -XX:CMSSmallCoalSurplusPercent=1.05 -XX:ErrorFile="file" PrintAsFlag
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    31
 */
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    32
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    33
public class PrintAsFlag {
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    34
  public static void main(String... args) {
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    35
    System.out.printf("Done");
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    36
  }
1256ef9b648a 7167069: 6 VM flags crash the VM when queried via jinfo
brutisso
parents:
diff changeset
    37
}