mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-04 07:28:22 +00:00
Merge
This commit is contained in:
commit
fbce2dbc43
@ -409,3 +409,4 @@ cda60babd152d889aba4d8f20a8f643ab151d3de jdk-9+161
|
||||
c38c6b270ccc8e2b86d1631bcf42248241b54d2c jdk-9+163
|
||||
7810f75d016a52e32295c4233009de5ca90e31af jdk-9+164
|
||||
aff4f339acd40942d3dab499846b52acd87b3af1 jdk-9+165
|
||||
ba5b16c9c6d80632b61959a33d424b1c3398ce62 jdk-9+166
|
||||
|
||||
@ -231,7 +231,8 @@ var getJibProfilesCommon = function (input, data) {
|
||||
// List of the main profile names used for iteration
|
||||
common.main_profile_names = [
|
||||
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
|
||||
"solaris-sparcv9", "windows-x64", "windows-x86"
|
||||
"solaris-sparcv9", "windows-x64", "windows-x86",
|
||||
"linux-arm64", "linux-arm-vfp-hflt", "linux-arm-vfp-hflt-dyn"
|
||||
];
|
||||
|
||||
// These are the base setttings for all the main build profiles.
|
||||
@ -391,7 +392,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
// on such hardware.
|
||||
if (input.build_cpu == "sparcv9") {
|
||||
var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
|
||||
if (cpu_brand.trim() == 'SPARC-M7') {
|
||||
if (cpu_brand.trim().match('SPARC-.7')) {
|
||||
boot_jdk_revision = "8u20";
|
||||
boot_jdk_subdirpart = "1.8.0_20";
|
||||
}
|
||||
@ -471,8 +472,43 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "freetype"],
|
||||
configure_args: concat(common.configure_args_32bit),
|
||||
},
|
||||
|
||||
"linux-arm64": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"],
|
||||
configure_args: [
|
||||
"--with-cpu-port=arm64",
|
||||
"--with-jvm-variants=server",
|
||||
"--openjdk-target=aarch64-linux-gnu",
|
||||
"--enable-headless-only"
|
||||
],
|
||||
},
|
||||
|
||||
"linux-arm-vfp-hflt": {
|
||||
target_os: "linux",
|
||||
target_cpu: "arm",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--with-jvm-variants=minimal1,client",
|
||||
"--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI",
|
||||
"--openjdk-target=arm-linux-gnueabihf",
|
||||
"--with-abi-profile=arm-vfp-hflt"
|
||||
],
|
||||
},
|
||||
|
||||
// Special version of the SE profile adjusted to be testable on arm64 hardware.
|
||||
"linux-arm-vfp-hflt-dyn": {
|
||||
configure_args: "--with-stdc++lib=dynamic"
|
||||
}
|
||||
};
|
||||
// Let linux-arm-vfp-hflt-dyn inherit everything from linux-arm-vfp-hflt
|
||||
profiles["linux-arm-vfp-hflt-dyn"] = concatObjects(
|
||||
profiles["linux-arm-vfp-hflt-dyn"], profiles["linux-arm-vfp-hflt"]);
|
||||
|
||||
// Add the base settings to all the main profiles
|
||||
common.main_profile_names.forEach(function (name) {
|
||||
profiles[name] = concatObjects(common.main_profile_base, profiles[name]);
|
||||
@ -584,7 +620,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
var testOnlyProfilesPrebuilt = {
|
||||
"run-test-prebuilt": {
|
||||
src: "src.conf",
|
||||
dependencies: [ "jtreg", "gnumake", testedProfile + ".jdk",
|
||||
dependencies: [ "jtreg", "gnumake", "boot_jdk", testedProfile + ".jdk",
|
||||
testedProfile + ".test", "src.full"
|
||||
],
|
||||
work_dir: input.get("src.full", "install_path") + "/test",
|
||||
@ -658,16 +694,28 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"windows-x86": {
|
||||
platform: "windows-x86",
|
||||
demo_ext: "zip"
|
||||
},
|
||||
"linux-arm64": {
|
||||
platform: "linux-arm64-vfp-hflt",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"linux-arm-vfp-hflt": {
|
||||
platform: "linux-arm32-vfp-hflt",
|
||||
demo_ext: "tar.gz"
|
||||
},
|
||||
"linux-arm-vfp-hflt-dyn": {
|
||||
platform: "linux-arm32-vfp-hflt-dyn",
|
||||
demo_ext: "tar.gz"
|
||||
}
|
||||
}
|
||||
// Generate common artifacts for all main profiles
|
||||
common.main_profile_names.forEach(function (name) {
|
||||
Object.keys(artifactData).forEach(function (name) {
|
||||
profiles[name] = concatObjects(profiles[name],
|
||||
common.main_profile_artifacts(artifactData[name].platform, artifactData[name].demo_ext));
|
||||
});
|
||||
|
||||
// Generate common artifacts for all debug profiles
|
||||
common.main_profile_names.forEach(function (name) {
|
||||
Object.keys(artifactData).forEach(function (name) {
|
||||
var debugName = name + common.debug_suffix;
|
||||
profiles[debugName] = concatObjects(profiles[debugName],
|
||||
common.debug_profile_artifacts(artifactData[name].platform));
|
||||
@ -839,7 +887,11 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
|
||||
solaris_x64: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
|
||||
windows_x64: "VS2013SP4+1.0"
|
||||
windows_x64: "VS2013SP4+1.0",
|
||||
linux_aarch64: "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0",
|
||||
linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
|
||||
? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
|
||||
: "arm-linaro-4.7+1.0")
|
||||
};
|
||||
|
||||
var devkit_platform = (input.target_cpu == "x86"
|
||||
|
||||
@ -569,3 +569,4 @@ b01c519b715ef6f785d0631adee0a6537cf6c12e jdk-9+162
|
||||
983fe207555724d98f4876991e1cbafbcf2733e8 jdk-9+163
|
||||
0af429be8bbaeaaf0cb838e9af28c953dda6a9c8 jdk-9+164
|
||||
c92c6416ca03b1464d5ed99cf6201e52b5ba0a70 jdk-9+165
|
||||
560d7aa083a24b6a56443feb8de0f40435d33aa9 jdk-9+166
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
|
||||
@ -47,6 +47,7 @@ class Metadata : public MetaspaceObj {
|
||||
virtual bool is_method() const volatile { return false; }
|
||||
virtual bool is_methodData() const volatile { return false; }
|
||||
virtual bool is_constantPool() const volatile { return false; }
|
||||
virtual bool is_methodCounters() const volatile { return false; }
|
||||
|
||||
virtual const char* internal_name() const = 0;
|
||||
|
||||
|
||||
@ -73,3 +73,11 @@ void MethodCounters::set_highest_osr_comp_level(int level) {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void MethodCounters::print_value_on(outputStream* st) const {
|
||||
assert(is_methodCounters(), "must be methodCounters");
|
||||
st->print("method counters");
|
||||
print_address_on(st);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include "interpreter/invocationCounter.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
|
||||
class MethodCounters: public MetaspaceObj {
|
||||
class MethodCounters : public Metadata {
|
||||
friend class VMStructs;
|
||||
friend class JVMCIVMStructs;
|
||||
private:
|
||||
@ -109,10 +109,11 @@ class MethodCounters: public MetaspaceObj {
|
||||
}
|
||||
|
||||
public:
|
||||
virtual bool is_methodCounters() const volatile { return true; }
|
||||
|
||||
static MethodCounters* allocate(methodHandle mh, TRAPS);
|
||||
|
||||
void deallocate_contents(ClassLoaderData* loader_data) {}
|
||||
DEBUG_ONLY(bool on_stack() { return false; }) // for template
|
||||
|
||||
AOT_ONLY(Method* method() const { return _method; })
|
||||
|
||||
@ -120,8 +121,6 @@ class MethodCounters: public MetaspaceObj {
|
||||
return align_size_up(sizeof(MethodCounters), wordSize) / wordSize;
|
||||
}
|
||||
|
||||
bool is_klass() const { return false; }
|
||||
|
||||
void clear_counters();
|
||||
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
@ -253,5 +252,9 @@ class MethodCounters: public MetaspaceObj {
|
||||
static ByteSize backedge_mask_offset() {
|
||||
return byte_offset_of(MethodCounters, _backedge_mask);
|
||||
}
|
||||
|
||||
virtual const char* internal_name() const { return "{method counters}"; }
|
||||
virtual void print_value_on(outputStream* st) const;
|
||||
|
||||
};
|
||||
#endif //SHARE_VM_OOPS_METHODCOUNTERS_HPP
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1668,6 +1668,9 @@ bool LibraryCallKit::inline_string_char_access(bool is_store) {
|
||||
}
|
||||
|
||||
Node* adr = array_element_address(value, index, T_CHAR);
|
||||
if (adr->is_top()) {
|
||||
return false;
|
||||
}
|
||||
if (is_store) {
|
||||
(void) store_to_memory(control(), adr, ch, T_CHAR, TypeAryPtr::BYTES, MemNode::unordered,
|
||||
false, false, true /* mismatched */);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
@ -189,19 +189,6 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
|
||||
assert(vf->is_compiled_frame(), "Wrong frame type");
|
||||
chunk->push(compiledVFrame::cast(vf));
|
||||
|
||||
ScopeDesc* trap_scope = chunk->at(0)->scope();
|
||||
Handle exceptionObject;
|
||||
if (trap_scope->rethrow_exception()) {
|
||||
if (PrintDeoptimizationDetails) {
|
||||
tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci());
|
||||
}
|
||||
GrowableArray<ScopeValue*>* expressions = trap_scope->expressions();
|
||||
guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw");
|
||||
ScopeValue* topOfStack = expressions->top();
|
||||
exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj();
|
||||
assert(exceptionObject() != NULL, "exception oop can not be null");
|
||||
}
|
||||
|
||||
bool realloc_failures = false;
|
||||
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
@ -296,6 +283,19 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
|
||||
#endif // INCLUDE_JVMCI
|
||||
#endif // COMPILER2 || INCLUDE_JVMCI
|
||||
|
||||
ScopeDesc* trap_scope = chunk->at(0)->scope();
|
||||
Handle exceptionObject;
|
||||
if (trap_scope->rethrow_exception()) {
|
||||
if (PrintDeoptimizationDetails) {
|
||||
tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci());
|
||||
}
|
||||
GrowableArray<ScopeValue*>* expressions = trap_scope->expressions();
|
||||
guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw");
|
||||
ScopeValue* topOfStack = expressions->top();
|
||||
exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj();
|
||||
guarantee(exceptionObject() != NULL, "exception oop can not be null");
|
||||
}
|
||||
|
||||
// Ensure that no safepoint is taken after pointers have been stored
|
||||
// in fields of rematerialized objects. If a safepoint occurs from here on
|
||||
// out the java state residing in the vframeArray will be missed.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -141,7 +141,7 @@ public class SABase extends CiReplayBase {
|
||||
if (Platform.isSolaris()) {
|
||||
try {
|
||||
OutputAnalyzer oa = ProcessTools.executeProcess("coreadm", "-p", "core",
|
||||
"" + ProcessHandle.current().getPid());
|
||||
"" + ProcessHandle.current().pid());
|
||||
oa.shouldHaveExitValue(0);
|
||||
} catch (Throwable t) {
|
||||
throw new Error("Can't launch coreadm: " + t, t);
|
||||
|
||||
@ -0,0 +1,320 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8158168
|
||||
* @summary Verifies that callers of StringUTF16 intrinsics throw array out of bounds exceptions.
|
||||
* @library /compiler/patches /test/lib
|
||||
* @build java.base/java.lang.Helper
|
||||
* @run main/othervm -Xbatch -XX:CompileThreshold=100 -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_getCharStringU,_putCharStringU compiler.intrinsics.string.TestStringUTF16IntrinsicRangeChecks
|
||||
* @run main/othervm -Xbatch -XX:CompileThreshold=100 -esa -ea -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_getCharStringU,_putCharStringU compiler.intrinsics.string.TestStringUTF16IntrinsicRangeChecks
|
||||
*/
|
||||
package compiler.intrinsics.string;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TestStringUTF16IntrinsicRangeChecks {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
byte[] val = new byte[2];
|
||||
byte[] b4 = new byte[4];
|
||||
char[] c4 = new char[4];
|
||||
String s4 = new String(c4);
|
||||
byte[] valHigh = new byte[2];
|
||||
byte[] valLow = new byte[2];
|
||||
Helper.putCharSB(valHigh, 0, Character.MIN_HIGH_SURROGATE);
|
||||
Helper.putCharSB(valLow, 0, Character.MIN_LOW_SURROGATE);
|
||||
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
getChars((int)1234, -5, -5 + 4, val);
|
||||
getChars((int)1234, -1, -1 + 4, val);
|
||||
getChars((int)1234, 0, 0 + 4, val);
|
||||
getChars((int)1234, 1, 1 + 4, val);
|
||||
|
||||
getChars((long)1234, -5, -5 + 4, val);
|
||||
getChars((long)1234, -1, -1 + 4, val);
|
||||
getChars((long)1234, 0, 0 + 4, val);
|
||||
getChars((long)1234, 1, 1 + 4, val);
|
||||
|
||||
byte[] val2 = Arrays.copyOf(val, val.length);
|
||||
putCharSB(val2, -1, '!');
|
||||
putCharSB(val2, 1, '!');
|
||||
|
||||
byte[] val4 = Arrays.copyOf(b4, b4.length);
|
||||
char[] c2 = new char[2];
|
||||
String s2 = new String(c2);
|
||||
|
||||
putCharsSB(val4, -3, c2, 0, 2);
|
||||
putCharsSB(val4, -1, c2, 0, 2);
|
||||
putCharsSB(val4, 0, c4, 0, 4);
|
||||
putCharsSB(val4, 1, c2, 0, 2);
|
||||
putCharsSB(val4, -3, s2, 0, 2);
|
||||
putCharsSB(val4, -1, s2, 0, 2);
|
||||
putCharsSB(val4, 0, s4, 0, 4);
|
||||
putCharsSB(val4, 1, s2, 0, 2);
|
||||
|
||||
codePointAtSB(valHigh, -1, 1);
|
||||
codePointAtSB(valHigh, -1, 2);
|
||||
codePointAtSB(valHigh, 0, 2);
|
||||
codePointAtSB(valHigh, 1, 2);
|
||||
|
||||
codePointBeforeSB(valLow, 0);
|
||||
codePointBeforeSB(valLow, -1);
|
||||
codePointBeforeSB(valLow, 2);
|
||||
|
||||
if (Helper.codePointCountSB(valHigh, 0, 1) != 1) {
|
||||
throw new AssertionError("codePointCountSB");
|
||||
}
|
||||
if (Helper.codePointCountSB(valLow, 0, 1) != 1) {
|
||||
throw new AssertionError("codePointCountSB");
|
||||
}
|
||||
codePointCountSB(valHigh, -1, 0);
|
||||
codePointCountSB(valHigh, -1, 2);
|
||||
codePointCountSB(valHigh, 0, 2);
|
||||
|
||||
charAt(val, -1);
|
||||
charAt(val, 1);
|
||||
|
||||
contentEquals(b4, val, -1);
|
||||
contentEquals(b4, val, 2);
|
||||
contentEquals(val, s4, 2);
|
||||
contentEquals(val, s4, -1);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append((String)null).append(true).append(false);
|
||||
if (!sb.toString().equals("nulltruefalse")) {
|
||||
throw new AssertionError("append");
|
||||
}
|
||||
|
||||
putCharsAt(val2, -1, '1', '2', '3', '4');
|
||||
putCharsAt(val2, 0, '1', '2', '3', '4');
|
||||
putCharsAt(val2, 2, '1', '2', '3', '4');
|
||||
putCharsAt(val2, -1, '1', '2', '3', '4', '5');
|
||||
putCharsAt(val2, 0, '1', '2', '3', '4', '5');
|
||||
putCharsAt(val2, 2, '1', '2', '3', '4', '5');
|
||||
|
||||
reverse(valHigh, -1);
|
||||
reverse(valHigh, 2);
|
||||
reverse(valLow, -1);
|
||||
reverse(valLow, 2);
|
||||
|
||||
byte[] d4 = new byte[4];
|
||||
inflate(b4, 0, d4, -1, 2);
|
||||
inflate(b4, 0, d4, 3, 2);
|
||||
inflate(b4, 0, d4, 4, 1);
|
||||
|
||||
byte[] b0 = new byte[0];
|
||||
byte[] b1 = new byte[1];
|
||||
byte[] b2 = new byte[2];
|
||||
byte[] t1 = new byte[] {1};
|
||||
byte[] t2 = new byte[] {1, 2};
|
||||
byte[] t4 = new byte[] {1, 2, 3, 4};
|
||||
indexOf(b1, 1, t2, 1, 0);
|
||||
indexOf(b2, 1, t1, 1, 0);
|
||||
indexOf(b2, 2, t2, 1, 0);
|
||||
indexOf(b2, 1, t2, 2, 0);
|
||||
indexOf(b2, -1, t2, 1, 0);
|
||||
indexOf(b2, 1, t2, -1, 0);
|
||||
indexOf(b2, 1, t2, 1, 1);
|
||||
|
||||
indexOfLatin1(b1, 1, t1, 1, 0);
|
||||
indexOfLatin1(b2, 2, t1, 1, 0);
|
||||
indexOfLatin1(b2, 1, b0, 1, 0);
|
||||
indexOfLatin1(b2, 1, t1, 2, 0);
|
||||
indexOfLatin1(b2, -1, t1, 1, 0);
|
||||
indexOfLatin1(b2, 2, t1, 1, 0);
|
||||
indexOfLatin1(b2, 1, t1, -1, 0);
|
||||
indexOfLatin1(b2, 1, t1, 2, 0);
|
||||
|
||||
lastIndexOf(b1, t2, 1, 0);
|
||||
lastIndexOf(b2, t4, 2, 0);
|
||||
lastIndexOf(b2, t2, 1, 0);
|
||||
lastIndexOf(b2, t2, 1, 1);
|
||||
|
||||
lastIndexOfLatin1(b1, t1, 1, 0);
|
||||
lastIndexOfLatin1(b2, t2, 2, 0);
|
||||
lastIndexOfLatin1(b2, t1, 1, 0);
|
||||
lastIndexOfLatin1(b2, t1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void getChars(int i, int begin, int end, byte[] value) {
|
||||
try {
|
||||
Helper.getChars(i, begin, end, value);
|
||||
throw new AssertionError("getChars");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void getChars(long l, int begin, int end, byte[] value) {
|
||||
try {
|
||||
Helper.getChars(l, begin, end, value);
|
||||
throw new AssertionError("getChars");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void putCharSB(byte[] val, int index, int c) {
|
||||
try {
|
||||
Helper.putCharSB(val, index, c);
|
||||
throw new AssertionError("putCharSB");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) {
|
||||
try {
|
||||
Helper.putCharsSB(val, index, ca, off, end);
|
||||
throw new AssertionError("putCharsSB");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) {
|
||||
try {
|
||||
Helper.putCharsSB(val, index, s, off, end);
|
||||
throw new AssertionError("putCharsSB");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void codePointAtSB(byte[] val, int index, int end) {
|
||||
try {
|
||||
Helper.codePointAtSB(val, index, end);
|
||||
throw new AssertionError("codePointAtSB");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void codePointBeforeSB(byte[] val, int index) {
|
||||
try {
|
||||
Helper.codePointBeforeSB(val, index);
|
||||
throw new AssertionError("codePointBeforeSB");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void codePointCountSB(byte[] val, int beginIndex, int endIndex) {
|
||||
try {
|
||||
Helper.codePointCountSB(val, beginIndex, endIndex);
|
||||
throw new AssertionError("codePointCountSB");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void charAt(byte[] v, int index) {
|
||||
try {
|
||||
Helper.charAt(v, index);
|
||||
throw new AssertionError("charAt");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void contentEquals(byte[] v1, byte[] v2, int len) {
|
||||
try {
|
||||
Helper.contentEquals(v1, v2, len);
|
||||
throw new AssertionError("contentEquals");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void contentEquals(byte[] v, CharSequence cs, int len) {
|
||||
try {
|
||||
Helper.contentEquals(v, cs, len);
|
||||
throw new AssertionError("contentEquals");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void putCharsAt(byte[] v, int i, char c1, char c2, char c3, char c4) {
|
||||
try {
|
||||
Helper.putCharsAt(v, i, c1, c2, c3, c4);
|
||||
throw new AssertionError("putCharsAt");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void putCharsAt(byte[] v, int i, char c1, char c2, char c3, char c4, char c5) {
|
||||
try {
|
||||
Helper.putCharsAt(v, i, c1, c2, c3, c4, c5);
|
||||
throw new AssertionError("putCharsAt");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void reverse(byte[] v, int len) {
|
||||
try {
|
||||
Helper.reverse(v, len);
|
||||
throw new AssertionError("reverse");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void inflate(byte[] v1, int o1, byte[] v2, int o2, int len) {
|
||||
try {
|
||||
Helper.inflate(v1, o1, v2, o2, len);
|
||||
throw new AssertionError("inflate");
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void indexOf(byte[] v1, int l1, byte[] v2, int l2, int from) {
|
||||
try {
|
||||
if (Helper.indexOf(v1, l1, v2, l2, from) != -1) {
|
||||
throw new AssertionError("indexOf");
|
||||
}
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void lastIndexOf(byte[] v1, byte[] v2, int l2, int from) {
|
||||
try {
|
||||
if (Helper.lastIndexOf(v1, v2, l2, from) != -1) {
|
||||
throw new AssertionError("lastIndexOf");
|
||||
}
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void indexOfLatin1(byte[] v1, int l1, byte[] v2, int l2, int from) {
|
||||
try {
|
||||
if (Helper.indexOfLatin1(v1, l1, v2, l2, from) != -1) {
|
||||
throw new AssertionError("indexOfLatin1");
|
||||
}
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
|
||||
static void lastIndexOfLatin1(byte[] v1, byte[] v2, int l2, int from) {
|
||||
try {
|
||||
if (Helper.lastIndexOfLatin1(v1, v2, l2, from) != -1) {
|
||||
throw new AssertionError("lastIndexOfLatin1");
|
||||
}
|
||||
} catch (IndexOutOfBoundsException io) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -73,4 +73,84 @@ public class Helper {
|
||||
StringUTF16.getChars(value, srcBegin, srcEnd, dst, dstBegin);
|
||||
return dst;
|
||||
}
|
||||
|
||||
public static void putCharSB(byte[] val, int index, int c) {
|
||||
StringUTF16.putCharSB(val, index, c);
|
||||
}
|
||||
|
||||
public static void putCharsSB(byte[] val, int index, char[] ca, int off, int end) {
|
||||
StringUTF16.putCharsSB(val, index, ca, off, end);
|
||||
}
|
||||
|
||||
public static void putCharsSB(byte[] val, int index, CharSequence s, int off, int end) {
|
||||
StringUTF16.putCharsSB(val, index, s, off, end);
|
||||
}
|
||||
|
||||
public static int codePointAtSB(byte[] val, int index, int end) {
|
||||
return StringUTF16.codePointAtSB(val, index, end);
|
||||
}
|
||||
|
||||
public static int codePointBeforeSB(byte[] val, int index) {
|
||||
return StringUTF16.codePointBeforeSB(val, index);
|
||||
}
|
||||
|
||||
public static int codePointCountSB(byte[] val, int beginIndex, int endIndex) {
|
||||
return StringUTF16.codePointCountSB(val, beginIndex, endIndex);
|
||||
}
|
||||
|
||||
public static int getChars(int i, int begin, int end, byte[] value) {
|
||||
return StringUTF16.getChars(i, begin, end, value);
|
||||
}
|
||||
|
||||
public static int getChars(long l, int begin, int end, byte[] value) {
|
||||
return StringUTF16.getChars(l, begin, end, value);
|
||||
}
|
||||
|
||||
public static boolean contentEquals(byte[] v1, byte[] v2, int len) {
|
||||
return StringUTF16.contentEquals(v1, v2, len);
|
||||
}
|
||||
|
||||
public static boolean contentEquals(byte[] value, CharSequence cs, int len) {
|
||||
return StringUTF16.contentEquals(value, cs, len);
|
||||
}
|
||||
|
||||
public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4) {
|
||||
return StringUTF16.putCharsAt(value, i, c1, c2, c3, c4);
|
||||
}
|
||||
|
||||
public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4, char c5) {
|
||||
return StringUTF16.putCharsAt(value, i, c1, c2, c3, c4, c5);
|
||||
}
|
||||
|
||||
public static char charAt(byte[] value, int index) {
|
||||
return StringUTF16.charAt(value, index);
|
||||
}
|
||||
|
||||
public static void reverse(byte[] value, int count) {
|
||||
StringUTF16.reverse(value, count);
|
||||
}
|
||||
|
||||
public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
|
||||
StringUTF16.inflate(src, srcOff, dst, dstOff, len);
|
||||
}
|
||||
|
||||
public static int indexOf(byte[] src, int srcCount,
|
||||
byte[] tgt, int tgtCount, int fromIndex) {
|
||||
return StringUTF16.indexOf(src, srcCount, tgt, tgtCount, fromIndex);
|
||||
}
|
||||
|
||||
public static int indexOfLatin1(byte[] src, int srcCount,
|
||||
byte[] tgt, int tgtCount, int fromIndex) {
|
||||
return StringUTF16.indexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex);
|
||||
}
|
||||
public static int lastIndexOf(byte[] src, byte[] tgt, int tgtCount, int fromIndex) {
|
||||
int srcCount = StringUTF16.length(src); // ignored
|
||||
return StringUTF16.lastIndexOf(src, srcCount, tgt, tgtCount, fromIndex);
|
||||
}
|
||||
|
||||
public static int lastIndexOfLatin1(byte[] src, byte[] tgt, int tgtCount, int fromIndex) {
|
||||
int srcCount = StringUTF16.length(src); // ignored
|
||||
return StringUTF16.lastIndexOfLatin1(src, srcCount, tgt, tgtCount, fromIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -67,7 +67,7 @@ public class Testlibadimalloc {
|
||||
|
||||
// Start the process, get the pid and then wait for the test to finish
|
||||
Process process = builder.start();
|
||||
long pid = process.getPid();
|
||||
long pid = process.pid();
|
||||
int retval = process.waitFor();
|
||||
|
||||
// make sure the SEGVOverflow test crashed
|
||||
|
||||
@ -80,7 +80,7 @@ public class AttachSetGetFlag {
|
||||
try {
|
||||
waitForReady(target);
|
||||
|
||||
int pid = (int)target.getPid();
|
||||
int pid = (int)target.pid();
|
||||
|
||||
HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString());
|
||||
|
||||
@ -116,7 +116,7 @@ public class AttachSetGetFlag {
|
||||
try {
|
||||
waitForReady(target);
|
||||
|
||||
int pid = (int)target.getPid();
|
||||
int pid = (int)target.pid();
|
||||
|
||||
HotSpotVirtualMachine vm = (HotSpotVirtualMachine)VirtualMachine.attach(((Integer)pid).toString());
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,7 +60,7 @@ public class SADebugDTest {
|
||||
return;
|
||||
}
|
||||
|
||||
long ourPid = ProcessHandle.current().getPid();
|
||||
long ourPid = ProcessHandle.current().pid();
|
||||
|
||||
// The string we are expecting in the debugd ouput
|
||||
String golden = String.format(GOLDEN, ourPid);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -78,7 +78,7 @@ public class DaemonThreadTest {
|
||||
thread.start();
|
||||
|
||||
// Run jstack tool and collect the output
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
|
||||
ToolResults results = jstackTool.measure();
|
||||
|
||||
// Analyze the jstack output for the correct thread type
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -96,7 +96,7 @@ public class SpreadLockTest {
|
||||
debuggee.start();
|
||||
|
||||
// Collect output from the jstack tool
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
|
||||
ToolResults results1 = jstackTool.measure();
|
||||
|
||||
// Go to method b()
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,7 +61,7 @@ public class ThreadNamesTest {
|
||||
thread.start();
|
||||
|
||||
// Run jstack tool and collect the output
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
|
||||
ToolResults results = jstackTool.measure();
|
||||
|
||||
// Analyze the jstack output for the strange thread name
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -95,7 +95,7 @@ public class TraveledLockTest {
|
||||
debuggee.start();
|
||||
|
||||
// Collect output from the jstack tool
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
|
||||
ToolResults results1 = jstackTool.measure();
|
||||
|
||||
// Go to method b()
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -105,7 +105,7 @@ public class WaitNotifyThreadTest {
|
||||
waitThread.start();
|
||||
|
||||
// Collect output from the jstack tool
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().getPid());
|
||||
JstackTool jstackTool = new JstackTool(ProcessHandle.current().pid());
|
||||
ToolResults results = jstackTool.measure();
|
||||
|
||||
// Analyze the jstack output for the patterns needed
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -38,7 +38,7 @@ public class GcCapacityTest {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// We will be running "jstat -gc" tool
|
||||
JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().getPid());
|
||||
JstatGcCapacityTool jstatGcTool = new JstatGcCapacityTool(ProcessHandle.current().pid());
|
||||
|
||||
// Run once and get the results asserting that they are reasonable
|
||||
JstatGcCapacityResults measurement1 = jstatGcTool.measure();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,7 +41,7 @@ public class GcCauseTest01 {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// We will be running "jstat -gc" tool
|
||||
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid());
|
||||
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid());
|
||||
|
||||
// Run once and get the results asserting that they are reasonable
|
||||
JstatGcCauseResults measurement1 = jstatGcTool.measure();
|
||||
|
||||
@ -38,6 +38,6 @@ import utils.*;
|
||||
public class GcCauseTest02 {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().getPid())).run();
|
||||
new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().pid())).run();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,7 +41,7 @@ public class GcCauseTest03 {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// We will be running "jstat -gc" tool
|
||||
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid());
|
||||
JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().pid());
|
||||
|
||||
System.gc();
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,7 @@ public class GcNewTest {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// We will be running "jstat -gc" tool
|
||||
JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().getPid());
|
||||
JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().pid());
|
||||
|
||||
// Run once and get the results asserting that they are reasonable
|
||||
JstatGcNewResults measurement1 = jstatGcTool.measure();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,7 +44,7 @@ public class GcTest01 {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// We will be running "jstat -gc" tool
|
||||
JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().getPid());
|
||||
JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().pid());
|
||||
|
||||
// Run once and get the results asserting that they are reasonable
|
||||
JstatGcResults measurement1 = jstatGcTool.measure();
|
||||
|
||||
@ -38,6 +38,6 @@ import utils.*;
|
||||
public class GcTest02 {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().getPid())).run();
|
||||
new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().pid())).run();
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ DISABLE_WARNINGS := -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,
|
||||
|
||||
# If warnings needs to be non-fatal for testing purposes use a command like:
|
||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
||||
JAVAC_WARNINGS := -Xlint:all,-removal -Werror
|
||||
JAVAC_WARNINGS := -Xlint:all -Werror
|
||||
|
||||
# The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
|
||||
# and the interim javac, to be run by the boot jdk.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -143,7 +143,7 @@ public class LingeredApp {
|
||||
if (appProcess == null) {
|
||||
throw new RuntimeException("Process is not alive");
|
||||
}
|
||||
return appProcess.getPid();
|
||||
return appProcess.pid();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -298,7 +298,7 @@ public final class ProcessTools {
|
||||
* @return Process id
|
||||
*/
|
||||
public static long getProcessId() throws Exception {
|
||||
return ProcessHandle.current().getPid();
|
||||
return ProcessHandle.current().pid();
|
||||
}
|
||||
|
||||
|
||||
@ -531,8 +531,8 @@ public final class ProcessTools {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPid() {
|
||||
return p.getPid();
|
||||
public long pid() {
|
||||
return p.pid();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user