test/hotspot/jtreg/serviceability/sa/ClhsdbLongConstant.java
author iignatyev
Thu, 02 Aug 2018 14:40:55 -0700
changeset 51287 7b1ddbafa134
parent 50791 b1e90a8a876c
child 53596 bb40a5303c84
permissions -rw-r--r--
8208655: use JTreg skipped status in hotspot tests Reviewed-by: kvn, hseigel, iklam
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     1
/*
50107
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
     2
 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     4
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     7
 * published by the Free Software Foundation.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     8
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    13
 * accompanied this code).
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    14
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    18
 *
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    21
 * questions.
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    22
 */
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    23
50791
b1e90a8a876c 8205419: [testbug] TestJmapCore failing without SA: introduce @requires vm.hasSAandCanAttach
goetz
parents: 50107
diff changeset
    24
/**
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    25
 * @test
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    26
 * @bug 8190198
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    27
 * @summary Test clhsdb longConstant command
50791
b1e90a8a876c 8205419: [testbug] TestJmapCore failing without SA: introduce @requires vm.hasSAandCanAttach
goetz
parents: 50107
diff changeset
    28
 * @requires vm.hasSA
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    29
 * @library /test/lib
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    30
 * @run main/othervm ClhsdbLongConstant
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    31
 */
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    32
51287
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    33
import java.util.HashMap;
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    34
import java.util.List;
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    35
import java.util.Map;
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    36
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    37
import jdk.test.lib.apps.LingeredApp;
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    38
import jdk.test.lib.Platform;
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    39
import jtreg.SkippedException;
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    40
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    41
public class ClhsdbLongConstant {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    42
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    43
    public static void main(String[] args) throws Exception {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    44
        System.out.println("Starting ClhsdbLongConstant test");
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    45
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    46
        LingeredApp theApp = null;
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    47
        try {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    48
            ClhsdbLauncher test = new ClhsdbLauncher();
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    49
            theApp = LingeredApp.startApp();
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    50
            System.out.println("Started LingeredApp with pid " + theApp.getPid());
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    51
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    52
            List<String> cmds = List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    53
                    "longConstant",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    54
                    "longConstant markOopDesc::locked_value",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    55
                    "longConstant markOopDesc::lock_bits",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    56
                    "longConstant jtreg::test 6",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    57
                    "longConstant jtreg::test");
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    58
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    59
            Map<String, List<String>> expStrMap = new HashMap<>();
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    60
            expStrMap.put("longConstant", List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    61
                    "longConstant markOopDesc::locked_value",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    62
                    "longConstant markOopDesc::lock_bits",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    63
                    "InvocationCounter::count_increment",
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    64
                    "markOopDesc::epoch_mask_in_place"));
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    65
            expStrMap.put("longConstant markOopDesc::locked_value", List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    66
                    "longConstant markOopDesc::locked_value"));
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    67
            expStrMap.put("longConstant markOopDesc::lock_bits", List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    68
                    "longConstant markOopDesc::lock_bits"));
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    69
            expStrMap.put("longConstant jtreg::test", List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    70
                    "longConstant jtreg::test 6"));
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    71
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    72
            Map<String, List<String>> unExpStrMap = new HashMap<>();
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    73
            unExpStrMap.put("longConstant jtreg::test", List.of(
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    74
                    "Error: java.lang.RuntimeException: No long constant named"));
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    75
50107
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    76
            String longConstantOutput = test.run(theApp.getPid(), cmds, expStrMap, unExpStrMap);
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    77
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    78
            if (longConstantOutput == null) {
51287
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    79
                throw new SkippedException("attach permission issues");
50107
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    80
            }
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    81
            checkForTruncation(longConstantOutput);
51287
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    82
        } catch (SkippedException e) {
7b1ddbafa134 8208655: use JTreg skipped status in hotspot tests
iignatyev
parents: 50791
diff changeset
    83
            throw e;
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    84
        } catch (Exception ex) {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    85
            throw new RuntimeException("Test ERROR " + ex, ex);
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    86
        } finally {
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    87
            LingeredApp.stopApp(theApp);
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    88
        }
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    89
        System.out.println("Test PASSED");
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
    90
    }
50107
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    91
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    92
    private static void checkForTruncation(String longConstantOutput) throws Exception {
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    93
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    94
        // Expected values obtained from the hash_mask_in_place definition in markOop.hpp
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    95
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    96
        // Expected output snippet is of the form (on x64-64):
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    97
        // ...
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    98
        // longConstant VM_Version::CPU_SHA 17179869184
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
    99
        // longConstant markOopDesc::biased_lock_bits 1
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   100
        // longConstant markOopDesc::age_shift 3
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   101
        // longConstant markOopDesc::hash_mask_in_place 549755813632
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   102
        // ...
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   103
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   104
        checkLongValue("markOopDesc::hash_mask_in_place",
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   105
                       longConstantOutput,
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   106
                       Platform.is64bit() ? 549755813632L: 4294967168L);
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   107
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   108
        String arch = System.getProperty("os.arch");
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   109
        if (arch.equals("amd64") || arch.equals("i386") || arch.equals("x86")) {
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   110
            // Expected value obtained from the CPU_SHA definition in vm_version_x86.hpp
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   111
            checkLongValue("VM_Version::CPU_SHA",
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   112
                           longConstantOutput,
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   113
                           17179869184L);
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   114
        }
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   115
    }
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   116
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   117
    private static void checkLongValue(String constName, String longConstantOutput,
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   118
                                       long checkValue) throws Exception {
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   119
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   120
        String[] snippets = longConstantOutput.split(constName);
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   121
        String[] words = snippets[1].split("\\R");
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   122
        long readValue = Long.parseLong(words[0].trim());
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   123
        if (readValue != checkValue) {
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   124
            throw new Exception ("Reading " + constName + ". Expected " + checkValue +
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   125
                                 ". Obtained " + readValue + " instead.");
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   126
        }
300e4a88c400 8195613: [SA] HotSpotTypeDataBase.readVMLongConstants truncates values to int
jgeorge
parents: 47899
diff changeset
   127
    }
47899
f113d1ef7bed 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
sballal
parents:
diff changeset
   128
}